/* Peptigen Labs shop (customer pages only; the admin keeps app.css).
   A quiet apothecary counter with a few game-shop touches: item-slot cards, element sigils per category,
   option tiles, a numbered order path. Flat colour, no gradients except the hero heading text.
   CSP is strict (style-src 'self'), so no inline styles anywhere. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght.woff2") format("woff2");
}

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
  /* Peptigen Labs brand palette (brand guide, Nov 2026): dark green, emerald, black, white */
  --brand-dark: #064D2E;
  --brand-emerald: #00C853;
  --brand-black: #0A0A0A;
  --brand-white: #FFFFFF;

  /* Roles (light). Emerald is an accent only: as text it would fail contrast on white, so text greens use --green-ink. */
  --bg: var(--brand-white);
  --surface: #F5F8F6;
  --well: #EAF2EC;
  --line: #E0E7E2;
  --line-strong: #B5C6BA;
  --ink: var(--brand-black);   /* 19.6:1 on white */
  --muted: #4A5650;            /* 7.6:1 on white */
  --green-ink: #006B2D;        /* 6.6:1 on white */
  --sigil: var(--brand-dark);
  --accent: var(--brand-emerald);
  --btn: var(--brand-dark);    /* white on this: 10.4:1 */
  --btn-hover: #043A22;
  --btn-ink: var(--brand-white);
  --focus: #008C3A;            /* 4.4:1 on white */
  --head-from: var(--brand-black);
  --head-to: var(--brand-dark);
  --alert-bg: #FBE7E2;
  --alert-ink: #7A1D10;
  --alert-line: #EFC1B6;
  --nav-bg: rgba(255, 255, 255, .82);
  --pop-bg: #F2F6F3;
  --pop-shadow: 0 24px 60px -18px rgba(6, 77, 46, .35), 0 2px 8px rgba(10, 10, 10, .08);

  /* Spacing (Elaya scale) */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radius (Tailwind steps) */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Montserrat", "Manrope", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070A08;
    --surface: #0F1512;
    --well: #16201A;
    --line: #1F2B24;
    --line-strong: #2E5A42;
    --ink: var(--brand-white);   /* 19.4:1 */
    --muted: #A7B6AD;            /* 9.3:1 */
    --green-ink: #3BE07E;
    --sigil: var(--brand-emerald);
    --btn: var(--brand-emerald); /* dark ink on this: 10.1:1 */
    --btn-hover: #3BE07E;
    --btn-ink: #02150A;
    --focus: var(--brand-emerald);
    --head-from: var(--brand-white);
    --head-to: var(--brand-emerald);
    --alert-bg: #3A1D15;
    --alert-ink: #FFD9CC;
    --alert-line: #5C2E21;
    --nav-bg: rgba(15, 21, 18, .82);
    --pop-bg: #121A16;
    --pop-shadow: 0 24px 60px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 200, 83, .18);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem; line-height: 1.5rem; font-weight: 400;
  font-feature-settings: "tnum" 0;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .3s var(--ease); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
p { margin: 0 0 var(--s-200); text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; text-wrap: balance; letter-spacing: -0.02em; }
ul, ol { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: var(--s-75); z-index: 50; background: var(--btn); color: var(--btn-ink); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); }
.skip:focus { left: var(--s-75); }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.num, .price, .table .num { font-variant-numeric: tabular-nums; }

/* Named text styles (Elaya) */
.heading-1 { font-size: 3.75rem; line-height: 3.75rem; font-weight: 600; }
.heading-2 { font-size: 3rem; line-height: 3rem; font-weight: 600; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.body-6, .caption-2 { font-size: .875rem; line-height: 1.25rem; }
.caption-3 { font-size: .75rem; line-height: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lede { font-size: 1.125rem; line-height: 1.75rem; color: var(--muted); max-width: 680px; }

/* Plain h1/h2 on inner pages pick up a style without classes */
main h1 { font-size: 2.25rem; line-height: 2.5rem; margin-bottom: var(--s-200); }
main h2 { font-size: 1.5rem; line-height: 2rem; margin: var(--s-600) 0 var(--s-200); }
main h2:first-child { margin-top: 0; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-300); }
.wrap.narrow { max-width: 800px; }
.block { padding: var(--s-700) 0; }
.block.alt { background: var(--surface); border-block: 1px solid var(--line); }
.page-head { padding: var(--s-600) 0 var(--s-300); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--muted); margin-bottom: var(--s-100); }
.eyebrow .ic { width: 16px; height: 16px; color: var(--sigil); }
.flourish { display: block; width: 96px; height: 12px; color: var(--sigil); margin: var(--s-200) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-200); margin-bottom: var(--s-400); }
.section-head h2 { margin: 0; }
.section-head p { margin: var(--s-75) 0 0; max-width: 560px; }

