/* =========================================================================
   Glucagon Research — components
   Requires tokens.css + base.css. Class names are documented in
   build-notes/01-design-system.md. Never restyle a component inline; add a
   modifier here instead.
   ========================================================================= */

/* Sections: 1 icons · 2 header · 3 buttons · 4 surfaces · 5 chips ·
   6 tables · 7 tabs + accordion · 8 buy box · 9 notices · 10 forms ·
   11 breadcrumbs · 12 trace · 13 COA media · 14 footer · 15 misc ·
   16 side cart */

/* =======================================================================
   1. ICONS  — 1.5px rounded line icons, 12 of them, sprite lives in header
   ======================================================================= */
.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; stroke-width: 1.25; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* =======================================================================
   2. HEADER
   ======================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-glass);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-2) var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-header); }

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-7);
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; }
.brand img, .brand svg { height: 34px; width: auto; }
.brand:focus-visible { border-radius: 6px; }

.nav { display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: var(--s-2); }
.nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-soft);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.nav__link:hover { background: var(--surface-2); color: var(--text); }
.nav__link.is-active { color: var(--brand); background: var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: var(--s-2); }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.cart-count {
  position: absolute; top: 3px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 10px; font-weight: var(--fw-bold); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cart-count[data-empty="true"] { display: none; }

.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { justify-self: end; }
}

/* ---- mobile drawer ---- */
.drawer {
  position: fixed; inset: 0;
  z-index: var(--z-drawer);
  visibility: hidden;
  overflow: hidden;          /* the off-canvas panel must never widen the page */
}
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(27, 38, 51, 0.32);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; inset: 0 0 0 auto;
  width: min(380px, 88vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  padding: var(--s-6) var(--s-7) var(--s-10);
  display: flex; flex-direction: column; gap: var(--s-6);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__list { display: flex; flex-direction: column; }
.drawer__link {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 18px;
  font-weight: var(--fw-medium);
  color: var(--text);
}
.drawer__link.is-active { color: var(--brand); }

/* =======================================================================
   3. BUTTONS
   ======================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-3);
  padding: 12px 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }

.btn--outline { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--n-400); background: var(--n-25); color: var(--text); }

.btn--ghost { background: transparent; color: var(--brand); padding-inline: 10px; }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-hover); }

.btn--mint {
  background: var(--mint-50);
  color: var(--emerald-800);
  border-color: var(--mint-200);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-size: var(--fs-caption);
  letter-spacing: 0.01em;
}
.btn--mint:hover { background: var(--mint-100); color: var(--emerald-900); }

.btn--lg { padding: 15px 28px; font-size: var(--fs-body); border-radius: var(--r-md); }
.btn--sm { padding: 8px 14px; font-size: var(--fs-caption); }
.btn--block { display: flex; width: 100%; }

/* =======================================================================
   4. SURFACES & CARDS
   ======================================================================= */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-8);
}
.panel--plain { background: #fff; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card--glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.62));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.9);
}
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

/* ---- product card ---- */
.product-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease);
}
.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  display: grid; place-items: center;
  overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: var(--s-6); }
.product-card__flag {
  position: absolute; top: var(--s-4); left: var(--s-4);
}
.product-card__body { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); flex: 1; }
.product-card__name { font-size: var(--fs-h4); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading); color: var(--text); }
.product-card__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.product-card__foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line-soft);
}
.product-card__price { font-size: var(--fs-h4); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--text); }
.product-card__price span { font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--muted); }
.product-card__view { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--brand); }
.product-card:hover .product-card__view .icon { transform: translateX(2px); }
.product-card__view .icon { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease); }

/* =======================================================================
   5. CHIPS, BADGES, STAT TILES, TRUST STRIP
   ======================================================================= */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  white-space: nowrap;
}
.chip .icon { width: 14px; height: 14px; }
.chip--ruo    { background: var(--n-50);      border-color: var(--line);      color: var(--n-700);
                font-size: var(--fs-micro); letter-spacing: var(--ls-wide); text-transform: uppercase; font-weight: var(--fw-semibold); }
