@font-face {
  font-family: Archivo;
  src: url("/archivo.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #fff;
  --ink: #10131c;
  --muted: #52596c;
  --line: #dde1ec;
  --cobalt: #1f3bff;
  --cobalt-deep: #1831d8;
  --coral: #ff5a3c;
  --soft: #f2f4ff;
  --error: #9e2429;
  --body: Archivo, system-ui, sans-serif;
  --gutter: clamp(1rem, 5vw, 3.5rem);
  --masthead-height: 5.25rem;
}

* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--masthead-height) + 1rem); }
body { margin: 0; background: var(--surface); color: var(--ink); font: 1rem/1.55 var(--body); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; }
button, input { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(100%, 83rem); margin-inline: auto; padding-inline: var(--gutter); }
.masthead { position: sticky; top: 0; z-index: 3; color: #fff; background: var(--cobalt); border-bottom: 1px solid #ffffff36; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--masthead-height); }
.brand { display: inline-flex; align-items: center; padding-block: .2rem; }
.brand-logo { display: block; width: clamp(9rem, 44vw, 12rem); max-width: 100%; height: auto; }
.nav-actions { display: flex; align-items: center; gap: .2rem; }
.nav-actions a { display: grid; place-items: center; min-height: 2.75rem; padding-inline: .72rem; border-radius: .55rem; font-size: .9rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-actions a:hover { background: #ffffff24; }

.hero { background: var(--cobalt); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: end; column-gap: clamp(1rem, 2vw, 2.25rem); }
.hero-copy { align-self: center; padding-block: clamp(2.3rem, 5.5vw, 5.3rem); }
.research-notice { color: #fff; font-size: 1rem; font-weight: 750; margin-bottom: .85rem; }
.hero h1 { font-size: clamp(2.85rem, 5.5vw, 5.2rem); line-height: .97; letter-spacing: -.055em; font-weight: 900; text-wrap: balance; max-width: 10ch; }
.hero-description { color: #fff; margin-top: 1.1rem; max-width: 35ch; font-size: clamp(1rem, 1.45vw, 1.16rem); }
.hero .button { margin-top: 1.45rem; }
.shelf { display: block; width: 100%; height: auto; overflow: visible; }
.shelf .v { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.shelf .v:nth-last-child(4) { animation-delay: .08s; }
.shelf .v:nth-last-child(3) { animation-delay: .16s; }
.shelf .v:nth-last-child(2) { animation-delay: .24s; }
.shelf .v:last-child { animation-delay: .32s; }
.shelf .cap-coral { --cap: var(--coral); }
.shelf .cap-white { --cap: #fff; }
.shelf .vial-cap { fill: var(--cap, var(--coral)); }
@keyframes rise { from { transform: translateY(1.8rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shelf .v { animation: none; }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.8rem;
  padding: .55rem 1rem;
  white-space: nowrap;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 750;
  font-size: .9rem;
  line-height: 1.15;
  text-decoration: none;
}
.button-primary { background: var(--cobalt); color: #fff; }
.button-primary:hover:enabled { background: var(--cobalt-deep); }
.button-coral { background: var(--coral); color: var(--ink); padding-inline: 1.3rem; min-height: 3rem; }
.button-coral:hover { background: #ff795f; }
.button-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-outline:hover:enabled { background: var(--soft); border-color: #bfc7f1; }
.button-icon { padding: .55rem; border-color: var(--line); color: var(--ink); background: transparent; }
.button-icon:hover:enabled { background: var(--soft); }

.inventory-wrap { padding-top: 1.75rem; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--soft); border: 1.5px solid #e1e6fd; border-radius: 1rem; margin-bottom: clamp(1.7rem, 3.5vw, 3.2rem); }
.metric { padding: .65rem 1.4rem .72rem; }
.metric + .metric { border-inline-start: 1.5px solid #dce1fa; }
.metric-label { color: var(--muted); font-size: .875rem; font-weight: 700; }
.metric-value { color: var(--cobalt-deep); font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 900; font-variant-numeric: tabular-nums; }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.75rem); font-weight: 900; letter-spacing: -.04em; }
.panel-actions { display: flex; align-items: center; gap: .55rem; }
.search {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding-left: .75rem;
  color: var(--muted);
  border: 1.5px solid var(--line);
  border-radius: .65rem;
  min-height: 2.8rem;
}
.search:focus-within { outline: 3px solid var(--coral); outline-offset: 2px; }
.search input { width: min(24vw, 12.5rem); color: var(--ink); border: 0; outline: 0; background: transparent; padding: .55rem .55rem .55rem 0; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.feedback:empty { display: none; }
.feedback { border: 1.5px solid #d8e2fa; border-radius: .65rem; color: #243b81; background: var(--soft); padding: .55rem .85rem; font-size: .9rem; margin-bottom: 1rem; }
.feedback[data-error] { color: var(--error); background: #fff0ed; border-color: #f3d5d0; }
.empty { display: grid; min-height: 15rem; align-content: center; justify-items: center; border: 1.5px dashed #cad1e7; border-radius: 1rem; padding: 2rem 1.15rem; text-align: center; }
.empty h3 { font-size: 1.45rem; font-weight: 850; letter-spacing: -.025em; }
.empty p { color: var(--muted); margin-top: .45rem; }
.empty .button { margin-top: 1rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); grid-auto-rows: 1fr; gap: 1rem; }
.product-label {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.label-head { min-height: 4.2rem; display: flex; justify-content: space-between; align-items: start; gap: .5rem; }
.product-label h3 { font-size: 1.35rem; line-height: 1.14; font-weight: 850; letter-spacing: -.027em; }
.product-meta { margin-top: .25rem; color: var(--muted); font-size: .9rem; }
.edit { min-height: 2.75rem; padding-inline: .8rem; flex: 0 0 auto; }
.label-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem; padding-top: .75rem; border-top: 1.5px dashed var(--line); }
.label-field { display: grid; gap: .28rem; }
.label-field:not(:first-child) .field-label { min-height: 2.1rem; }
.field-label { color: var(--muted); font-size: .875rem; line-height: 1.2; font-weight: 700; }
.amount { font-size: 1.16rem; line-height: 2.7rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.label-fields > :first-child { grid-column: 1 / -1; }
.amount.per-vial:not(.missing) { color: #167044; }
.card-pricing { display: grid; gap: .28rem; margin-top: auto; padding-top: .85rem; font-size: .875rem; }
.card-pricing em { color: var(--muted); }
.product-grid:has(.teaching-notes[open]) { grid-auto-rows: auto; }
.amount.missing { color: var(--muted); font-weight: 600; }
.stepper {
  display: inline-grid;
  grid-template-columns: 2.55rem minmax(2rem, auto) 2.55rem;
  align-items: stretch;
  overflow: clip;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: .62rem;
  text-align: center;
  width: max-content;
  max-width: 100%;
  min-height: 2.75rem;
}
.stepper button { border: 0; background: var(--soft); color: var(--cobalt-deep); font-size: 1.25rem; font-weight: 750; line-height: 1; }
.stepper button:hover:enabled { background: #dfe5ff; }
.stepper button:focus-visible { outline-offset: -4px; }
.stepper output { display: grid; place-items: center; padding-inline: .3rem; border-inline: 1.5px solid var(--line); color: var(--ink); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.teaching-notes { margin-top: .75rem; border-top: 1.5px dashed var(--line); color: var(--muted); font-size: .9rem; }
.teaching-notes summary { color: var(--cobalt-deep); cursor: pointer; font-weight: 750; padding: .7rem 0 .12rem; }
.teaching-notes summary:hover { text-decoration: underline; text-underline-offset: .18em; }
.teaching-notes ul { margin: .55rem 0 0; padding-left: 1.15rem; }
.teaching-notes li + li, .teaching-notes p { margin-top: .38rem; }
.teaching-notes strong { color: var(--ink); }

footer { border-top: 1.5px solid var(--line); color: var(--muted); padding-block: 1.35rem; font-size: .875rem; }
.footer-inner { display: flex; justify-content: space-between; gap: .75rem 2rem; }
.footer-inner span { color: var(--ink); font-weight: 850; white-space: nowrap; }
.footer-inner p { max-width: 76ch; }
.footer-inner strong { color: var(--ink); }

dialog { color: var(--ink); background: var(--surface); width: min(30rem, calc(100% - 1.75rem)); max-height: calc(100% - 2rem); border: 1.5px solid var(--line); border-radius: 1rem; padding: 1.5rem; box-shadow: 0 1rem 4rem #11183c3d; }
dialog::backdrop { background: #1016319c; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.15rem; }
.dialog-head h2 { font-size: 1.75rem; }
.field { display: flex; flex-direction: column; gap: .38rem; margin-bottom: .8rem; font-size: .9rem; font-weight: 750; }
.field input { width: 100%; min-height: 2.8rem; color: var(--ink); background: #fff; padding: .52rem .67rem; border: 1.5px solid var(--line); border-radius: .5rem; font-size: 1rem; font-weight: 400; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.optional { color: var(--muted); font-weight: 450; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.3rem; }
.form-error { color: var(--error); font-size: .9rem; }

.icon { position: relative; display: inline-block; width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.icon-plus::before, .icon-plus::after, .icon-close::before, .icon-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: .78rem; height: 1.5px; background: currentColor; border-radius: 1rem; transform: translate(-50%, -50%); }
.icon-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.icon-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.icon-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.icon-search::before { position: absolute; content: ""; width: .52rem; height: .52rem; top: .07rem; left: .06rem; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-search::after { position: absolute; content: ""; width: .33rem; height: 1.5px; top: .72rem; left: .61rem; background: currentColor; transform: rotate(45deg); }
.icon-refresh { font: 1.25rem/.91 var(--body); text-align: center; }

@media (max-width: 740px) {
  html { scroll-padding-top: 1rem; }
  .masthead { position: static; }
  .masthead-inner { flex-direction: column; gap: 0; padding-block: .75rem .35rem; }
  .brand { width: min(100%, 24rem); padding: 0; }
  .brand-logo { width: 100%; }
  .nav-actions { justify-content: center; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-block: 2rem .65rem; }
  .hero h1 { max-width: 100%; }
  .hero .button { margin-top: .95rem; }
  .shelf { width: min(100%, 28rem); justify-self: end; }
  .panel-head { flex-wrap: wrap; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .masthead-inner { gap: .3rem; }
  .nav-actions { gap: 0; }
  .nav-actions a { padding-inline: .47rem; }
  .summary { margin-bottom: 1.45rem; }
  .metric { padding-inline: .65rem; }
  .panel-actions { width: 100%; gap: .35rem; }
  .search { flex: 1 1 7rem; padding-left: .49rem; gap: .23rem; }
  .search input { width: 100%; }
  .panel-actions .button { padding-inline: .63rem; }
  .refresh-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .button-refresh { flex-shrink: 0; }
}

@media (max-width: 340px) {
  .panel-actions .icon-plus { display: none; }
  .metric-label { font-size: .82rem; }
}