/* ---------- Header: a compact floating bar ---------- */
.site-header { position: sticky; top: 0; z-index: 40; padding: var(--s-100) var(--s-300) 0; }
.bar {
  max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-200);
  min-height: 56px; padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: var(--nav-bg); border: 1px solid var(--line); border-radius: var(--r-2xl);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.125rem; line-height: 1.75rem; letter-spacing: -0.01em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-lg); background: var(--btn); color: var(--btn-ink); }
.brand-mark .ic { width: 18px; height: 18px; }
.nav { display: flex; align-items: center; gap: var(--s-50); }
.nav a { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 40px; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; font-size: .875rem; line-height: 1.25rem; font-weight: 500; transition: background-color .3s var(--ease); }
.nav a:hover { background: var(--well); }
.nav a[aria-current="page"] { background: var(--well); font-weight: 600; }
.bar-end { display: flex; align-items: center; gap: var(--s-75); }
.nav-cart { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 40px; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); background: var(--btn); color: var(--btn-ink); text-decoration: none; font-size: .875rem; line-height: 1.25rem; font-weight: 600; transition: background-color .3s var(--ease), transform .3s var(--ease); }
.nav-cart:hover { background: var(--btn-hover); transform: translateY(-1px); }
.nav-cart:active { transform: translateY(1px); }
.nav-cart .ic { width: 18px; height: 18px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--s-50); border-radius: var(--r-full); background: var(--btn-ink); color: var(--btn); font-size: .75rem; line-height: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  min-height: 44px; padding: var(--s-75) var(--s-200);
  background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); border-radius: var(--r-lg);
  font: inherit; font-size: 1rem; line-height: 1.5rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .ic-arrow { transform: translateX(2px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--well); }
.btn.small { min-height: 36px; padding: var(--s-50) var(--s-100); font-size: .875rem; line-height: 1.25rem; }
.btn.block-btn { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; cursor: pointer; }
.link:hover { text-decoration-color: currentColor; }
.link-row { display: inline-flex; align-items: center; gap: var(--s-75); font-weight: 600; }
form.inline { display: inline; }

/* ---------- Hero (home) ---------- */
.hero { padding: var(--s-800) 0 var(--s-700); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s-600); align-items: center; }
.hero h1 {
  max-width: 680px; font-size: 3.75rem; line-height: 3.75rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: var(--s-300);
  color: var(--head-from);
  background: linear-gradient(90deg, var(--head-from), var(--head-to)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lede { margin-bottom: var(--s-400); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-100); margin-bottom: var(--s-500); }
.facts-strip { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); color: var(--muted); font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.facts-strip li { display: inline-flex; align-items: center; gap: var(--s-75); }
.facts-strip .ic { width: 18px; height: 18px; color: var(--sigil); }

/* The shop counter: categories as item slots */
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); }
.counter-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); margin-bottom: var(--s-200); color: var(--muted); }
.slots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-100); }
.slot {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-100); align-items: center;
  padding: var(--s-100); min-height: 72px; border-radius: var(--r-2xl); background: var(--bg); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), border-color .3s var(--ease);
}
a.slot:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.slot-name { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.slot-count { display: block; font-size: .75rem; line-height: 1rem; color: var(--muted); font-weight: 500; }
.slots li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Sigil well: the square that holds a category mark, with notched corners like an item frame */
.sigil {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-lg);
  background: var(--well); color: var(--sigil);
}
.sigil svg { width: 26px; height: 26px; }
.sigil::before, .sigil::after { content: ""; position: absolute; width: 6px; height: 6px; border: 1.5px solid var(--sigil); opacity: .7; }
.sigil::before { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.sigil::after { bottom: 4px; right: 4px; border-left: 0; border-top: 0; }
.sigil.lg { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-xl); }
.sigil.lg svg { width: 30%; height: 30%; }
.sigil.lg::before, .sigil.lg::after { width: 14px; height: 14px; }
.sigil.lg::before { top: 12px; left: 12px; }
.sigil.lg::after { bottom: 12px; right: 12px; }

