/* ===== motion registers =====
   --el      ELECTRICAL : user-caused state changes, fast attack, no overshoot
   --settle  SETTLING   : arrivals, one measured landing, no bounce
   FLUID motion is eased in JS (motion.js), not here - a CSS curve can't
   lag a moving target the way a per-frame lerp can. */
:root{
  --el:cubic-bezier(.2,.9,.3,1);
  --settle:cubic-bezier(.16,.84,.26,1);
}

/* ---- scroll progress: a filament across the top ---- */
.prog{
  position:fixed;top:0;left:0;right:0;height:2px;z-index:60;
  pointer-events:none;transform:scaleX(0);transform-origin:0 50%;
  background:linear-gradient(90deg,var(--violet-deep),var(--violet),var(--violet-neon));
}

/* ---- panels that carry a lagging specular (motion.js drives --lx/--ly) ---- */
.card,.step,.notice{position:relative;isolation:isolate}
.card::before,.step::before,.notice::before{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  inset:-1px -18px;border-radius:14px;opacity:0;
  transition:opacity .5s ease;
  background:radial-gradient(340px circle at var(--lx,50%) var(--ly,50%),
             rgba(140,35,189,.18),rgba(140,35,189,.04) 42%,transparent 70%);
}
.card:hover::before,.step:hover::before,.notice:hover::before{opacity:1}

/* ===========================================================================
   KRATOS — SHARED SHELL
   Loaded by index, compounds, handling and verify, always AFTER tokens.css.
   Page-specific rules stay inline on each page, after this file, so they win
   on any conflict.

   The calculator deliberately does NOT load this: it is a separate design
   system (the instrument) and only shares tokens.css.
   =========================================================================== */

/* ---------------- base ---------------- */
*{box-sizing:border-box}
/* Any class that sets `display` beats the UA stylesheet's [hidden] rule,
   so an element with both stays in the layout and keeps swallowing
   clicks. This has bitten the contact form, the gate and the order
   dialog; stating it once here ends it. */
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  margin:0;
  background:var(--black);
  color:var(--white);
  font-family:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}
a{color:inherit}

.serif{
  font-family:"Fraunces",Georgia,serif;
  font-variation-settings:"SOFT" 28,"WONK" 0;
  font-weight:600;
  letter-spacing:-.02em;
}
.tnum{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}

/* Pages set their own measure by overriding --wrap. */
.wrap{max-width:var(--wrap,1120px);margin:0 auto;padding:0 22px}

/* ---------------- atmosphere ----------------
   Three layers of almost nothing. Pools of deep violet drifting on a 72s
   cycle give the page depth; a molecular lattice ties the texture back to
   the chain in the mark; grain sits on top, which adds tooth and also stops
   the big gradients banding on 8-bit panels. All of it sits behind content
   at z-index -1 and is individually faint enough that you read it as
   atmosphere rather than as a pattern. */
body::before{
  content:"";position:fixed;inset:-20%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(42% 38% at 16% 10%, rgba(140,35,189,.17), transparent 70%),
    radial-gradient(38% 34% at 88% 32%, rgba(72,0,120,.22),  transparent 72%),
    radial-gradient(48% 42% at 58% 90%, rgba(140,35,189,.11), transparent 72%);
  animation:drift 72s ease-in-out infinite alternate;
}
@keyframes drift{
  from{transform:translate3d(-1.6%,-1.1%,0) scale(1.02)}
  to  {transform:translate3d( 1.6%, 1.4%,0) scale(1.09)}
}
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='96'%20height='96'%3E%3Cg%20stroke='%23A855F7'%20stroke-width='.7'%20fill='none'%20opacity='.07'%3E%3Cpath%20d='M0%200L48%2048L96%200M0%2096L48%2048L96%2096'/%3E%3C/g%3E%3Cg%20fill='%23A855F7'%20opacity='.11'%3E%3Ccircle%20cx='48'%20cy='48'%20r='1.5'/%3E%3Ccircle%20cx='0'%20cy='0'%20r='1.5'/%3E%3Ccircle%20cx='96'%20cy='0'%20r='1.5'/%3E%3Ccircle%20cx='0'%20cy='96'%20r='1.5'/%3E%3Ccircle%20cx='96'%20cy='96'%20r='1.5'/%3E%3C/g%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.82'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='240'%20height='240'%20filter='url%28%23n%29'%20opacity='.05'/%3E%3C/svg%3E");
  background-size:96px 96px,240px 240px;
  background-repeat:repeat,repeat;
  /* let the lattice thin out behind the middle of the page so it never
     competes with body copy */
  -webkit-mask-image:radial-gradient(130% 95% at 50% 40%,transparent 18%,#000 72%);
  mask-image:radial-gradient(130% 95% at 50% 40%,transparent 18%,#000 72%);
}
@media(prefers-reduced-motion:reduce){
  body::before{animation:none}
}

/* keyboard users land here first and can jump straight past the nav */
.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--violet);color:var(--white);
  padding:12px 18px;border-radius:0 0 10px 0;
  font-size:14px;font-weight:700;text-decoration:none;
}
.skip:focus{left:0}