.chip--purity { background: var(--emerald-50); border-color: var(--emerald-200); color: var(--emerald-800); }
.chip--lab    { background: var(--mint-50);    border-color: var(--mint-200);    color: var(--emerald-800); }
.chip--batch  { background: #fff; border-color: var(--line-strong); color: var(--text-soft); font-family: var(--font-mono); font-size: 12px; }
.chip--class  { background: var(--surface); border-color: var(--line); color: var(--muted); }
.chip--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--emerald-300); flex: none;
}
.eyebrow--plain::before { display: none; }

/* section head: eyebrow + headline + optional intro. NOT every section needs one. */
.section-head { max-width: 60ch; display: flex; flex-direction: column; gap: var(--s-4); }
.section-head--center { margin-inline: auto; text-align: center; align-items: center; }
.section-head__intro { color: var(--muted); font-size: var(--fs-body); }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
              background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat-tile { background: #fff; padding: var(--s-7) var(--s-6); display: flex; flex-direction: column; gap: 6px; }
.stat-tile__value { font-size: 30px; font-weight: var(--fw-semibold); letter-spacing: var(--ls-display); color: var(--text); font-variant-numeric: tabular-nums; }
.stat-tile__value em { font-style: normal; color: var(--brand); }
.stat-tile__label { font-size: var(--fs-caption); color: var(--muted); }

/* trust strip — facts and marks, never testimonials */
.trust-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5) var(--s-10);
  padding: var(--s-6) var(--s-7);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.trust-item { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-soft); font-weight: var(--fw-medium); }
.trust-item .icon { color: var(--brand); }

/* =======================================================================
   6. TABLES — spec table + COA results
   ======================================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.table-wrap > table { border-radius: inherit; }

.spec-table, .coa-table { width: 100%; font-size: var(--fs-sm); }
.spec-table th, .spec-table td, .coa-table th, .coa-table td {
  text-align: left;
  padding: 13px var(--s-6);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.spec-table tr:last-child td, .coa-table tbody tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 38%;
  font-weight: var(--fw-medium);
  color: var(--muted);
  background: var(--n-25);
  border-right: 1px solid var(--line-soft);
}
.spec-table td { font-weight: var(--fw-medium); color: var(--text); }

.coa-table thead th {
  background: var(--surface);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.coa-table tbody tr:hover { background: var(--n-25); }
.coa-table th, .coa-table td { white-space: nowrap; }   /* scroll the wrap, don't stack cells */
.coa-table td.is-num { font-variant-numeric: tabular-nums; }
.coa-table .mono { color: var(--text-soft); }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--success);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none;
              box-shadow: 0 0 0 3px var(--success-soft); }
.status--warn { color: var(--warn); }
.status--warn .status-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status--fail { color: var(--danger); }
.status--fail .status-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.table-empty { padding: var(--s-10); text-align: center; color: var(--muted); font-size: var(--fs-sm); }

/* =======================================================================
   7. TABS + ACCORDION
   ======================================================================= */
.tabs { border-bottom: 1px solid var(--line); display: flex; gap: var(--s-2); overflow-x: auto; }
.tab {
  padding: 12px 4px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.tab + .tab { margin-left: var(--s-7); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: var(--fw-semibold); }
.tabpanel { padding-top: var(--s-7); }

.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  padding: var(--s-6) 0;
  text-align: left;
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-heading);
  color: var(--text);
}
.accordion__trigger .icon { color: var(--muted); transition: transform var(--dur-2) var(--ease); }
.accordion__trigger[aria-expanded="true"] { color: var(--brand); }
.accordion__trigger[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--brand); }
.accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease); }
.accordion__panel > div { overflow: hidden; }
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel p { padding-bottom: var(--s-6); color: var(--text-soft); max-width: 72ch; }

/* =======================================================================
   8. PRODUCT BUY BOX — variants, quantity, price
   ======================================================================= */