/* ---------- Product cards (item slots) ---------- */
.grid { list-style: none; padding: 0; display: grid; gap: var(--s-300); grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: var(--s-100); height: 100%; padding: var(--s-100);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl);
  color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), border-color .3s var(--ease);
}
a.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
a.card:hover .sigil.lg svg { transform: scale(1.03); }
.sigil.lg svg { transition: transform .5s var(--ease); }
.card-body { display: flex; flex-direction: column; gap: var(--s-50); padding: 0 var(--s-75) var(--s-75); flex: 1; }
.card-title { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.card-meta { margin-top: auto; padding-top: var(--s-75); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-75); font-size: .875rem; line-height: 1.25rem; }
.card-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-note { color: var(--muted); font-size: .75rem; line-height: 1rem; }

/* Ingredient-style tag: sigil + category name */
.tag { display: inline-flex; align-items: center; gap: var(--s-50); align-self: flex-start; padding: var(--s-25) var(--s-75) var(--s-25) var(--s-50); border-radius: var(--r-full); border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.tag svg { width: 14px; height: 14px; color: var(--sigil); }
.chip { display: inline-flex; align-items: center; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); background: var(--well); color: var(--ink); font-size: .75rem; line-height: 1rem; font-weight: 600; }

/* ---------- Catalog ---------- */
.toolbar { display: grid; gap: var(--s-200); margin-bottom: var(--s-400); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.filters a { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 40px; padding: var(--s-75) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .875rem; line-height: 1.25rem; font-weight: 500; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.filters a svg { width: 16px; height: 16px; color: var(--sigil); }
.filters a:hover { border-color: var(--line-strong); background: var(--well); }
.filters a[aria-current="page"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.filters a[aria-current="page"] svg { color: var(--btn-ink); }
.search { display: flex; gap: var(--s-75); max-width: 560px; }
.search .field { position: relative; flex: 1; }
.search .field .ic { position: absolute; left: var(--s-100); top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input[type="search"] { width: 100%; padding-left: var(--s-500); }
.result-count { color: var(--muted); font-size: .875rem; line-height: 1.25rem; margin: 0 0 var(--s-200); }
.empty { padding: var(--s-600) var(--s-300); text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-2xl); }
.empty .sigil { margin: 0 auto var(--s-200); }

/* ---------- Forms ---------- */
input[type="search"], input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  font: inherit; font-size: 1rem; line-height: 1.5rem; min-height: 44px; padding: var(--s-75) var(--s-100);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  transition: border-color .3s var(--ease);
}
textarea { width: 100%; }
input:hover, textarea:hover { border-color: var(--muted); }
input[type="file"] { font: inherit; font-size: .875rem; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: var(--s-100); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--well); color: var(--ink); cursor: pointer; }
input[type="number"] { width: 5.5rem; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--btn); width: 18px; height: 18px; margin: 0; flex: none; }
.stack { display: grid; gap: var(--s-200); max-width: 480px; }
.stack.wide { max-width: none; }
.stack label, .field-label { display: grid; gap: var(--s-75); font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.stack input[type="text"], .stack input[type="email"], .stack input[type="number"] { width: 100%; }
.hint { font-weight: 400; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-200); margin: 0; min-width: 0; }
legend { padding: 0 var(--s-75); font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.opt { display: flex; align-items: center; gap: var(--s-100); min-height: 44px; cursor: pointer; font-weight: 500; }
.opt.check { align-items: flex-start; padding: var(--s-75) 0; }
.opt.check input { margin-top: var(--s-25); }

/* Option tiles: radio buttons drawn as selectable slots */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-75); border: 0; padding: 0; }
.tiles legend { padding: 0; margin-bottom: var(--s-75); }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile span { display: flex; flex-direction: column; justify-content: center; gap: var(--s-25); min-height: 56px; padding: var(--s-75) var(--s-100); border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--surface); font-weight: 600; transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease); }
.tile small { font-size: .75rem; line-height: 1rem; color: var(--muted); font-weight: 500; }
.tile:hover span { border-color: var(--muted); transform: translateY(-1px); }
.tile input:checked + span { border-color: var(--btn); background: var(--well); box-shadow: inset 0 0 0 1px var(--btn); }
.tile input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile.set span { border-style: double; border-width: 3px; padding: calc(var(--s-75) - 2px) calc(var(--s-100) - 2px); }
.tile.set input:checked + span { box-shadow: none; }