/* ---------------- nav ---------------- */
/* ---- the research-use label ----
   This rides inside the sticky nav rather than sitting in the footer, so
   it is on screen at every scroll position on every page. An audit found
   three pages where the only notice lived 82-94% of the way down: a
   reader could go through the entire compound reference without meeting
   it. A label that has to be scrolled to is not a label. */
.ruo-bar{
  margin:0;background:var(--violet-deep);color:#fff;
  font-size:10.5px;font-weight:800;letter-spacing:.13em;
  text-transform:uppercase;text-align:center;white-space:nowrap;
  padding:6px 16px 5px;line-height:1.35;
  border-bottom:1px solid rgba(255,255,255,.14);
}
/* kept to one line; at 22 characters it fits comfortably from 320px up,
   so it holds one size at every width rather than stepping down. */

.nav{
  transition:background .3s ease,border-color .3s ease,box-shadow .3s ease;
  position:sticky;top:0;z-index:40;
  background:rgba(0,0,0,.9);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--rule);
}
.nav.dense{
  background:rgba(0,0,0,.72);
  border-bottom-color:var(--rule-hi);
  box-shadow:0 1px 0 rgba(140,35,189,.22),0 10px 30px -18px rgba(0,0,0,.9);
}
.nav-in{
  max-width:1180px;margin:0 auto;padding:12px 22px;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand img{width:30px;height:30px;display:block;
  transition:transform .5s var(--settle),filter .3s var(--el)}
.brand:hover img{transform:rotate(-7deg) scale(1.08);filter:brightness(1.2)}
.brand b{font-size:18px;font-weight:800;letter-spacing:.15em}

.nav-right{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.nav-link{
  text-decoration:none;font-size:13px;font-weight:700;color:var(--white);
  border:1px solid var(--rule-hi);border-radius:999px;padding:8px 14px;
  white-space:nowrap;
  transition:background .15s var(--el),border-color .15s var(--el),color .15s var(--el);
}
.nav-link:hover{background:var(--violet);border-color:var(--violet)}
.nav-link[aria-current=page]{background:var(--violet);border-color:var(--violet)}
.nav-link:focus-visible{outline:2px solid var(--violet-lit);outline-offset:2px}

/* ---------------- page head ---------------- */
.head{padding:50px 0 0}
.head h1{margin:0;font-size:clamp(32px,6.4vw,58px);line-height:1.04;max-width:18ch}
.head p{margin:20px 0 0;max-width:62ch;color:var(--dim);font-size:17px}

/* ---------------- sections ---------------- */
.sec{padding:64px 0 0}
.sec-cap{font-size:11px;letter-spacing:.18em;font-weight:700;color:var(--violet-lit);margin:0 0 14px}
.sec h2{margin:0;font-size:clamp(26px,4.2vw,38px);line-height:1.12;max-width:24ch}
.sec .lede{margin:18px 0 0;max-width:64ch;font-size:16.5px;color:var(--dim)}

/* ---------------- buttons ---------------- */
.btn{
  text-decoration:none;font-size:15.5px;font-weight:700;
  padding:14px 26px;border-radius:999px;border:1px solid transparent;
  display:inline-block;cursor:pointer;
  position:relative;overflow:hidden;
  transition:filter .14s var(--el),border-color .14s var(--el),
             background .14s var(--el),transform .1s var(--el),
             box-shadow .2s var(--el);
}
/* a highlight that tracks the cursor inside the control */
.btn::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:0;
  transition:opacity .28s ease;
  background:radial-gradient(84px circle at var(--bx,50%) var(--by,50%),
             rgba(255,255,255,.28),transparent 68%);
}
.btn:hover::before{opacity:1}
.btn-line:hover::before{
  background:radial-gradient(84px circle at var(--bx,50%) var(--by,50%),
             rgba(184,90,232,.40),transparent 68%);
}
/* a single charge across the solid button on hover - one sweep, no loop */
.btn-solid::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 38%,
             rgba(255,255,255,.26) 50%,transparent 62%);
  transform:translateX(-120%);
}
.btn-solid:hover::after{transform:translateX(120%);transition:transform .62s var(--settle)}
.btn-solid:hover{box-shadow:0 6px 22px -10px rgba(140,35,189,.9)}
.btn-solid{background:var(--violet);color:var(--white)}
.btn-solid:hover{filter:brightness(1.18)}
.btn-line{border-color:var(--rule-hi);color:var(--white)}
.btn-line:hover{border-color:var(--white)}
.btn:active{transform:translateY(1px) scale(.988)}
.btn:focus-visible{outline:2px solid var(--violet-lit);outline-offset:3px}

