/* Chainwell — "Laboratory" design. IBM Plex is self-hosted (SIL OFL 1.1). */
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 700; font-display: swap; src: url(/fonts/plex-sans-700.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-500.woff2) format("woff2"); }

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #FBFCFD;
  --tint: #EEF2F7;
  --ink: #0C1A2A;
  --ink-2: #445163;
  --muted: #556272;
  --faint: #8592A3;
  --line: #E2E6EB;
  --line-2: #CDD4DD;
  --accent: #1D4ED8;
  --accent-ink: #FFFFFF;
  --ok: #0B7A55;
  --ok-ink: #0B6B4B;
  --ok-bg: #E7F4EE;
  --bolt: #F5B83D;
  --bolt-ink: #B45309;
  --bad: #B42318;
  --radius: 14px;
  --font: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --shadow: 0 24px 60px rgba(12, 26, 42, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
main.wrap { padding-top: 32px; padding-bottom: 88px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); letter-spacing: -0.01em; }
.right { text-align: right; }
.center { text-align: center; justify-content: center; }
.strong { font-weight: 600; }
.break { word-break: break-all; }
.warn { color: var(--bolt-ink); }
.row { display: flex; align-items: flex-end; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.gap { gap: 12px; }
.grow { flex: 1 1 200px; }
.inline { display: inline; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; line-height: 1.6; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .5em; margin-bottom: 8px; }
.bolt { width: .7em; height: .95em; fill: var(--bolt); flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.ok { stroke: var(--ok); stroke-width: 2.4; }

/* Badges */
.badge-ok { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; background: var(--ok-bg); color: var(--ok-ink); font-size: .82rem; font-weight: 600; border-radius: 999px; padding: 6px 14px; }
.badge-ok .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.spec-tag { font: .78rem var(--mono); color: var(--ink-2); background: var(--tint); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }

/* Bars, header, footer */
.ruo-bar { background: var(--ink); color: #DCE3EC; font-size: .75rem; letter-spacing: .04em; text-align: center; padding: 8px 16px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.logo-tile { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.logo-tile svg { width: 14px; height: 18px; fill: #fff; }
.wordmark em { font-style: normal; font-weight: 500; font-size: .85rem; color: var(--muted); }
.nav-links { display: flex; gap: 32px; font-size: .95rem; }
.nav-links a { text-decoration: none; }
.cart-pill { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; font-size: .95rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; min-height: 44px; }
.cart-pill .count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 600; padding: 1px 8px; }
.admin-nav { display: flex; gap: 24px; align-items: center; font-size: .95rem; }
.admin-nav a { text-decoration: none; color: var(--muted); }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 48px; padding-bottom: 48px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.site-footer nav a { text-decoration: none; }
.site-footer .brand { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.site-footer p { font-size: .82rem; color: var(--muted); line-height: 1.6; max-width: 46em; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 10px; padding: 0 24px; min-height: 52px; font: 600 1rem var(--font); cursor: pointer; text-decoration: none; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); font-weight: 500; }
.btn.ghost:hover { border-color: var(--ink); filter: none; color: var(--ink); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .85rem; }
.btn .icon { width: 16px; height: 16px; stroke-width: 2.2; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 500; margin-bottom: 16px; }
input, select, textarea { font: 400 1rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; min-height: 48px; width: 100%; }
textarea { padding: 12px 14px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.qty { width: 84px; text-align: right; }
fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; padding: 0; }
.check { flex-direction: row !important; align-items: flex-start; gap: 12px !important; font-weight: 400 !important; font-size: .95rem !important; line-height: 1.5; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 24px; display: flex; gap: 12px; }
.notice::before { content: ""; width: 4px; border-radius: 2px; background: var(--bolt); flex: none; }
.notice div p:last-child { margin: 0; }
.narrow { max-width: 400px; margin: 40px auto; }

/* Home: hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding: 48px 0 64px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0; }
.hero .lede { margin: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.ticks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .9rem; color: var(--ink-2); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks .icon { width: 16px; height: 16px; }
.spec-card-wrap { position: relative; }
.spec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.spec-card header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 12px; }
.spec-card header small { display: block; font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.spec-card header strong { font-size: 1.05rem; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; padding: 22px 24px 4px; }
.res { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.res b { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font: 500 .72rem var(--mono); }
.res.pro b { background: var(--ink); color: #fff; }
.res.acid b { background: #DCE6FB; }
.res.base b { background: #FDF1D8; }
.res i { font: normal .62rem var(--mono); color: var(--faint); }
.res.mod b { font-size: .56rem; letter-spacing: -0.04em; outline: 1.5px dashed var(--faint); outline-offset: 1px; }
.res.pro.mod b { outline-color: var(--ink); }
.chain-legend { display: flex; justify-content: space-between; font: .7rem var(--mono); color: var(--faint); padding: 6px 24px 16px; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec-grid div { padding: 14px 24px; border-bottom: 1px solid var(--line); }
.spec-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.spec-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.spec-grid small { display: block; font-size: .75rem; color: var(--muted); }
.spec-grid span { font: 500 1rem var(--mono); word-break: break-word; }
.spec-card-wrap { padding-bottom: 64px; }
.float-chip { position: absolute; right: 24px; bottom: 0; background: var(--ink); color: #fff; border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 30px rgba(12, 26, 42, .25); }
.float-chip svg { width: 16px; height: 20px; fill: var(--bolt); }
.float-chip strong { display: block; font-size: .9rem; }
.float-chip small { color: #A9B6C6; font-size: .75rem; }

/* Home: trust strip */
.trust { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.trust-item strong { display: block; font-size: .95rem; }
.trust-item span { font-size: .875rem; color: var(--muted); }

/* Catalog */
.section { padding-top: 72px; padding-bottom: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 6px; }
.section-head p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on:hover { color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 28px 24px; }
.card { --k: var(--tint); --k-ink: var(--ink); position: relative; background: var(--surface); border: 1px solid #D3DAE3; border-radius: var(--radius); text-decoration: none; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 1px 2px rgba(12, 26, 42, .05), 0 4px 14px rgba(12, 26, 42, .04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--k-bar, var(--line-2)); }
.card:hover { border-color: var(--ink); color: var(--ink); box-shadow: 0 14px 34px rgba(12, 26, 42, .10); transform: translateY(-2px); }
/* Compound-type colour coding (also used by the filter chips) */
.k-short { --k: #FDF1D8; --k-ink: #7A4A00; --k-bar: #E9A93A; }
.k-oligo { --k: #DCE6FB; --k-ink: #1E3A8A; --k-bar: #4C7BE8; }
.k-long { --k: #DDF1E6; --k-ink: #0B5A3E; --k-bar: #2E9E6E; }
.k-complex { --k: #E9E3F8; --k-ink: #4C2C92; --k-bar: #8A6AD8; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k-bar); margin-right: 8px; flex: none; }
.chip.on .dot { box-shadow: 0 0 0 2px #fff; }
.card-top { padding: 26px 22px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.code-tile { width: 52px; height: 52px; border-radius: 10px; background: var(--k); color: var(--k-ink); display: grid; place-items: center; font: 600 .9rem var(--mono); }
.card h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.015em; }
.card .kind { font-size: .875rem; color: var(--muted); margin-top: 2px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizes span { font: .8rem var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--ink-2); }
.card-foot { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); }
.card-foot strong { display: block; font-size: 1.05rem; }
.card-foot small { font: .75rem var(--mono); color: var(--muted); }
.card-foot .go { font-size: .875rem; font-weight: 600; color: var(--accent); }
.empty-state { text-align: center; padding: 64px 0; color: var(--muted); }

/* How it works + FAQ */
.how { background: var(--ink); color: #fff; border-radius: 20px; padding: 56px 48px; margin: 72px 0; }
.how-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.how h2 { margin: 0; max-width: 16em; }
.how-head span { color: #A9B6C6; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #2A3A4E; padding-top: 20px; }
.steps .n { font: 500 .875rem var(--mono); color: var(--bolt); }
.steps strong { font-size: 1.2rem; }
.steps span:last-child { color: #A9B6C6; font-size: .95rem; line-height: 1.6; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; padding-bottom: 32px; }
.faq h2 { font-size: 1.75rem; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 600; font-size: 1.05rem; cursor: pointer; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Product */
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.product-media { display: flex; flex-direction: column; gap: 20px; }
.vial-panel { background: radial-gradient(120% 90% at 50% 18%, #FFFFFF 0%, #F1F4F8 62%, #E6EBF1 100%); border: 1px solid var(--line); border-radius: 16px; aspect-ratio: 16 / 13; max-height: 520px; display: grid; place-items: center; overflow: hidden; position: relative; }
.vial-panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(180deg, rgba(255,255,255,0), rgba(220,226,234,.55)); pointer-events: none; }
.vial-panel img { height: 86%; width: auto; position: relative; z-index: 1; filter: drop-shadow(0 18px 24px rgba(12, 26, 42, .12)); transition: opacity .2s; }
.card-media { margin: -26px -22px 0; height: 200px; display: grid; place-items: center; background: radial-gradient(110% 90% at 50% 15%, #FFFFFF 0%, #F2F5F8 70%, #E9EEF3 100%); border-bottom: 1px solid var(--line); }
.card-media { position: relative; }
.card-media img { height: 176px; width: auto; transition: transform .25s; }
.card-media .spec-tag { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.85); border: 1px solid var(--line); }
.card:hover .card-media img { transform: translateY(-4px) scale(1.03); }
.vial .cap { fill: var(--ink); }
.vial .neck { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.vial .glass { fill: var(--surface-2); stroke: var(--faint); stroke-width: 1.5; }
.vial .label { fill: #fff; stroke: var(--line-2); stroke-width: 1; }
.vial .powder { fill: var(--line); }
.chain-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.chain-panel h4 { padding: 18px 24px 0; margin: 0; }
.buy-box { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.buy-box h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.75rem); }
.buy-box .lede { font-size: 1.05rem; margin: 0; }
.size-opts { display: flex; flex-direction: column; gap: 10px; }
.size-opt { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.size-opt:has(input:checked) { border: 2px solid var(--accent); padding: 11px 17px; }
.size-opt input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
.size-opt .lbl { flex: 1; display: flex; flex-direction: column; }
.size-opt .lbl strong { font-size: 1.05rem; }
.size-opt .lbl small { font: .8rem var(--mono); color: var(--muted); }
.size-opt .price { font-weight: 600; font-size: 1.1rem; min-width: 64px; text-align: right; }
.size-opt.off { opacity: .5; cursor: not-allowed; }
.best { font-size: .72rem; font-weight: 600; color: #fff; background: var(--ink); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.stock-note { font-size: .75rem; color: var(--bolt-ink); font-weight: 600; }
.buy-row { display: flex; gap: 12px; align-items: stretch; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.stepper button { width: 46px; height: 54px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink); }
.stepper input { width: 44px; min-height: 0; height: 54px; border: 0; text-align: center; font-weight: 600; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1; min-height: 56px; font-size: 1.05rem; }
.pay-hint { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.ship-meter { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.meter { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--tint); overflow: hidden; color: var(--ok); }
.meter::-webkit-progress-bar { background: var(--tint); border-radius: 3px; }
.meter::-webkit-progress-value { background: var(--ok); border-radius: 3px; }
.meter::-moz-progress-bar { background: var(--ok); border-radius: 3px; }
.spec-card { display: block; text-decoration: none; color: var(--ink); }
.spec-card:hover { color: var(--ink); border-color: var(--line-2); }
.buy-head { display: flex; flex-direction: column; gap: 10px; }
.buy-form { display: flex; flex-direction: column; gap: 18px; }
fieldset.flush { margin: 0; }
.desc { margin: 20px 0 0; }
.h-sm { font-size: 1.5rem; }
.update-row { margin: 12px 0 4px; }
.cta-row { margin: 20px 0 0; }
.center-hint { margin: 14px 0 0; justify-content: center; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; color: var(--ink-2); }
.check-list li { display: flex; gap: 10px; align-items: center; }
.ruo-note { font-size: .8rem; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }
.details-tabs { margin-top: 72px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabbar label { height: 48px; padding: 0 20px; display: flex; align-items: center; cursor: pointer; font-weight: 500; font-size: .95rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.details-tabs { position: relative; }
.details-tabs > input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.tab-panel { display: none; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 28px 32px; }
#t1:checked ~ .tabbar label[for=t1], #t2:checked ~ .tabbar label[for=t2], #t3:checked ~ .tabbar label[for=t3] { color: var(--ink); font-weight: 600; border-color: var(--ink); }
#t1:checked ~ .p1, #t2:checked ~ .p2, #t3:checked ~ .p3 { display: block; }
#t1:focus-visible ~ .tabbar label[for=t1], #t2:focus-visible ~ .tabbar label[for=t2], #t3:focus-visible ~ .tabbar label[for=t3] { outline: 2px solid var(--accent); }
.spec-dl { margin: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px 24px; }
.spec-dl dt { color: var(--muted); }
.spec-dl dd { margin: 0; word-break: break-word; }
.related { margin-top: 64px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; text-decoration: none; display: flex; justify-content: space-between; align-items: center; }
.rel:hover { border-color: var(--ink); color: var(--ink); }
.rel strong { display: block; font-size: 1.05rem; }
.rel small { color: var(--muted); font-size: .875rem; }
.rel .go { color: var(--accent); font-weight: 600; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tfoot td { border-bottom: 0; padding: 8px 12px; }
.table .num { text-align: right; white-space: nowrap; }
.table input { min-height: 40px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 16px 0 24px; overflow-x: auto; }
.table-card .table { margin: 0; }
.totals { display: grid; grid-template-columns: auto auto; gap: 8px 0; margin: 0; min-width: 260px; }
.totals dd { margin: 0; text-align: right; padding-left: 32px; }
.totals .grand { font-weight: 600; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 10px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.cart-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.empty { text-align: center; padding: 72px 0; }

/* Checkout steps */
.steps-bar { list-style: none; margin: 0 0 32px; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .875rem; color: var(--muted); }
.steps-bar li { display: flex; align-items: center; gap: 8px; }
.steps-bar .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: .72rem; font-weight: 600; background: var(--surface); }
.steps-bar .done { color: var(--ok-ink); }
.steps-bar .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps-bar .now { color: var(--ink); font-weight: 600; }
.steps-bar .now .dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps-bar .sep { width: 28px; height: 1px; background: var(--line-2); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.checkout .panel { padding: 28px; }
.attest { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 4px; }
.summary { position: sticky; top: 96px; }
.summary h3 { margin-top: 0; }
.lines { list-style: none; padding: 0; margin: 0 0 16px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .95rem; }

/* Pay */
.pay-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.pay-card h1 { font-size: 2.6rem; margin: 0; }
.pay-card .sub { color: var(--ink-2); margin: 0; }
.qr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: relative; }
.qr img { display: block; width: 300px; height: 300px; image-rendering: pixelated; }
.qr .qr-bolt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 12px; background: var(--ink); border: 5px solid #fff; display: grid; place-items: center; }
.qr .qr-bolt svg { width: 16px; height: 22px; fill: var(--bolt); }
.pay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.pay-actions .btn { flex: 1 1 200px; min-height: 54px; }
.invoice-raw { width: 100%; }
.invoice-raw summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
.invoice-raw input { margin-top: 10px; font: .8rem var(--mono); color: var(--muted); }
.status-line { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink-2); margin: 0; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--bolt); box-shadow: 0 0 0 4px #FDF1D8; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(245, 184, 61, .15); } }
.pay-card.is-paid .pulse { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); animation: none; }
.pay-card.is-expired .pulse { background: var(--bad); animation: none; box-shadow: none; }
.dev { margin: 0; }
.dev button { border: 1px dashed var(--line-2); background: none; border-radius: 8px; padding: 8px 14px; font: .8rem var(--mono); color: var(--muted); cursor: pointer; min-height: 44px; }
.side { display: flex; flex-direction: column; gap: 20px; }
.side .panel h2 { font-size: 1.05rem; margin: 0 0 16px; letter-spacing: -0.01em; }
.next-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.next-steps li { display: flex; gap: 14px; font-size: .95rem; line-height: 1.5; }
.next-steps .n { font: 500 .8rem var(--mono); color: var(--bolt-ink); padding-top: 2px; }
.next-steps span span { color: var(--ink-2); }
.side details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.side details summary { font-weight: 600; cursor: pointer; }
.side details p { margin: 12px 0 0; font-size: .9rem; color: var(--ink-2); }
.lock-note { display: flex; gap: 8px; font-size: .8rem; color: var(--muted); margin: 0; }
.lock-note .icon { width: 16px; height: 16px; margin-top: 2px; }

/* Order */
.order-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 24px 0 8px; }
.order-hero .big-check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-bg); display: grid; place-items: center; }
.order-hero .big-check .icon { width: 40px; height: 40px; stroke: var(--ok); stroke-width: 2.6; }
.order-hero .big-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.order-hero .big-mark .icon { width: 36px; height: 36px; stroke: var(--ink-2); }
.order-hero h1 { margin: 0; }
.order-hero .lede { margin: 0 auto; text-align: center; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-top: 32px; align-items: start; }
.facts { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 4px 0; }
.address { font: inherit; white-space: pre-wrap; margin: 0 0 8px; }

/* Prose */
.prose { max-width: 720px; }
.prose h1 { margin-bottom: .6em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }

/* Gate */
.gate { position: fixed; inset: 0; background: rgba(12, 26, 42, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; z-index: 50; }
.gate-card { background: var(--surface); border-radius: 18px; padding: 36px; max-width: 500px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.gate-card h2 { font-size: 1.75rem; margin-bottom: 14px; }
.gate-card p { color: var(--ink-2); font-size: .95rem; }
.gate-card .row { margin-top: 20px; }
body:has(.gate) { overflow: hidden; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.stats strong { font-size: 1.75rem; letter-spacing: -0.03em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 8px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); text-transform: capitalize; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--ink-2); white-space: nowrap; }
.s-paid { background: #DCE6FB; color: #1E3A8A; }
.s-shipped { background: var(--ok-bg); color: var(--ok-ink); }
.s-pending { background: #FDF1D8; color: #7A4A00; }
.s-expired, .s-cancelled { color: var(--muted); }
.s-refunded { background: #FDE8E7; color: var(--bad); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 24px 0; }
.card-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-form h4 { margin-top: 0; }
.card-form .btn { margin-right: 6px; }
.variants-edit input { min-width: 70px; }
.new-row td { background: #F3F6FD; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 24px 0; }
.spec { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }

@media (max-width: 960px) {
  .hero, .product, .checkout, .pay-layout, .order-grid, .cart-layout, .two { grid-template-columns: 1fr; gap: 32px; }
  .buy-box, .summary, .cart-side { position: static; }
  .product .buy-box { order: -1; }
  .vial-panel { aspect-ratio: 16 / 9; }
  .trust .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 28px; }
  .related-grid, .stats { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .how { padding: 36px 24px; border-radius: 16px; }
  .trust .wrap { grid-template-columns: 1fr; }
  .spec-dl { grid-template-columns: 1fr; gap: 2px; }
  .spec-dl dd { margin-bottom: 10px; }
  .qr img { width: 230px; height: 230px; }
  .pay-card { padding: 24px 18px; }
  .steps-bar .lbl { display: none; }
  .chain-legend span:nth-child(2) { display: none; }
  .table thead { display: none; }
  .size-opt { flex-wrap: wrap; }
  .best { order: 5; }
}