/* Quantity stepper (the input works on its own; the buttons appear with JS) */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stepper input[type="number"] { border: 0; border-radius: 0; width: 4rem; text-align: center; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button { display: none; place-items: center; width: 40px; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .3s var(--ease); }
.js .stepper button { display: grid; }
.stepper button:hover { background: var(--well); }
.stepper button:active .ic { transform: scale(.9); }
.stepper button .ic { width: 16px; height: 16px; }
.stepper.small input[type="number"] { min-height: 36px; width: 3rem; padding: var(--s-50); }
.stepper.small button { width: 32px; }

/* ---------- Product page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-75); list-style: none; padding: 0; margin: 0 0 var(--s-300); color: var(--muted); font-size: .875rem; line-height: 1.25rem; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-75); color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-600); align-items: start; }
.item-frame { position: sticky; top: 96px; display: grid; gap: var(--s-200); padding: var(--s-200); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.item-frame .sigil.lg { border-radius: var(--r-xl); }
.item-stats { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-75) var(--s-200); margin: 0; font-size: .875rem; line-height: 1.25rem; }
.item-stats dt { color: var(--muted); font-weight: 500; }
.item-stats dd { margin: 0; font-weight: 600; }
.product-info h1 { font-size: 3rem; line-height: 3rem; letter-spacing: -0.03em; margin: var(--s-100) 0 var(--s-100); }
.product-info .lede { margin-bottom: var(--s-300); }
.ruo { display: flex; gap: var(--s-100); align-items: flex-start; padding: var(--s-100) var(--s-200); border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--well); font-size: .875rem; line-height: 1.25rem; margin: 0 0 var(--s-300); }
.ruo .ic { width: 20px; height: 20px; margin-top: 0; color: var(--ink); }
.ruo p { margin: 0; }
.buy { display: grid; gap: var(--s-300); padding: var(--s-300); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); margin-bottom: var(--s-300); }
.buy-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-200); padding-top: var(--s-300); border-top: 1px solid var(--line); }
.buy-price { display: grid; gap: var(--s-25); }
.buy-price output { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.buy-actions { display: flex; flex-wrap: wrap; gap: var(--s-100); align-items: center; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-75) var(--s-300); margin: 0; }
.facts dt { font-weight: 600; } .facts dd { margin: 0; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.25rem; background: var(--surface); }
.table-wrap .table { background: transparent; }
.table th, .table td { padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table thead th { font-size: .75rem; line-height: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tfoot th, .table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.stock-in { color: var(--ink); font-weight: 600; }
.stock-out { color: var(--muted); text-decoration: line-through; }
main > .block > .wrap > .table, .wrap > .table { border: 1px solid var(--line); border-radius: var(--r-2xl); overflow: hidden; }

/* ---------- Cart (the bench) ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-400); align-items: start; }
.lines { list-style: none; padding: 0; display: grid; gap: var(--s-100); }
.line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s-200); align-items: center; padding: var(--s-100); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.line .sigil { width: 56px; height: 56px; }
.line-name { font-weight: 600; }
.line-name a { text-decoration: none; }
.line-name a:hover { text-decoration: underline; }
.line-sub { color: var(--muted); font-size: .875rem; line-height: 1.25rem; }
.line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100); margin-top: var(--s-75); }
.line-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-each { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; line-height: 1rem; }
.summary { position: sticky; top: 96px; display: grid; gap: var(--s-200); padding: var(--s-300); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.summary h2 { margin: 0; font-size: 1.25rem; line-height: 1.75rem; }
.sum-rows { display: grid; gap: var(--s-75); margin: 0; font-size: .875rem; line-height: 1.25rem; }
.sum-rows div { display: flex; justify-content: space-between; gap: var(--s-200); }
.sum-rows dt { color: var(--muted); }
.sum-rows dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-200); padding-top: var(--s-200); border-top: 1px solid var(--line); }
.sum-total strong { font-size: 1.5rem; line-height: 2rem; font-variant-numeric: tabular-nums; }
.summary .fine { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1rem; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-400); align-items: start; }
.panel { padding: var(--s-300); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.panel + .panel { margin-top: var(--s-200); }
.panel h2 { margin: 0 0 var(--s-200); font-size: 1.25rem; line-height: 1.75rem; display: flex; align-items: center; gap: var(--s-100); }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-full); background: var(--well); color: var(--ink); font-size: .875rem; line-height: 1.25rem; font-weight: 700; flex: none; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-200); }
.couriers { grid-template-columns: minmax(0, 1fr); }
.stack .tile { display: block; }
.stack .opt { display: flex; font-weight: 500; }
.stack .opt.check { align-items: flex-start; }
.couriers .tile span { flex-direction: row; justify-content: space-between; align-items: center; }
.mini-lines { list-style: none; padding: 0; display: grid; gap: var(--s-100); font-size: .875rem; line-height: 1.25rem; }
.mini-lines li { display: flex; justify-content: space-between; gap: var(--s-200); }
.mini-lines .num { font-weight: 600; }

/* ---------- Order page: the order path ---------- */
.path { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-75); margin: 0 0 var(--s-300); counter-reset: step; }
.path li { display: grid; gap: var(--s-75); font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--muted); }
.path li::before { content: ""; height: 6px; border-radius: var(--r-full); background: var(--well); border: 1px solid var(--line); }
.path li.done::before { background: var(--accent); border-color: var(--accent); }
.path li.now { color: var(--ink); }
.path li.now::before { background: var(--btn); border-color: var(--btn); }
.status { display: flex; gap: var(--s-100); align-items: flex-start; padding: var(--s-200); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); }
.status p, p.status { margin-bottom: 0; }
.status-cancelled, .status-refunded { background: var(--alert-bg); border-color: var(--alert-line); color: var(--alert-ink); }
.ref { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pay { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-200); align-items: start; }
.pay .ic { width: 40px; height: 40px; color: var(--sigil); }
.pay p { margin: 0 0 var(--s-75); }
.amount { font-size: 1.5rem; line-height: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.receipts { list-style: none; padding: 0; display: grid; gap: var(--s-75); }
.receipts li { padding: var(--s-100) var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); font-size: .875rem; line-height: 1.25rem; }