.variant-pills { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.variant-pill {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-soft);
  transition: all var(--dur-1) var(--ease);
}
.variant-pill:hover { border-color: var(--n-400); color: var(--text); }
.variant-pill.is-selected { border-color: var(--brand); background: var(--brand-soft); color: var(--emerald-800); font-weight: var(--fw-semibold); }
.variant-pill[disabled] { opacity: 0.4; text-decoration: line-through; pointer-events: none; }

.qty-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.qty-option {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s-5) var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  text-align: left;
  transition: all var(--dur-1) var(--ease);
}
.qty-option:hover { border-color: var(--n-400); }
.qty-option.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.qty-option__count { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.qty-option__per { font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; }
.qty-option__save {
  position: absolute; top: -9px; right: 10px;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--mint-400); color: var(--emerald-900);
  font-size: 10px; font-weight: var(--fw-bold); letter-spacing: 0.04em; text-transform: uppercase;
}

.price-block { display: flex; flex-direction: column; gap: 4px; }
.price { font-size: 34px; font-weight: var(--fw-semibold); letter-spacing: var(--ls-display); color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.price__per { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.price__note { font-size: var(--fs-caption); color: var(--muted); }

.buy-box { display: flex; flex-direction: column; gap: var(--s-7); padding: var(--s-8);
           border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-sm); }
.buy-box__label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide);
                  text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); display: block; }

/* =======================================================================
   9. NOTICES / CALLOUTS
   ======================================================================= */
.notice {
  display: flex; gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--n-400);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-soft);
  line-height: 1.55;
}
.notice .icon { color: var(--muted); margin-top: 2px; }
.notice strong { color: var(--text); }
.notice--brand { background: var(--emerald-50); border-color: var(--emerald-200); border-left-color: var(--brand); }
.notice--brand .icon { color: var(--brand); }
.notice--warn  { background: var(--warn-soft); border-color: #EEDFC2; border-left-color: var(--warn); }
.notice--warn .icon { color: var(--warn); }
.notice--ruo   { background: #fff; border-color: var(--line); border-left-color: var(--n-900);
                 font-size: var(--fs-caption); letter-spacing: 0.01em; }

.callout {
  padding: var(--s-8);
  border-radius: var(--r-xl);
  background: var(--gradient-mint);
  border: 1px solid var(--mint-100);
}

/* =======================================================================
   10. FORMS
   ======================================================================= */
.field { display: flex; flex-direction: column; gap: var(--s-3); }
.label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--text-soft); letter-spacing: 0.01em; }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: var(--fs-sm);
  color: var(--text);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--n-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--emerald-100);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236C7888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: var(--fs-caption); color: var(--muted); }
.field--error .input { border-color: var(--danger); }
.field__error { font-size: var(--fs-caption); color: var(--danger); }

/* search input with a leading icon */
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; }
.search--lg .input { padding: 15px 16px 15px 46px; font-size: var(--fs-body); border-radius: var(--r-md); }

/* =======================================================================
   11. BREADCRUMBS + PAGINATION
   ======================================================================= */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-caption); color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; color: var(--n-300); }
.breadcrumbs [aria-current="page"] { color: var(--text-soft); font-weight: var(--fw-medium); }