/* ---------------- numbered steps ---------------- */
.steps{margin-top:32px;border-top:1px solid var(--rule-hi)}
.step{display:grid;grid-template-columns:auto 1fr;gap:18px;padding:22px 0;border-bottom:1px solid var(--rule)}
.step-n{
  width:34px;height:34px;border-radius:50%;
  border:1px solid var(--rule-hi);background:transparent;
  display:grid;place-items:center;font-size:14px;font-weight:800;
  color:var(--faint);font-variant-numeric:tabular-nums;
  transition:background .45s ease,color .45s ease,border-color .45s ease;
}
/* marks fill in as the reader passes them — wayfinding, not decoration */
.step.seen .step-n{background:var(--violet);border-color:var(--violet);color:var(--white)}
@media(prefers-reduced-motion:reduce){
  .step-n{transition:none}
  .step .step-n{background:var(--violet);border-color:var(--violet);color:var(--white)}
}
.step h3{margin:0;font-size:17px}
.step p{margin:7px 0 0;font-size:15px;color:var(--dim);max-width:64ch}

/* ---------------- compliance notice ---------------- */
.notice{
  margin-top:58px;
  border:1px solid var(--rule-hi);border-left:5px solid var(--violet);
  border-radius:10px;padding:22px 24px;
}
.notice b{display:block;font-size:11.5px;letter-spacing:.17em;font-weight:800;margin-bottom:10px}
.notice p{margin:0;font-size:14px;color:var(--faint);max-width:82ch}
.notice p+p{margin-top:10px}

/* ---------------- footer ---------------- */
footer{
  margin-top:50px;padding:28px 0 60px;border-top:1px solid var(--rule);
  display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between;align-items:center;
  font-size:13.5px;color:var(--faint);
}
footer nav{display:flex;flex-wrap:wrap;gap:20px}
footer a{text-decoration:none}
footer a:hover{color:var(--violet-lit)}


/* page-local controls join the same system: .go on the compound cards,
   the lookup submit on the verify page. Same electrical timing, same
   cursor-tracked highlight, same magnet in motion.js. */
.go,.lookup button{position:relative;overflow:hidden;
  transition:filter .14s var(--el),background .14s var(--el),
             border-color .14s var(--el),box-shadow .2s var(--el)}
.go::before,.lookup button::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:0;
  transition:opacity .28s ease;
  background:radial-gradient(84px circle at var(--bx,50%) var(--by,50%),
             rgba(255,255,255,.26),transparent 68%);
}
.go:hover::before,.lookup button:hover::before{opacity:1}
.lookup button:hover{box-shadow:0 6px 22px -10px rgba(140,35,189,.9)}

@media(prefers-reduced-motion:reduce){
  .prog{display:none}
  .go::before,.lookup button::before{display:none}
  .btn::before,.btn-solid::after{display:none}
  .card::before,.step::before,.notice::before{display:none}
  .brand:hover img{transform:none}
}

/* ---- researcher verification gate ----
   Ships visible and is lifted by JS, so scripting-off meets the gate
   instead of walking past it. The inline <head> script adds .verified
   before first paint for a returning visitor, so there is no flash.
   Sized to fit ONE screen: the mark and the type are capped against
   viewport HEIGHT, not just width, so a short laptop window and a tall
   phone both land without scrolling. */
.gate{
  /* Grid, not flex. As a flex item the card collapsed to its min-content
     width - 252px of a 402px column - which wrapped the heading onto two
     lines and the notice onto six, and was most of why this scrolled.
     `safe center` so a card taller than the viewport is never centred
     past the top edge where it cannot be scrolled back to. */
  position:fixed;inset:0;z-index:200;
  display:grid;grid-template-columns:minmax(0,1fr);
  align-content:safe center;justify-items:center;
  padding:16px 14px;background:#000;overflow-y:auto;
}
html.verified .gate{display:none}
/* the backdrop canvas: taken out of flow so it never occupies a grid row
   above the card (it did, and pushed the whole panel off-screen) */
.gate-bg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.gate-card{z-index:1}
.gate.out{opacity:0;transition:opacity .3s ease;pointer-events:none}
.gate-card{
  width:100%;max-width:430px;margin:auto;position:relative;
  background:linear-gradient(180deg,rgba(140,35,189,.13),rgba(10,10,11,.5)),var(--carbon);
  border:1px solid var(--rule-hi);border-radius:16px;
  padding:clamp(18px,2.4vh,26px) clamp(18px,4vw,26px) clamp(16px,2.2vh,22px);
  box-shadow:0 30px 90px -40px rgba(140,35,189,.75);
}
.gate.shake .gate-card{animation:gshake .4s cubic-bezier(.36,.07,.19,.97)}
@keyframes gshake{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(4px)}
  30%,50%,70%{transform:translateX(-7px)}40%,60%{transform:translateX(7px)}}
.gate-card img{display:block;margin:0 0 10px}
.gate-card h1{
  font-family:Fraunces,Georgia,serif;font-weight:600;
  font-size:clamp(21px,3.1vh,27px);
  line-height:1.1;margin:0 0 7px;color:var(--white);letter-spacing:-.01em;
}
/* the lede only: .gate-exit and .gate-fine are also direct child <p>s,
   and this rule out-specified their own font sizes */
.gate-card > p:not([class]){margin:0 0 13px;font-size:clamp(13.2px,1.6vh,14.2px);
  line-height:1.48;color:var(--dim)}