/* ---------- Notices ---------- */
.notice { padding: var(--s-100) var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--well); }
.notice p:last-child { margin-bottom: 0; }
.alert { padding: var(--s-100) var(--s-200); border: 1px solid var(--alert-line); border-radius: var(--r-xl); background: var(--alert-bg); color: var(--alert-ink); margin-bottom: var(--s-200); }
.alert ul { margin: 0; padding-left: 1.2em; }

/* ---------- Home: steps and questions ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-300); counter-reset: step; }
.steps li { position: relative; padding: var(--s-300); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.steps .ic-well { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--well); color: var(--ink); margin-bottom: var(--s-300); }
.steps .ic-well .ic { width: 24px; height: 24px; }
.steps h3 { font-size: 1.25rem; line-height: 1.75rem; margin-bottom: var(--s-75); }
.steps p { margin: 0; color: var(--muted); }
.steps li::after { counter-increment: step; content: counter(step); position: absolute; top: var(--s-300); right: var(--s-300); font-size: .75rem; line-height: 1rem; font-weight: 700; color: var(--muted); }
.faq { display: grid; gap: var(--s-100); max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); padding: var(--s-200) var(--s-300); cursor: pointer; font-weight: 600; list-style: none; border-radius: var(--r-2xl); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq details p { padding: 0 var(--s-300) var(--s-200); margin: 0; color: var(--muted); max-width: 680px; }
.close { text-align: center; }
.close .flourish { margin: 0 auto var(--s-300); }
.close h2 { margin: 0 auto var(--s-200); max-width: 680px; font-size: 2.25rem; line-height: 2.5rem; }
.close p { max-width: 560px; margin: 0 auto var(--s-400); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s-700); border-top: 1px solid var(--line); background: var(--surface); padding: var(--s-500) 0; font-size: .875rem; line-height: 1.25rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-400); }
.site-footer strong { color: var(--ink); }
.footer-nav { list-style: none; padding: 0; display: grid; gap: var(--s-75); justify-items: start; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }
.site-footer .brand { margin-bottom: var(--s-200); }
.legal { margin-top: var(--s-300); padding-top: var(--s-200); border-top: 1px solid var(--line); }

/* ---------- Setup check (renders in this layout) ---------- */
.badge { display: inline-block; min-width: 4.5em; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); border: 1px solid currentColor; font-size: .75rem; line-height: 1rem; text-align: center; font-weight: 600; }
.badge-ok { color: #2F5A1E; } .badge-warn { color: #7A4F00; } .badge-fail { color: #A02018; }
@media (prefers-color-scheme: dark) { .badge-ok { color: #A8D88E; } .badge-warn { color: #F0B84A; } .badge-fail { color: #FF8A80; } }
tr.check-fail td { background: var(--alert-bg); }
tr.check-warn td:last-child { color: var(--muted); }
.status-verified { border-color: var(--line-strong); }

/* ---------- Error pages ---------- */
.lost { text-align: center; padding: var(--s-900) 0; }
.lost .sigil { margin: 0 auto var(--s-300); width: 72px; height: 72px; }
.lost .sigil svg { width: 36px; height: 36px; }
.lost p { color: var(--muted); }
.lost .hero-actions { justify-content: center; margin: var(--s-300) 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .product { grid-template-columns: minmax(0, 1fr); gap: var(--s-400); }
  .item-frame { position: static; grid-template-columns: 160px minmax(0, 1fr); align-items: center; }
  .bench, .checkout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 var(--s-200); }
  .site-header { padding: var(--s-75) var(--s-200) 0; }
  .block { padding: var(--s-600) 0; }
  .hero { padding: var(--s-600) 0 var(--s-600); }
  .hero h1 { font-size: 2.25rem; line-height: 2.5rem; }
  .product-info h1 { font-size: 1.875rem; line-height: 2.25rem; }
  main h1 { font-size: 1.875rem; line-height: 2.25rem; }
  .close h2 { font-size: 1.875rem; line-height: 2.25rem; }
  .hero-actions .btn, .buy .btn, .summary .btn, .checkout .btn, .stack .btn, .lost .btn { width: 100%; }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-100); }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 0; }
  .item-frame { grid-template-columns: 96px minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s-200); }
  .line { grid-template-columns: 44px minmax(0, 1fr); }
  .line .sigil { width: 44px; height: 44px; }
  .line-total { grid-column: 2; text-align: left; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .search { max-width: none; }
  .table th, .table td { padding: var(--s-75) var(--s-100); }

  /* Phone menu: with JS the links move into a full height panel */
  .js .menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-lg); background: transparent; color: var(--ink); cursor: pointer; }
  .menu-toggle .bars { position: relative; width: 18px; height: 12px; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .5s var(--ease); }
  .menu-toggle .bars::before { top: 2px; }
  .menu-toggle .bars::after { bottom: 2px; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-3px) rotate(-45deg); }
  .bar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: var(--s-100); }
  .brand { font-size: 1rem; line-height: 1.5rem; }
  .js .nav { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--s-75); padding: 96px var(--s-300) var(--s-300); background: var(--nav-bg); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }
  .js .nav.open { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .js .nav a { font-size: 1.25rem; line-height: 1.75rem; min-height: 56px; padding: var(--s-100) var(--s-200); opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js .nav.open a { opacity: 1; transform: none; }
  .js .nav.open a:nth-child(2) { transition-delay: 60ms; }
  .js body.menu-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  a.card:hover, a.slot:hover, .btn:hover, .btn:active, .tile:hover span { transform: none; }
  .js .nav a { transform: none; }
}

.page-head + .block { padding-top: var(--s-200); }

/* Category tones: each element gets its own shade of the brand greens in its well */
.cat-metabolic { --tone: #00C853; } .cat-recovery { --tone: #0E8F4A; } .cat-longevity { --tone: #064D2E; }
.cat-cognitive { --tone: #2BAE66; } .cat-endocrine { --tone: #0B6B3E; } .cat-cosmetic { --tone: #7ADFA4; } .cat-prep { --tone: var(--line-strong); }
[class*="cat-"] .sigil { background: color-mix(in srgb, var(--tone, var(--well)) 32%, var(--surface)); }
@media (prefers-color-scheme: dark) { [class*="cat-"] .sigil { background: color-mix(in srgb, var(--tone, var(--well)) 16%, var(--surface)); } }
p.status, p.notice, .alert { margin: 0 0 var(--s-200); }


/* ---------- Peptigen Labs brand (logo lockup) ---------- */
.brand-logo { display: block; height: 40px; width: auto; }
.site-footer .brand-logo { height: 44px; }
.eyebrow, .caption-3 { letter-spacing: .1em; }
.eyebrow .ic, .facts-strip .ic { color: var(--sigil); }
.hero h1 { font-weight: 800; letter-spacing: -0.035em; }
.card-title, .slot-name { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.card-price { color: var(--green-ink); }

/* ---------- Product shots: a pre-rendered vial on every card ---------- */
.shot {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-xl);
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--tone, var(--accent)) 14%, var(--surface)), var(--surface) 70%);
}
.shot::before, .shot::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--sigil); opacity: .45; z-index: 1; }
.shot::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.shot::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.shot img { position: absolute; left: 0; top: 4%; width: 100%; height: 96%; max-width: none; object-fit: contain; transition: transform .6s var(--ease); }
a.card:hover .shot img { transform: translateY(-4px) scale(1.03); }
.shot .shot-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 6px); opacity: 0; z-index: 1;
  padding: 2px 10px; border-radius: var(--r-full); background: var(--btn); color: var(--btn-ink);
  font-size: .6875rem; line-height: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