.pagination { display: flex; align-items: center; gap: var(--s-2); justify-content: center; }
.page-link {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-soft);
  transition: all var(--dur-1) var(--ease);
}
.page-link:hover { border-color: var(--line-strong); color: var(--text); }
.page-link[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-link[disabled] { opacity: 0.4; pointer-events: none; }

/* =======================================================================
   12. CHROMATOGRAPHY TRACE (decorative)
   ======================================================================= */
.trace { display: block; width: 100%; height: auto; color: var(--emerald-300); }
.trace path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trace .trace__base { stroke: var(--line); stroke-width: 1; }
.trace .trace__peak { stroke: var(--brand); }
.trace--mint { color: var(--mint-300); }
.trace--draw .trace__peak {
  stroke-dasharray: 4000; stroke-dashoffset: 4000;
  animation: trace-draw 2.4s var(--ease) forwards;
}
@keyframes trace-draw { to { stroke-dashoffset: 0; } }

/* =======================================================================
   13. COA MEDIA
   ======================================================================= */
.coa-figure { display: flex; flex-direction: column; gap: var(--s-4); }
.coa-figure__frame {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-5);
  overflow: hidden;
}
.coa-figure__frame img { width: 100%; border-radius: var(--r-sm); background: #fff; }
.coa-figure figcaption { font-size: var(--fs-caption); color: var(--muted); display: flex; justify-content: space-between; gap: var(--s-4); }
.coa-placeholder {
  aspect-ratio: 8.5 / 11;
  display: grid; place-items: center; gap: var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--muted);
  font-size: var(--fs-caption);
  text-align: center;
  padding: var(--s-8);
}

/* =======================================================================
   14. FOOTER
   ======================================================================= */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: var(--section-y); }
.site-footer__nav { padding-block: var(--s-12) var(--s-10); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-10) var(--s-8); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: var(--s-4); }
.footer-brand img, .footer-brand svg { width: 150px; height: auto; }
.footer-blurb { font-size: var(--fs-caption); color: var(--muted); max-width: 34ch; line-height: 1.6; }
.footer-heading {
  font-size: var(--fs-micro); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text);
  margin-bottom: var(--s-2);
}
.footer-link { font-size: var(--fs-sm); color: var(--muted); }
.footer-link:hover { color: var(--brand); }

.ruo-strip {
  border-top: 1px solid var(--line);
  background: #fff;
  padding-block: var(--s-6);
  font-size: var(--fs-caption);
  color: var(--muted);
  line-height: 1.55;
}
.ruo-strip strong { color: var(--text); font-weight: var(--fw-semibold); }

.footer-bottom {
  border-top: 1px solid var(--line);
  background: var(--brand-graphite);
  color: #fff;
  padding-block: var(--s-5);
}
.footer-bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.footer-copy { font-size: var(--fs-caption); color: rgba(255,255,255,0.62); }
.tagline {
  display: flex; align-items: center; gap: var(--s-4);
  font-size: var(--fs-micro); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}
.tagline span { display: inline-flex; align-items: center; gap: var(--s-4); }
.tagline span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint-400); }
.tagline span:last-child::after { display: none; }

/* =======================================================================
   15. MISC
   ======================================================================= */