.gate-lab{display:block;font-size:11.5px;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;color:var(--white);margin-bottom:6px}

/* ---- calendar ---- */
.cal{position:relative}
.cal-field{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  font:inherit;font-size:15.5px;font-weight:600;color:var(--white);text-align:left;
  background:var(--black);border:1px solid var(--rule-hi);border-radius:10px;
  padding:11px 14px;cursor:pointer;transition:border-color .16s,box-shadow .16s;
}
.cal-field.cal-empty{color:var(--faint);font-weight:400}
.cal.open .cal-field,.cal-field:focus-visible{
  border-color:var(--violet);box-shadow:0 0 0 3px rgba(140,35,189,.2);outline:none}
.cal.bad .cal-field{border-color:var(--red)}
.cal-field svg{flex:0 0 auto;opacity:.62}
.cal-pop{
  position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:5;
  background:#0A0A0C;border:1px solid var(--rule-hi);border-radius:13px;
  padding:11px;box-shadow:0 26px 64px -26px rgba(0,0,0,.96),
                          0 0 0 1px rgba(140,35,189,.16);
  animation:calIn .16s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes calIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.cal-head{display:flex;gap:7px;margin-bottom:9px}
.cal-head select{
  flex:1;min-width:0;font:inherit;font-size:13.8px;font-weight:700;color:var(--white);
  background:var(--black);border:1px solid var(--rule);border-radius:9px;
  padding:9px 26px 9px 11px;cursor:pointer;appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none' stroke='%23B85AE8' stroke-width='1.7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;
  transition:border-color .15s;
}
.cal-head select:hover{border-color:var(--rule-hi)}
.cal-head select:focus-visible{outline:2px solid var(--violet);outline-offset:-1px}
.cal-head select#cal-m{flex:1.5}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:3px}
.cal-dow span{
  text-align:center;font-size:9.6px;font-weight:800;letter-spacing:.08em;
  color:var(--faint);text-transform:uppercase;padding:2px 0;
}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-cell{
  font:inherit;font-size:12.8px;font-weight:600;color:var(--dim);
  background:none;border:0;border-radius:8px;cursor:pointer;padding:7px 0;
  font-variant-numeric:tabular-nums;transition:background .12s,color .12s;
}
.cal-cell:hover{background:rgba(140,35,189,.3);color:#fff}
.cal-cell:focus-visible{outline:2px solid var(--violet-lit);outline-offset:-2px}
.cal-cell.on{background:var(--violet);color:#fff;font-weight:700}
.cal-cell.blank{visibility:hidden;pointer-events:none}

.gate-note{margin:7px 0 13px;font-size:12px;color:var(--faint)}
.gate-check{display:flex;gap:10px;align-items:flex-start;cursor:pointer;
  font-size:13px;line-height:1.45;color:var(--dim)}
.gate-check input{flex:0 0 auto;width:18px;height:18px;margin:1px 0 0;cursor:pointer}
.gate-err{margin:10px 0 0;font-size:12.6px;color:var(--red);min-height:0}
/* lit from above, with the glow kept TIGHT - a wide soft shadow bled
   violet across the line beneath it and smeared the base of the card */
.gate-card button[type=submit]{
  width:100%;margin-top:17px;font:inherit;font-size:15.2px;font-weight:700;
  letter-spacing:.01em;cursor:pointer;color:#fff;border:0;border-radius:999px;
  padding:13px 20px;position:relative;overflow:hidden;
  background:linear-gradient(177deg,#B852E4 0%,#9429C6 48%,#761AA4 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4),
             inset 0 -1px 0 rgba(0,0,0,.3),
             0 4px 12px -6px rgba(118,26,164,.8);
  transition:filter .15s,box-shadow .2s,transform .1s;
}
.gate-card button[type=submit]::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 38%,rgba(255,255,255,.26) 50%,transparent 62%);
  transform:translateX(-120%);
}
.gate-card button[type=submit]:hover:not(:disabled){
  filter:brightness(1.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),
             inset 0 -1px 0 rgba(0,0,0,.3),
             0 6px 16px -7px rgba(140,35,189,.85);
}
.gate-card button[type=submit]:hover:not(:disabled)::after{
  transform:translateX(120%);transition:transform .66s cubic-bezier(.16,.84,.26,1)}
.gate-card button[type=submit]:active:not(:disabled){transform:translateY(1px);filter:brightness(.97)}
.gate-card button[type=submit]:focus-visible{outline:2px solid var(--violet-neon);outline-offset:3px}
.gate-exit{margin:14px 0 0;text-align:center;font-size:12.6px;color:var(--faint)}
.gate-exit a{color:var(--dim);text-decoration:underline;
  text-underline-offset:3px;text-decoration-color:var(--rule-hi);transition:color .15s}
.gate-exit a:hover{color:var(--white)}
.gate-fine{margin:14px 0 0;padding-top:13px;border-top:1px solid var(--rule);
  font-size:11.2px;line-height:1.5;color:var(--faint)}
.gate-fine a{color:var(--violet-lit);white-space:nowrap}
@media(prefers-reduced-motion:reduce){
  .gate.shake .gate-card{animation:none}
  .gate.out{transition:none}
  .cal-pop{animation:none}
}

/* ---- short viewports ----
   A laptop window at 640px tall and an iPhone SE both ran a few pixels
   over. Rather than shrink everything everywhere, the whole panel steps
   down once the viewport is short, which is the only case that needs it. */
@media(max-height:760px){
  .gate{padding:10px 13px}
  .gate .hero-mark{width:min(150px,40vw,19vh);margin:0 auto 7px}
  .gate-card{padding:15px 18px 13px;border-radius:14px}
  .gate-card h1{font-size:clamp(18px,2.8vh,21px);margin-bottom:5px}
  .gate-card > p:not([class]){font-size:12.5px;line-height:1.42;margin-bottom:10px}
  .gate-lab{font-size:10.6px;margin-bottom:5px}
  .cal-field{padding:9px 12px;font-size:14.5px}
  .gate-note{margin:5px 0 9px;font-size:11.2px}
  .gate-check{font-size:12.2px;line-height:1.4}
  .gate-status{margin-top:13px}
  .gate-status > div{padding:7px 10px;font-size:9.8px}
  .gate-card button[type=submit]{margin-top:14px;padding:12px 18px;font-size:14.8px}
  .gate-exit{margin-top:10px;font-size:11.8px}
  .gate-fine{margin-top:10px;padding-top:9px;font-size:10.4px;line-height:1.42}
}
@media(max-height:600px){
  .gate .hero-mark{width:min(118px,32vw,17vh)}
  .gate-card h1{font-size:17.5px}
  .gate-card > p:not([class]){display:none}   /* the notice below says it */
}

/* ---- the panel reads as an instrument, not a form ----
   Corner brackets, a live requirement readout, and a submit that stays
   shut until both requirements are actually met. The point is that the
   gate looks like it is CHECKING something, because it is. */
.gate-card::before,.gate-card::after{
  content:"";position:absolute;width:20px;height:20px;pointer-events:none;
  border:1px solid rgba(184,90,232,.5);
}
.gate-card::before{top:-1px;left:-1px;border-right:0;border-bottom:0;border-radius:18px 0 0 0}
.gate-card::after{bottom:-1px;right:-1px;border-left:0;border-top:0;border-radius:0 0 18px 0}

.gate-status{
  display:flex;margin-top:20px;border:1px solid var(--rule);
  border-radius:10px;overflow:hidden;background:rgba(0,0,0,.4);
}
.gate-status > div{
  flex:1;display:flex;align-items:center;gap:9px;padding:11px 13px;
  font-size:10.8px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
  color:var(--faint);transition:color .32s ease,background .32s ease;
}
.gate-status > div + div{border-left:1px solid var(--rule)}
.gate-status i{
  width:7px;height:7px;border-radius:50%;flex:0 0 auto;
  background:var(--rule-hi);transition:background .32s ease,box-shadow .32s ease;
}
.gate-status > div.met{color:var(--white);background:rgba(140,35,189,.12)}
.gate-status > div.met i{background:var(--violet-lit);box-shadow:0 0 0 3.5px rgba(184,90,232,.22)}

/* a drawn tick, so the one control you must actively agree to feels made */
.gate-check input{
  appearance:none;-webkit-appearance:none;
  width:19px;height:19px;border:1px solid var(--rule-hi);border-radius:5px;
  background:var(--black);position:relative;
  transition:background .18s var(--el),border-color .18s var(--el);
}
.gate-check input:hover{border-color:var(--violet-lit)}
.gate-check input:checked{background:var(--violet);border-color:var(--violet)}
.gate-check input::after{
  content:"";position:absolute;left:5.5px;top:2.4px;width:5px;height:9.5px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg) scale(.4);
  opacity:0;transition:opacity .16s var(--el),transform .22s cubic-bezier(.2,1.5,.4,1);
}
.gate-check input:checked::after{opacity:1;transform:rotate(42deg) scale(1)}

.gate-card button[type=submit]:disabled{
  cursor:not-allowed;filter:saturate(.25) brightness(.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14);
}
.gate-card button[type=submit]:disabled:hover{filter:saturate(.25) brightness(.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}

/* one arrival, staggered - the mark lands, then the panel under it */
.gate-card > *{opacity:0;transform:translateY(9px)}
.gate.in .gate-card > *{
  opacity:1;transform:none;
  transition:opacity .62s cubic-bezier(.16,.84,.26,1) var(--d,0s),
             transform .62s cubic-bezier(.16,.84,.26,1) var(--d,0s);
}
.gate.out .gate-card{transform:scale(.985);transition:transform .3s ease}
@media(prefers-reduced-motion:reduce){
  .gate-card > *{opacity:1;transform:none}
  .gate.out .gate-card{transition:none}
  .gate-check input::after{transition:none}
}

/* ================= the mark, on the gate =================
   The same animated logo the hero carries: fluid in the vial, a drip off
   the needle, a storm striking the socket. Every selector here is scoped
   under .gate, so this cannot reach the hero's own copy on the landing
   page - that one is tuned and is left alone.
   The two heavy sprites load AFTER the page does (see .heavy), so the
   gate paints and is usable before a byte of them arrives. */
  /* capped against viewport HEIGHT as well as width: on a short laptop
   window the mark is what pushes the panel off-screen */
.gate .hero-mark{position:relative;display:block;
  width:min(215px,52vw,23vh);margin:0 auto 10px}
  .gate .hero-logo{width:100%;height:auto;display:block;margin:0}
  .gate .sheen{
    position:absolute;inset:0;pointer-events:none;
    -webkit-mask-image:url(logo.webp);mask-image:url(logo.webp);
    -webkit-mask-size:contain;mask-size:contain;
    -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
    -webkit-mask-position:center;mask-position:center;
    background:linear-gradient(100deg,
      transparent 40%,
      rgba(255,255,255,.72) 49%,
      rgba(244,184,253,.55) 54%,
      transparent 63%);
    background-size:280% 100%;
    background-position:170% 0;
    opacity:0;
  }
  .gate .hero.lit .sheen{animation:sheen 1.6s cubic-bezier(.33,.5,.2,1) .5s both}

  /* ---- the bolt ----
     logo-bolt.webp is the artwork's own neon, extracted pixel by pixel:
     the crack across the eyes, the arc behind the head, the vial.
     Screen blending adds light to what's already there instead of
     covering it, so the strike reads as the mark surging, not a flash
     laid on top. Two strokes ~130ms apart, then six seconds dark —
     at most two flashes in any one-second window. */
  .gate .bolt{
    position:absolute;inset:0;pointer-events:none;
    background:none center/contain no-repeat;
    mix-blend-mode:screen;
    filter:brightness(1.55) saturate(1.15);
    opacity:0;will-change:opacity;
  }
  /* the mark's own neon flares when a bolt lands — fired from JS so the
     two stay in sync rather than drifting on independent timers */
  .gate .bolt.flare{animation:flare .46s ease-out both}
  @keyframes flare{
    0%  {opacity:0}
    6%  {opacity:.95}
    14% {opacity:.16}
    24% {opacity:.86}
    38% {opacity:.34}
    55% {opacity:.5}
    100%{opacity:0}
  }

  /* ---- cells ----
     Drawn to a canvas behind the mark. One cell is pre-rendered once to an
     offscreen bitmap and blitted per particle — building a radial gradient
     per cell per frame would cost far more than it is worth. */
  .gate .cells{
    position:absolute;inset:0;width:100%;height:100%;
    z-index:-1;pointer-events:none;display:block;
  }

  /* ---- the drip ----
     A bead swells at the needle tip, elongates as surface tension fights
     gravity, necks, pinches off, then falls.

     Two things make this read as liquid rather than a moving dot:

     1. SATELLITE DROPLETS. When a real drop pinches off, the neck that
        held it doesn't retract cleanly - it breaks a second time and
        leaves a smaller drop chasing the first down (Plateau-Rayleigh).
        Each channel ships a main drop and its satellite, and the
        satellite falls shorter and fades sooner, since it carries more
        drag per unit of mass.

     2. GRAVITY, not a slide. The fall keyframes step y on a squared
        curve (14 -> 23 -> 51 -> 96 -> 160) so it accelerates, and each
        drop stretches as it speeds up.

     Two channels 1.8s apart give a drop every 1.8s instead of every
     6.4s. The fall stops at 160 units because the molecular chain in
     the logo begins around y=365 and a drop must never overlap it.
     The tip stays wet between drops and shrinks as each one leaves. */
  .gate .drip{
    position:absolute;inset:0;width:100%;height:100%;
    pointer-events:none;overflow:visible;
  }
  .gate .drip ellipse{fill:url(#dropGG)}
  .gate .drip .bl{fill:url(#glowGG)}       /* light pooling low in the belly */
  .gate .drip .sp{fill:url(#specGG)}       /* the glint, carried by its drop */
  .gate .dw, .gate .wet{transform-box:view-box;transform-origin:690px 181px}
  .gate .dw{opacity:0;animation:drip 3.6s linear infinite}
  .gate .dw.a{animation-delay:1s}
  .gate .dw.b{animation-delay:2.8s}
  .gate .dw.sat{animation-name:sat}
  /* the tip never fully dries; it empties as each drop detaches.
     1.8s period, phased to land on the detachment in `drip`. */
  .gate .wet{opacity:.92;animation:wet 1.8s ease-in-out .74s infinite}

  @keyframes drip{
    0%   {opacity:0;   transform:translateY(0)     scale(.12,.12)}
    5%   {opacity:.92; transform:translateY(0)     scale(.52,.48)}
    13%  {opacity:1;   transform:translateY(1px)   scale(.94,.90)}
    20%  {opacity:1;   transform:translateY(2px)   scale(1,1.14)}   /* hangs */
    25%  {opacity:1;   transform:translateY(5px)   scale(.70,1.45)} /* necks  */
    29%  {opacity:1;   transform:translateY(14px)  scale(.97,.96)}  /* away   */
    37%  {opacity:1;   transform:translateY(23px)  scale(.93,1.10)}
    45%  {opacity:.98; transform:translateY(51px)  scale(.85,1.30)}
    53%  {opacity:.82; transform:translateY(96px)  scale(.77,1.50)}
    61%  {opacity:0;   transform:translateY(160px) scale(.69,1.66)}
    100% {opacity:0;   transform:translateY(160px) scale(.69,1.66)}
  }
  /* the satellite: born at the neck break, shorter fall, earlier fade */
  @keyframes sat{
    0%   {opacity:0;   transform:translateY(6px)   scale(.30,.30)}
    26%  {opacity:0;   transform:translateY(6px)   scale(.30,.30)}
    29%  {opacity:.90; transform:translateY(9px)   scale(1,1)}
    34%  {opacity:.95; transform:translateY(13px)  scale(.95,1.05)}
    42%  {opacity:.90; transform:translateY(26px)  scale(.90,1.15)}
    50%  {opacity:.70; transform:translateY(55px)  scale(.85,1.25)}
    58%  {opacity:0;   transform:translateY(105px) scale(.80,1.35)}
    100% {opacity:0;   transform:translateY(105px) scale(.80,1.35)}
  }
  @keyframes wet{
    0%   {transform:scale(.52)}
    40%  {transform:scale(1)}
    62%  {transform:scale(1.06)}
    72%  {transform:scale(.30)}   /* a drop just left */
    100% {transform:scale(.52)}   /* refilling */
  }
  @media(prefers-reduced-motion:reduce){ .drip{display:none} }

  /* ---- the fluid ----
     48 pre-rendered frames in which the vial's own pixels are displaced.
     Per frame a travelling surface is solved from five components — three
     waves, a heave and a tilt — all on integer temporal frequencies so the
     loop closes exactly, and non-integer spatial ones so it never looks
     periodic. Pixels below the surface are resampled BILINEARLY along the
     slope (refraction, decaying with depth) and gained by its curvature
     (caustics). The specular is computed from the surface normal, so the
     glint travels along the wave rather than sitting on a drawn line.
     Frames are sampled from logo.webp itself, at 1:1 and WITH its alpha
     channel. That matters: built from the opaque source instead, the patch
     paints black over pixels that should be transparent and blocks the
     bolt glow behind it, which reads as the bottle glitching. Sampling the
     displayed file at native scale means untouched pixels pass through
     bit-identical — the static border measures a zero-pixel delta.

     The sheet is a 12x4 grid: the outer element steps rows, the inner
     steps columns. Two single-axis transforms instead of background-position,
     because percentage positioning does not land on exact frame boundaries
     and bleeds slivers of the neighbouring frame. */
  .gate .fluid{
    position:absolute;
    left:65.526%;top:35.132%;width:15.132%;height:11.184%;
    overflow:hidden;pointer-events:none;
    /* Feathered edges. The displacement already tapers to zero in the outer
       3px, so these pixels are identical to the logo anyway — fading them
       means the patch has no hard boundary to betray it, which is what lets
       the sheet be compressed at all. */
    -webkit-mask-image:
      linear-gradient(to right,transparent 0,#000 4.5%,#000 95.5%,transparent 100%),
      linear-gradient(to bottom,transparent 0,#000 5.5%,#000 94.5%,transparent 100%);
    mask-image:
      linear-gradient(to right,transparent 0,#000 4.5%,#000 95.5%,transparent 100%),
      linear-gradient(to bottom,transparent 0,#000 5.5%,#000 94.5%,transparent 100%);
    -webkit-mask-composite:source-in;
    mask-composite:intersect;
  }
  .gate .fluid b{
    position:absolute;left:0;top:0;width:100%;height:400%;
    animation:vrow 2s steps(4) infinite;
  }
  .gate .fluid i{
    position:absolute;left:0;top:0;width:1200%;height:100%;
    background:none left top/100% 100% no-repeat;
    animation:vcol .5s steps(12) infinite;
  }
  @keyframes vcol{from{transform:translateX(0)} to{transform:translateX(-100%)}}
  @keyframes vrow{from{transform:translateY(0)} to{transform:translateY(-100%)}}

  /* ---- the chain ----
     A pulse runs the length of the peptide chain, like signal down a wire. */
  .gate .chain{
    position:absolute;inset:0;pointer-events:none;overflow:hidden;
    -webkit-mask-image:url(logo-chain.webp);mask-image:url(logo-chain.webp);
    -webkit-mask-size:contain;mask-size:contain;
    -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
    -webkit-mask-position:center;mask-position:center;
    mix-blend-mode:screen;
  }
  .gate .heavy .bolt{background-image:url(logo-bolt.webp)}
  .gate .heavy .chain i{background-image:linear-gradient(100deg,
      transparent 36%, rgba(244,184,253,.9) 46%,
      rgba(255,255,255,.65) 50%, rgba(184,90,232,.7) 55%, transparent 64%)}
  .heavy .gate .fluid i{background-image:url(vial-sheet.webp)}
  .gate .chain i{
    position:absolute;inset:0;display:block;
    background-size:320% 100%;
    animation:chainPulse 5.2s cubic-bezier(.45,.05,.5,.95) infinite;
  }
  @keyframes chainPulse{
    0%  {background-position:150% 0;opacity:0}
    10% {opacity:1}
    78% {opacity:1}
    100%{background-position:-70% 0;opacity:0}
  }

  @media(prefers-reduced-motion:reduce){
  .gate .fluid, .gate .chain{display:none}
  }

  /* ---- the storm ---- */
  .gate .storm{
    position:absolute;inset:0;width:100%;height:100%;
    pointer-events:none;overflow:visible;mix-blend-mode:screen;
  }

  /* ---- the eye ----
     The logo already has a glow painted into the socket. This lights it
     from behind rather than drawing a new one on top: an ember that
     breathes between strikes, and a flare on the same envelope the bolt
     flashes on - hit, dip, second hit - trailing the channel by ~25ms,
     because a socket keeps glowing for a moment after the discharge
     rather than cutting out with it. The afterglow outlasts the bolt, so
     the eye is still cooling once the lightning has gone.
     Because the flare rides the bolt's own pulses it adds no new flashes
     of its own; the rate stays at the strike rate, and the cooldown in
     the storm module keeps that near 1.1/sec against a limit of 3. */
  .gate .eye circle{fill:url(#eyeGG)}
  .gate .eye .ember{opacity:.1;animation:ember 5.2s ease-in-out infinite}
  .gate .eye .hit{opacity:0;transform-box:view-box;transform-origin:197px 45px}
  /* linear, deliberately. An eased curve is applied between EVERY pair of
     keyframes, which smears the dip into a single ramp and loses the
     double-pulse entirely - measured, not assumed. The shape is carried by
     the keyframes themselves instead. The dip is held ~50ms wide so it
     survives a 60fps frame budget rather than falling between frames. */
  .gate .eye .hit.lit{animation:eyeHit .72s linear both}

  @keyframes ember{
    0%,100%{opacity:.08;transform:scale(.94)}
    50%    {opacity:.22;transform:scale(1.03)}
  }
  @keyframes eyeHit{
    0%   {opacity:.30; transform:scale(.62)}
    3%   {opacity:1;   transform:scale(1.13)}  /*  ~22ms strike lands  */
    7%   {opacity:.97; transform:scale(1.09)}  /*  ~50ms               */
    14%  {opacity:.14; transform:scale(.89)}   /* ~100ms channel dips  */
    21%  {opacity:1;   transform:scale(1.21)}  /* ~151ms second pulse  */
    28%  {opacity:.74; transform:scale(1.08)}
    38%  {opacity:.45; transform:scale(1.02)}
    54%  {opacity:.28; transform:scale(1)}
    74%  {opacity:.15; transform:scale(.98)}
    100% {opacity:0;   transform:scale(.95)}   /* still cooling        */
  }
  @media(prefers-reduced-motion:reduce){ .eye{display:none} }
  @media(prefers-reduced-motion:reduce){
  .gate .bolt, .gate .storm{display:none}
  }
  @keyframes sheen{
    0%  {background-position:170% 0;opacity:0}
    14% {opacity:1}
    86% {opacity:1}
    100%{background-position:-70% 0;opacity:0}
  }

/* ---- hold the mark until its image is actually there ----
   The overlays are vector and paint at once; logo.webp is 206KB and does
   not. Without this you get fluid moving and a drip falling in empty
   space until the image lands - which is exactly what it looked like.
   Covers the hero's own mark as well as the gate's copy. */
.hero-mark{opacity:0;transition:opacity .45s ease}
.hero-mark.ready{opacity:1}
/* if the image never arrives, show nothing rather than floating parts */
.hero-mark.noimg .fluid,.hero-mark.noimg .drip,.hero-mark.noimg .storm,
.hero-mark.noimg .sheen,.hero-mark.noimg .bolt,.hero-mark.noimg .chain{display:none}
@media(prefers-reduced-motion:reduce){.hero-mark{transition:none}}

/* ---- FDA notice band ----
   Sits above the footer on every page. Deliberately NOT a copy of the
   usual trade wording: the common version ends by telling the reader to
   consult a clinician "before using any product", which concedes that a
   person might use it — the exact contradiction FDA reads as evidence of
   intended human use. It also calls itself required by the FD&C Act; that
   notice is a supplement rule, not a research-reagent one. */
.fda{
  margin:52px 0 0;padding:17px 20px 17px 19px;
  border:1px solid var(--rule);border-left:3px solid var(--amber);
  border-radius:11px;background:rgba(240,185,92,.045);
}
.fda b{
  display:block;font-size:11.5px;font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;color:var(--amber);margin-bottom:8px;
}
.fda p{margin:0;font-size:12.9px;line-height:1.62;color:var(--faint);max-width:92ch}
.fda a{color:var(--amber);font-weight:700;white-space:nowrap}