a.card.hover-arming .shot .shot-hint { opacity: 1; transform: translate(-50%, 0); }
.shot .shot-hint::before { content: ""; display: inline-block; width: 0; height: 2px; margin-right: 6px; vertical-align: middle; background: currentColor; }
a.card.hover-arming .shot .shot-hint::before { width: 18px; transition: width var(--arm, 1.2s) linear; }

/* The enlarged 3D view that opens over a card after a short hover */
.vial-pop {
  position: fixed; z-index: 60; left: 0; top: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto;
  border-radius: var(--r-3xl); background: var(--pop-bg); box-shadow: var(--pop-shadow); border: 1px solid var(--line);
  overflow: hidden; opacity: 0; transform-origin: 0 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .55s var(--ease);
}
.vial-pop.open { opacity: 1; pointer-events: auto; }
.vial-pop .stage { position: relative; min-height: 0; cursor: grab; }
.vial-pop .stage:active { cursor: grabbing; }
.vial-pop canvas, .vial-pop .stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.vial-pop canvas { opacity: 0; transition: opacity .4s var(--ease); touch-action: none; }
.vial-pop.live canvas { opacity: 1; }
.vial-pop.live .stage img { opacity: 0; transition: opacity .4s var(--ease) .1s; }
.vial-pop .pop-cap { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-100); padding: var(--s-100) var(--s-200) var(--s-200); border-top: 1px solid var(--line); }
.vial-pop .pop-name { font-family: var(--display); font-weight: 800; font-size: 1.125rem; line-height: 1.5rem; letter-spacing: -0.01em; }
.vial-pop .pop-meta { color: var(--muted); font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
.vial-pop .pop-meta b { color: var(--green-ink); }

/* Product page: the interactive vial in the item frame */
.vial-view { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; background: var(--pop-bg); }
.vial-view img, .vial-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.vial-view canvas { opacity: 0; transition: opacity .5s var(--ease); cursor: grab; touch-action: pan-y; }
.vial-view canvas:active { cursor: grabbing; }
.vial-view.live canvas { opacity: 1; }
.vial-view.live img { visibility: hidden; transition: visibility 0s .5s; }
.vial-view .vial-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: var(--r-full);
  background: var(--btn); color: var(--btn-ink); font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap;
  opacity: 0; transition: opacity .4s var(--ease); pointer-events: none;
}
.vial-view.live .vial-hint { opacity: .92; }
.vial-view.touched .vial-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .vial-pop, .vial-pop canvas, .shot img { transition: none; }
  a.card:hover .shot img { transform: none; }
}
@media (max-width: 900px) { .item-frame .vial-view { aspect-ratio: 1 / 1; } }
@media (max-width: 900px) { .item-frame.has-vial { grid-template-columns: minmax(0, 1fr); } .item-frame.has-vial .vial-view { max-width: 420px; margin: 0 auto; } }