.hero-media { border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.img-contain { width: 100%; height: 100%; object-fit: contain; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.link-arrow .icon { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---- icon rotations (the chevron is the only directional icon) ---------- */
.icon--right { transform: rotate(-90deg); }
.icon--left  { transform: rotate(90deg); }
.icon--up    { transform: rotate(180deg); }

/* ---- button "added" state (cart stub) ---------------------------------- */
.btn.is-added { background: var(--emerald-700); color: #fff; }

/* ---- media placeholder (product photography arrives later) ------------- */
.media-placeholder {
  display: grid; place-items: center; gap: var(--s-3);
  width: 100%; height: 100%;
  background-color: var(--surface);
  color: var(--n-400);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
}
.media-placeholder > img { width: 54px; height: auto; padding: 0; opacity: 0.3; }

/* ---- swatch (styleguide + brand pages) --------------------------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: var(--s-4); }
.swatch { display: flex; flex-direction: column; gap: 6px; }
.swatch__chip { height: 60px; border-radius: var(--r-sm); border: 1px solid rgba(27,38,51,0.08); }
.swatch__name { font-size: var(--fs-caption); font-weight: var(--fw-medium); }
.swatch__hex { font-size: var(--fs-micro); color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; }
.ramp { display: grid; grid-template-columns: repeat(10, 1fr); border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.ramp div { height: 56px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; font-size: 10px; font-family: var(--font-mono); }

/* =======================================================================
   16. SIDE CART — the drawer. js/sidecart.js injects every element below
   into <body>; no page's own HTML carries any of it (styleguide.html shows
   a static copy of the same markup). Ported 1:1 from the approved Peptide
   Perfection drawer — same structure, the same module order, the same
   proportions, spacing, panel width and motion. Only the tokens changed,
   and the modules Glucagon does not sell are gone.
   ======================================================================= */
.ppc-root { position: fixed; inset: 0; z-index: var(--z-drawer); }
.ppc-root[hidden] { display: none; }

.ppc-scrim {
  position: absolute; inset: 0;
  background: rgba(27, 38, 51, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: ppc-scrim-in var(--dur-3) var(--ease) both;
}
.ppc-root.is-closing .ppc-scrim { animation: ppc-scrim-in 240ms var(--ease) reverse both; }
@keyframes ppc-scrim-in { from { opacity: 0; } to { opacity: 1; } }

/* desktop: a floating inset panel, the card language of the rest of the site */
.ppc {
  position: absolute; top: 14px; right: 14px; bottom: 14px;
  width: 438px;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  box-shadow: 0 40px 90px -20px rgba(27, 38, 51, 0.42), 0 0 0 1px rgba(27, 38, 51, 0.05);
  animation: ppc-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ppc-root.is-closing .ppc { animation: ppc-out 240ms var(--ease) both; }
@keyframes ppc-in  { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes ppc-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(26px); } }

.ppc * { box-sizing: border-box; }
.ppc button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.ppc a { color: inherit; text-decoration: none; }
.ppc button:focus-visible, .ppc a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.ppc-i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor;
         stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- header ---- */
.ppc-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 14px;
  background: #fff; position: relative; z-index: 3;
}
.ppc-head h2 {
  margin: 0;
  font-size: 19px; font-weight: 800; letter-spacing: -0.022em; line-height: 1.2;
  color: var(--brand-graphite);
}
.ppc-count {
  min-width: 22px; padding: 5px 9px;
  border-radius: var(--r-pill);
  background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: var(--fw-bold); line-height: 1;
  text-align: center; font-variant-numeric: tabular-nums;
}
.ppc-x {
  margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-soft);
  transition: background var(--dur-1) var(--ease), transform var(--dur-2) var(--ease), color var(--dur-1) var(--ease);
}
.ppc-x:hover { background: var(--surface-2); color: var(--text); transform: rotate(90deg); }
.ppc-x .ppc-i { width: 15px; height: 15px; }

/* ---- free shipping meter ---- */
.ppc-ship {
  flex: 0 0 auto;
  margin: 0 20px 4px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  border: 1px solid var(--emerald-100);
  transition: background var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease);
}
.ppc-ship-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; line-height: 1.35; font-weight: var(--fw-medium);
  color: var(--text-soft);
}
.ppc-ship-top .ppc-i { color: var(--brand); }
.ppc-ship-top b { color: var(--brand); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.ppc-bar {
  position: relative;
  margin-top: 9px; height: 6px;
  border-radius: var(--r-pill);
  background: var(--emerald-200);
  overflow: hidden;
}
.ppc-bar i {
  display: block; height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--emerald-500) 55%, var(--brand));
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative; overflow: hidden;
}
.ppc-bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: ppc-shimmer 2.4s ease-in-out infinite;
}
@keyframes ppc-shimmer { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(220%); } }
.ppc.is-freeship .ppc-ship { background: var(--success-soft); border-color: rgba(18, 133, 111, 0.22); }
.ppc.is-freeship .ppc-ship-top,
.ppc.is-freeship .ppc-ship-top b,
.ppc.is-freeship .ppc-ship-top .ppc-i { color: var(--success); }
.ppc.is-freeship .ppc-bar { display: none; }

/* ---- scrolling body ---- */
.ppc-body {
  flex: 1 1 auto;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 20px 22px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
  scrollbar-width: thin; scrollbar-color: var(--n-300) transparent;
}
.ppc-body::-webkit-scrollbar { width: 6px; }
.ppc-body::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 9px; }
.ppc-body::-webkit-scrollbar-track { background: transparent; }

