/* INS-267: beta access gate. Loaded only by beta/index.html.

   Colour comes from css/tokens_v2.css, never hardcoded hex. Two deliberate departures from the prototype,
   both from docs/DESIGN_STANDARD.md:
     - the focus ring and the skip link take --ink, not --blue-500. Section 2 is explicit that there is no
       teal and that everything which is not affiliate blue is grey; line 275 is explicit that links are ink
       and that there is no link teal. --blue-500 is a persona-ramp colour and measures 3.21:1 on the page,
       which fails AA as link text at this size.
     - geometry is owned by .bbox and the input is stripped with all:unset, so nothing in a host stylesheet
       can reach the height or width. base.css line 13 is the only input rule in the site and sets font and
       colour only, but the stripped input costs nothing and removes the question.

   No dark block. css/tokens_v2.css gates dark behind :root[data-contrib], which only core.js sets and this
   page does not load, so a gate visitor is always on the light tokens. */

body.bgate {
  font-family: var(--f-body), Arial, sans-serif;
  background: var(--surface);
  color: var(--ink);
  padding: 24px;
  margin: 0;
}
#bstage { position: relative; max-width: 700px; margin: 0 auto; }

#bcard {
  border-radius: var(--r-card);
  background: var(--page);
  border: 1px solid var(--line);
  padding: 36px 30px 30px;
  opacity: 0;
}
#bcard.gone { pointer-events: none; }
.binner { max-width: 616px; margin: 0 auto; }

.bhead { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; }
.bcopy { flex: none; width: 322px; padding-bottom: 2px; }
.beyebrow { font-size: 11px; letter-spacing: .08em; color: var(--soft); margin: 0; }
.bh1 { font-family: var(--f-display), Arial, sans-serif; font-weight: 800; font-size: 42px; line-height: 1.02; letter-spacing: -.05em; color: var(--ink); margin: 18px 0 0; }
.bh2 { font-family: var(--f-display), Arial, sans-serif; font-weight: 500; font-size: 28px; line-height: 1.08; letter-spacing: -.03em; color: var(--soft); margin: 7px 0 0; }
.bbody { font-size: 13px; color: var(--muted); margin: 16px 0 0; line-height: 1.6; max-width: 286px; }

/* The scene is 196x252 so the caption path's coordinates stay the ones the design was drawn against. */
.bscenewrap { flex: none; width: 196px; height: 252px; position: relative; }
#bscene { position: absolute; inset: 0; transform: translate(-30px, 20px); }
.brobots { position: absolute; bottom: 0; left: 0; display: flex; align-items: flex-end; }
.brobot { display: block; }
#br2 { margin-left: -8px; }

/* Heart placement, computed not eyeballed. Each robot renders 50.1 viewBox units at 100px, so 1.996008 px
   per unit. Robot 1's own origin sits 22.5 units from its left edge, i.e. 44.910px. Robot 2's left edge is
   at 92px (100 - 8 overlap) and its origin is 27.7 units in, i.e. 92 + 55.289 = 147.289px. The midpoint of
   the two origins is (44.910 + 147.289) / 2 = 96.0995px.

   The heart is centred within its own viewBox - its cubes span -4.3 to 39.0 against a viewBox of -9.3 width
   53.3, which puts its centre at exactly 0.5 - so translateX(-50%) lands that centre on 96.1px.

   Size: the prototype's stand-in drew 47.3 viewBox units at 74px, i.e. 1.5645 px per unit, on the same 8.66
   lattice the real file uses. Holding that scale keeps the real cubes the size the design was approved at:
   53.3 x 1.5645 = 83.4px wide, 55.0 x 1.5645 = 86.0px tall. */
#bheart { position: absolute; left: 96.1px; bottom: 134px; transform: translateX(-50%); }
#bheart-svg { display: block; width: 83.4px; height: 86px; overflow: visible; }
.bcube { opacity: 0; }

#bcapwrap { opacity: 0; pointer-events: none; position: absolute; inset: 0; }
#bcapsvg { position: absolute; inset: 0; display: block; }
#bcaptext { position: absolute; left: -14px; top: 14px; margin: 0; font-family: var(--f-display), Arial, sans-serif; font-weight: 700; font-size: 14px; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
#bcapline { stroke-dasharray: 160; stroke-dashoffset: 160; }

.blab { margin: 22px 0 0; font-size: 11px; letter-spacing: .06em; color: var(--soft); }
.browwrap { position: relative; margin-top: 12px; }
#brow { display: flex; gap: 8px; max-width: 400px; }

.bbox {
  flex: 1; height: 56px; border-radius: var(--r-btn);
  background: var(--page); border: 1px solid var(--inputline);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.bbox.empty { background: var(--surface); border-color: var(--line); }
.bbox:focus-within { background: var(--page); border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.bbox.e { border-color: var(--alertink); background: var(--alert); }

input.bq {
  all: unset; display: block; width: 100%; height: 56px; box-sizing: border-box; text-align: center;
  font-family: var(--f-data), Arial, sans-serif; font-size: 21px; line-height: 56px; color: var(--ink);
  background: transparent; caret-color: var(--ink);
}
input.bq:disabled { color: var(--soft); -webkit-text-fill-color: var(--soft); }

/* Links are ink with a trailing arrow and no underline, per DESIGN_STANDARD line 275. */
.bskipwrap { position: absolute; left: 486px; top: 28px; transform: translate(-50%, -50%); }
#bskip { opacity: 0; pointer-events: none; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
#bskip:hover { color: var(--muted); }
#bskip.on { pointer-events: auto; }

#bmsg { font-size: 12.5px; color: var(--alertink); margin: 14px 0 0; min-height: 20px; }
#bmsg.calm { color: var(--muted); }
.bremember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-top: 2px; }
.bremember input { width: 14px; height: 14px; margin: 0; }
.bremember span { font-size: 12px; color: var(--muted); }

/* The form needs a submit control or Enter does nothing in a form with several text inputs. It is hidden
   rather than drawn because the seventh digit submits on its own and the design carries no button; it keeps
   tabindex -1 so a sighted keyboard user never lands on something they cannot see, and js/beta.js handles
   Enter directly. Assistive technology still finds it as the form's submit. */
.bgo { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.brule { margin-top: 20px; height: 1px; background: var(--line); }
.bfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; }
.bfoot span { font-size: 12px; color: var(--soft); }

/* Phone: the robots, the heart and the caption drop out. Owner's call 2026-11-22 - the caption goes with
   them rather than re-anchoring. The headline and the seven boxes stack full width. */
@media (max-width: 700px) {
  body.bgate { padding: 12px; }
  #bcard { padding: 28px 20px 24px; }
  .bhead { display: block; }
  .bcopy { width: auto; }
  .bbody { max-width: none; }
  .bscenewrap { display: none; }
  .bh1 { font-size: 34px; letter-spacing: -.03em; }
  .bh2 { font-size: 23px; letter-spacing: -.02em; }
  #brow { max-width: none; gap: 6px; }
  .bbox { height: 62px; }
  input.bq { height: 62px; line-height: 62px; font-size: 20px; }
  .bskipwrap { position: static; transform: none; margin-top: 14px; text-align: right; }
  .bfoot { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Reduced motion: nothing animates. js/beta.js reads the same query and skips every timeline, so the card is
   simply there, the heart is simply built, and the close is instant. */
@media (prefers-reduced-motion: reduce) {
  #bcard { opacity: 1; }
  .bbox { transition: none; }
  .bcube { opacity: 1; }
  #bcapline { stroke-dashoffset: 0; }
}