/* ---- line item ---- */
.ppc-item {
  position: relative;
  display: flex; gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  animation: ppc-row-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes ppc-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ppc-item:first-child { padding-top: 2px; }
.ppc-thumb {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 78px; height: 78px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.ppc-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 6px; mix-blend-mode: multiply; }
.ppc-main { flex: 1 1 auto; min-width: 0; }
.ppc-row1 { display: flex; align-items: flex-start; gap: 10px; }
.ppc-name {
  margin: 0; padding-right: 2px;
  font-size: 16px; font-weight: var(--fw-bold); line-height: 1.25; letter-spacing: -0.014em;
  color: var(--brand-graphite);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ppc-name a:hover { color: var(--brand); }
.ppc-rm {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  margin: -2px -4px 0 auto;
  border-radius: var(--r-pill);
  color: var(--n-400);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.ppc-rm:hover { background: var(--danger-soft); color: var(--danger); }
.ppc-rm .ppc-i { width: 11px; height: 11px; stroke-width: 2.2; }
.ppc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.ppc-tag {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: var(--fw-semibold); line-height: 1;
  white-space: nowrap;
}
.ppc-edit {
  padding: 4px 2px;
  font-size: 11.5px; font-weight: var(--fw-semibold);
  color: var(--muted);
  text-decoration: underline; text-underline-offset: 2px;
  transition: color var(--dur-1) var(--ease);
}
.ppc-edit:hover { color: var(--brand); }
.ppc-ea { margin-top: 7px; font-size: 12px; font-weight: var(--fw-medium); color: var(--muted); font-variant-numeric: tabular-nums; }
.ppc-row2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 9px; }
.ppc-qty {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.ppc-qty button {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  color: var(--brand);
  transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.ppc-qty button:hover { background: var(--brand-soft); }
.ppc-qty button:active { transform: scale(0.88); }
.ppc-qty button[disabled] { opacity: 0.32; pointer-events: none; }
.ppc-qty .ppc-i { width: 11px; height: 11px; stroke-width: 2.4; }
.ppc-qty span {
  min-width: 26px; text-align: center;
  font-size: 13.5px; font-weight: var(--fw-bold);
  color: var(--text); font-variant-numeric: tabular-nums;
}
.ppc-prices { flex: 0 0 auto; text-align: right; line-height: 1.1; }
.ppc-now {
  display: block;
  font-size: 18px; font-weight: var(--fw-bold); letter-spacing: -0.018em;
  color: var(--brand-graphite); font-variant-numeric: tabular-nums;
}

/* ---- footer ---- */
.ppc-foot {
  flex: 0 0 auto; position: relative; z-index: 2;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 14px 20px 16px;
  box-shadow: 0 -14px 26px -22px rgba(27, 38, 51, 0.28);
}
.ppc-sum { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.ppc-line { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-soft); }
.ppc-line b { font-weight: var(--fw-semibold); color: var(--text); }
.ppc-line .v { font-weight: var(--fw-semibold); color: var(--text); font-variant-numeric: tabular-nums; }
.ppc-line.free .v { color: var(--success); font-weight: var(--fw-bold); }
.ppc-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ppc-total b { font-size: 15px; font-weight: var(--fw-bold); letter-spacing: -0.014em; color: var(--text); }
.ppc-total .v {
  font-size: 23px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--brand-graphite); font-variant-numeric: tabular-nums;
}
.ppc-assure {
  display: flex; flex-direction: column; gap: 6px;
  margin: 12px 0;
  padding: 9px 11px;
  border-radius: var(--r-md);
  background: var(--surface);
}
.ppc-assure div { display: flex; align-items: center; gap: 8px; font-size: 11.5px; line-height: 1.3; color: var(--text-soft); }
.ppc-assure .ppc-i { width: 14px; height: 14px; color: var(--brand); }
.ppc-assure b { color: var(--brand); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.ppc-assure .ok .ppc-i { color: var(--success); }
.ppc .ppc-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 56px;
  border-radius: var(--r-md);
  background: var(--brand); color: #fff;
  font-size: 16.5px; font-weight: var(--fw-bold); letter-spacing: -0.012em;
  box-shadow: 0 14px 26px -10px rgba(15, 109, 99, 0.34);
  transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.ppc .ppc-cta:hover { background: var(--brand-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 18px 30px -10px rgba(15, 109, 99, 0.4); }
.ppc-cta:active { transform: translateY(0) scale(0.99); }
.ppc-cta .ppc-i { width: 15px; height: 15px; opacity: 0.9; }
.ppc-cta .amt { font-variant-numeric: tabular-nums; }
.ppc-cta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.ppc-pay { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px; opacity: 0.62; }
.ppc-pay svg { display: block; height: 17px; width: auto; }
.ppc-cont {
  display: block; width: 100%;
  margin-top: 11px;
  text-align: center;
  font-size: 12.5px; font-weight: var(--fw-semibold);
  color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--dur-1) var(--ease);
}
.ppc-cont:hover { color: var(--brand); }

/* ---- empty ---- */
.ppc-empty {
  flex: 1 1 auto;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 34px 60px;
}
.ppc.is-empty .ppc-body,
.ppc.is-empty .ppc-foot,
.ppc.is-empty .ppc-ship { display: none; }
.ppc.is-empty .ppc-empty { display: flex; }
.ppc-empty-ic {
  display: flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
}
.ppc-empty-ic .ppc-i { width: 36px; height: 36px; stroke-width: 1.3; }
.ppc-empty h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.024em; color: var(--brand-graphite); }
.ppc-empty p { margin: 8px 0 22px; max-width: 250px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ppc-empty .ppc-cta { width: auto; height: 50px; padding: 0 30px; font-size: 15px; }
.ppc-pop { width: 100%; margin-top: 38px; text-align: left; }
.ppc-pop-h {
  margin-bottom: 9px;
  font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
}
.ppc-pop-i {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 7px; padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
}
.ppc-pop-i:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ppc-pop-img {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.ppc-pop-img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; mix-blend-mode: multiply; }
.ppc-pop-t { flex: 1 1 auto; min-width: 0; }
.ppc-pop-t b { display: block; font-size: 13px; font-weight: var(--fw-bold); letter-spacing: -0.008em; color: var(--text); }
.ppc-pop-t small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.ppc-pop-p { flex: 0 0 auto; display: flex; color: var(--brand); }
.ppc-pop-p .ppc-i { width: 16px; height: 16px; }

/* ---- the undo toast, over the footer ---- */
.ppc-toast {
  position: absolute; left: 20px; right: 20px; bottom: calc(100% + 10px);
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--brand-graphite); color: #fff;
  font-size: 12.5px; font-weight: var(--fw-medium);
  box-shadow: 0 14px 30px rgba(27, 38, 51, 0.32);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.ppc-toast.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.ppc-toast button {
  margin-left: auto;
  color: var(--accent); font-size: 12.5px; font-weight: var(--fw-bold);
  text-decoration: underline; text-underline-offset: 2px;
}

/* ---- mobile: a full-bleed sheet ---- */
@media (max-width: 560px) {
  .ppc { top: 0; right: 0; bottom: 0; left: 0; width: 100%; border-radius: 0; }
  .ppc-head { padding: 18px 16px 12px; }
  .ppc-ship { margin: 0 16px 4px; }
  .ppc-body { padding: 12px 16px 20px; }
  .ppc-foot { padding: 12px 16px 22px; }
  .ppc-toast { left: 16px; right: 16px; }
  .ppc-assure { margin: 10px 0; }
  .ppc-cta { height: 54px; }
  .ppc-pay, .ppc-cont { display: none; }
  .ppc-empty { padding: 24px 22px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .ppc, .ppc-scrim, .ppc-item, .ppc-bar i::after,
  .ppc-root.is-closing .ppc, .ppc-root.is-closing .ppc-scrim { animation: none; }
  .ppc *, .ppc { transition: none; }
}
