/* ===== The door: a matrix screen, the ticket, and the terms ================================
 * Loaded with invite.css by the invite modal (and by the /t/<id> share page). Self-contained in the
 * sense that every token has a fallback, so the share page renders without styles.css.
 *
 * Palette: THE SITE'S OWN. The matte, green-biased black ramp the logo sits on, the brand acid green
 * as the thing that glows, near-white text. It used to be a synthwave sunset (indigo, magenta, cyan)
 * wrapped around a $GWC ticket; the door now looks like the house it opens. Gold is still reserved for
 * the OG countdown, so "time is running out" never shares a colour with "this is yours".
 */

:root {
  /* the text-size floor, as in styles.css — these pages load this sheet alone */
  --text-floor: clamp(14px, calc(14px + (100vw - 375px) * 0.01252), 19pt);
  --text-base: clamp(1rem, calc(1rem + (100vw - 375px) * 0.00442), 1.25rem);
  --g-ink:      var(--ink, #050604);     /* the far end of the grid */
  --g-ink-2:    var(--ink-2, #0c0e09);
  --g-ink-3:    var(--ink-3, #14170f);
  --g-focus:    var(--focus, #f2f6ec);   /* never accent-derived, as on the rest of the site */
  /* The TYPE on every green control. Not --g-ink: that follows the reader's background preference (prefs.js
     moves --ink), and a label must stay dark on green whatever the page behind it is. --ctl-ink is the site's
     own label ink, which prefs.js never touches. */
  --g-on:       var(--ctl-ink, #020301);
  /* The site's green, not a copy of it. Inside the modal styles.css is loaded and these resolve to the
     live --green family — prefs.js's per-reader accent included — so a rebrand or an accent change reaches
     the ticket. The literals only carry the standalone pages (privacy, terms, the gate redirect), none of
     which draws a control from this file. */
  --g-green:    var(--green, #a8ce00);           /* the site's green */
  --g-green-hi: var(--green-bright, #c6f000);
  --g-green-lo: var(--green-dark, var(--g-green)); /* ghost / spent fill (and the disabled fallback when styles.css is absent) — black type clears it at 6.3:1 */
  --g-gold:     #ffb340;
  --g-text:     var(--text, #f2f6ec);
  --g-dim:      var(--text-dim, #b6beac);
  --g-paper:    var(--ink-2, #0c0e09);
  /* the matrix grid every control on the site wears (styles.css --mx-*), aliased so the same tile renders
     when this file is loaded on its own: the same lines, cells, halo and pitch */
  --gmx-line: var(--mx-line, color-mix(in srgb, var(--g-ink) 26%, transparent));
  --gmx-cell: var(--mx-cell, var(--g-green-hi));
  --gmx-glow: var(--mx-glow, color-mix(in srgb, var(--g-green-hi) 55%, transparent));
  --gmx-size: var(--mx-size, 7px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: var(--text-base); }
body { font-size: max(var(--text-floor), 1rem); line-height: 1.5; }
body.gate {
  min-height: 100vh;
  background: var(--g-ink);
  color: var(--g-text);
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

/* ---- the screen: matrix rain, a green glow, and a horizon grid ---- */
/* Above the sky, below everything else. Both are fixed, so without this the sky — which comes
   later in the DOM — paints its opaque gradient straight over the rain and hides it completely. */
#gate-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; display: block; }
.gate-sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 80%, color-mix(in srgb, var(--g-green) 16%, transparent) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 100%, color-mix(in srgb, var(--g-green-hi) 10%, transparent) 0%, transparent 65%),
    linear-gradient(180deg, var(--g-ink) 0%, var(--g-ink-2) 55%, var(--g-ink-3) 100%);
}
/* scanlines: the CRT the whole thing is supposedly on */
.gate-scan {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.16;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.55) 2px 4px);
}
.gate-vig { position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(0,0,0,0.65) 100%); }

/* ---- layout ---- */
.gate-wrap {
  position: relative; z-index: 4;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem; padding: 2.2rem 1.1rem 3rem; text-align: center;
}
.gate-kicker {
  font-size: max(var(--text-floor), 0.72rem); letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--g-green-hi); margin: 0; font-weight: 700;
  text-shadow: 0 0 14px color-mix(in srgb, var(--g-green) 45%, transparent);
}
.gate-title {
  font-family: 'Luckiest Guy', cursive; margin: 0;
  font-size: max(var(--text-floor), clamp(2rem, 8vw, 3.6rem)); line-height: 1.02; letter-spacing: 0.012em;
  color: var(--g-text); text-wrap: balance;
  text-shadow: 0 0 18px color-mix(in srgb, var(--g-green) 35%, transparent), 0 3px 0 var(--g-ink);
}
.gate-title .hl { color: var(--g-green-hi); text-shadow: 0 0 18px color-mix(in srgb, var(--g-green) 60%, transparent), 0 3px 0 var(--green-dark, #7e9a00); }
.gate-sub { margin: 0; max-width: 34rem; color: var(--g-dim); line-height: 1.6; font-size: max(var(--text-floor), 0.96rem); }
.gate-sub b { color: var(--g-text); }

/* ---- the ticket ------------------------------------------------------
   A real ticket: a body, a perforation, and a stub. The notches are two
   circles punched out of the background colour at the seam. */
.ticket-stage { perspective: 1400px; width: min(100%, 46rem); }
.ticket {
  position: relative; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--g-ink-3) 0%, var(--g-ink-2) 55%, var(--g-ink) 100%);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.85), 0 0 0 1.5px color-mix(in srgb, var(--g-green) 45%, transparent),
              0 0 42px color-mix(in srgb, var(--g-green) 20%, transparent);
  transform-style: preserve-3d;
  transition: transform 220ms ease;
  animation: ticket-float 7s ease-in-out infinite;
  cursor: pointer;
  text-align: left;
  color: inherit; font: inherit; border: 0; padding: 0;
}
@keyframes ticket-float {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%      { transform: translateY(-12px) rotateX(1.4deg); }
}
.ticket:focus-visible { outline: 3px solid var(--g-focus); outline-offset: 5px; }

/* the sheen — a slow sweep of green light across the face */
.ticket::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: linear-gradient(115deg,
    transparent 18%, color-mix(in srgb, var(--g-green) 8%, transparent) 32%, color-mix(in srgb, var(--g-text) 7%, transparent) 44%,
    color-mix(in srgb, var(--g-green) 14%, transparent) 52%, color-mix(in srgb, var(--g-green-hi) 20%, transparent) 58%, transparent 74%);
  background-size: 260% 260%;
  animation: holo 6.5s linear infinite;
  mix-blend-mode: screen;
}
@keyframes holo { 0% { background-position: 120% 0; } 100% { background-position: -60% 0; } }

.tk-body { display: block; position: relative; z-index: 2; padding: 1.15rem 1.25rem; min-width: 0; }
.tk-stub {
  position: relative; z-index: 2; padding: 1.15rem 0.8rem;
  background: rgba(0,0,0,0.26);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  text-align: center;
}
/* the perforation between body and stub */
.tk-perf {
  position: absolute; top: 0; bottom: 0; right: 10.5rem; z-index: 3; width: 0;
  border-left: 2.5px dashed color-mix(in srgb, var(--g-green) 30%, transparent);
}
.tk-notch { position: absolute; right: calc(10.5rem - 9px); z-index: 3; width: 18px; height: 18px;
  border-radius: 50%; background: var(--g-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--g-green) 12%, transparent); }
.tk-notch.top { top: -9px; } .tk-notch.bot { bottom: -9px; }

.tk-top { display: flex; align-items: center; gap: 0.55rem; }
/* The ticket lives inside a <button>, whose content model is phrasing only — so every box in it is a
   <span> and has to be given a display explicitly. Forgetting one collapses its children onto one line. */
.tk-logo { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.tk-brand { font-family: 'Luckiest Guy', cursive; font-size: max(var(--text-floor), 1.05rem); color: var(--g-green-hi); letter-spacing: 0.02em; }
.tk-admit { display: inline-block; margin-left: auto; font-size: max(var(--text-floor), 0.7rem); font-weight: 800; letter-spacing: 0.22em; text-indent: 0.22em;
  text-transform: uppercase; color: var(--g-on); background: var(--g-green-hi);
  padding: 0.22rem 0.5rem; border-radius: 4px; white-space: nowrap; }

.tk-head { display: block; font-family: 'Luckiest Guy', cursive; font-size: max(var(--text-floor), clamp(1.3rem, 4.4vw, 1.9rem));
  margin: 0.7rem 0 0.1rem; color: var(--g-text); line-height: 1.08; }
.tk-head .hl { color: var(--g-green-hi); }
.tk-line { display: block; margin: 0; font-size: max(var(--text-floor), 0.8rem); color: var(--g-dim); line-height: 1.5; }

.tk-holder { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.9rem; }
.tk-face { width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; object-fit: cover;
  background: color-mix(in srgb, var(--g-green) 7%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--g-green) 50%, transparent);
  display: grid; place-items: center; font-size: max(var(--text-floor), 1.7rem); overflow: hidden; }
.tk-face img, .tk-face video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-who { display: block; min-width: 0; }
.tk-name { display: block; font-weight: 800; font-size: max(var(--text-floor), 1rem); color: var(--g-text); overflow-wrap: anywhere; }
.tk-role { display: block; font-size: max(var(--text-floor), 0.72rem); letter-spacing: 0.12em; text-transform: uppercase; color: var(--g-green-hi); font-weight: 700; }

.tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.9rem; }
.tk-cell { display: block; background: rgba(0,0,0,0.3); border: 1px solid color-mix(in srgb, var(--g-green) 9%, transparent); border-radius: 9px; padding: 0.45rem 0.6rem; min-width: 0; }
.tk-k { display: block; font-size: max(var(--text-floor), 0.7rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--g-dim); font-weight: 800; }
.tk-v { display: block; font-weight: 800; font-size: max(var(--text-floor), 0.95rem); color: var(--g-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tk-v.gold { color: var(--g-gold); }

/* the rocket countdown rail */
.tk-launch { display: block; margin-top: 0.9rem; background: rgba(0,0,0,0.34); border: 1px solid rgba(255,179,64,0.35);
  border-radius: 10px; padding: 0.5rem 0.65rem; }
.tk-launch-top { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.tk-launch-k { font-size: max(var(--text-floor), 0.7rem); letter-spacing: 0.13em; text-transform: uppercase; color: var(--g-gold); font-weight: 800; }
.tk-launch-v { font-weight: 800; font-size: max(var(--text-floor), 0.92rem); color: var(--g-gold); font-variant-numeric: tabular-nums; margin-left: auto; }
.tk-rail { display: block; position: relative; height: 16px; margin-top: 0.35rem; }
.tk-rail-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(255,179,64,0.15), rgba(255,179,64,0.55)); border-radius: 2px; }
.tk-rocket { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: max(var(--text-floor), 0.95rem);
  filter: drop-shadow(0 0 6px rgba(255,179,64,0.8)); transition: left 600ms ease; }

.tk-stub-n { display: block; font-family: 'Luckiest Guy', cursive; font-size: max(var(--text-floor), 1.7rem); color: var(--g-green-hi); line-height: 1; }
.tk-stub-k { display: block; font-size: max(var(--text-floor), 0.7rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--g-dim); font-weight: 800; }
.tk-code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: max(var(--text-floor), 0.7rem);
  color: var(--g-dim); letter-spacing: 0.05em; overflow-wrap: anywhere; }
.tk-bars { display: flex; gap: 2px; align-items: flex-end; height: 30px; margin-top: 0.1rem; }
.tk-bars i { display: block; width: 2px; background: color-mix(in srgb, var(--g-green-hi) 75%, transparent); border-radius: 1px; }

.tk-cta { margin: 0; font-size: max(var(--text-floor), 0.78rem); color: var(--g-dim); }
.tk-cta b { color: var(--g-green-hi); }

@media (max-width: 560px) {
  .ticket { grid-template-columns: 1fr; }
  .tk-perf { right: 0; left: 0; top: auto; bottom: 7.2rem; width: auto; height: 0;
    border-left: 0; border-top: 2.5px dashed color-mix(in srgb, var(--g-green) 30%, transparent); }
  .tk-notch { right: auto; bottom: calc(7.2rem - 9px); top: auto; }
  .tk-notch.top { left: -9px; } .tk-notch.bot { right: -9px; left: auto; }
  .tk-stub { flex-direction: row; justify-content: space-around; padding: 0.85rem; }
}

/* ---- buttons ---- */
.g-btn {
  font: inherit; font-weight: 800; cursor: pointer; border-radius: 999px;
  padding: 0.72rem 1.5rem; border: 2px solid transparent; min-height: 46px;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  background: var(--g-green); color: var(--g-on);   /* safe default: a green pill with dark type, never a bare label */
}
.g-btn:active { transform: translateY(1px); }
.g-btn-primary { background: linear-gradient(180deg, var(--g-green-hi), var(--g-green)); color: var(--g-on);
  box-shadow: 0 0 26px color-mix(in srgb, var(--g-green) 45%, transparent); }
.g-btn-primary:hover { box-shadow: 0 0 38px color-mix(in srgb, var(--g-green) 65%, transparent); }
/* the ghost is the deeper green, not a pale pill: same black type, one step down from the primary */
.g-btn-ghost { background: var(--g-green-lo); color: var(--g-on); border-color: var(--g-green-lo); }
.g-btn-ghost:hover { background: var(--g-green); border-color: var(--g-green); }
/* disabled: the site's muted control fill (styles.css --ctl-fill-dis; the deep green when this file stands alone) with the
   same black type and NO opacity wash — a 0.55 element opacity composited the label over the modal ground at ~2.65:1, and
   this is the state the reader looks at for the whole terms step (#inv-tos-go until they scroll to the end) and during
   redeem / wallet checks. Mirrors styles.css .btn:disabled; the static 0.35 grid (below) already marks the tile as inert. */
.g-btn:disabled { background: var(--ctl-fill-dis, var(--g-green-lo)); color: var(--g-on); opacity: 1; cursor: not-allowed; box-shadow: none; }
.g-btn:focus-visible { outline: 3px solid var(--g-focus); outline-offset: 3px; }
/* tips.js's description bubble, dressed for the pages that load gate.css and not styles.css (the legal pages):
   the same rules as styles.css .tip-bubble, on the gate's tokens */
.tip-bubble { position: fixed; z-index: 9990; pointer-events: auto; max-width: 300px; padding: 0.5rem 0.65rem;
  font-size: max(var(--text-floor), 0.8rem); line-height: 1.4; font-weight: 600; color: var(--g-text); background: var(--g-ink-2);
  border: 1.5px solid var(--edge-ctl, var(--g-green)); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(2px); transition: opacity 0.13s ease, transform 0.13s ease; }
.tip-bubble.is-on { opacity: 1; transform: none; }
.tip-bubble.is-instant { transition: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .tip-bubble { transition: none; transform: none; } }
/* the privacy page's "turn Google Analytics off in this browser" line (ga.js wires it) */
.ga-optout { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }

/* ---- modal ---- */
.g-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem;
  background: color-mix(in srgb, var(--g-ink) 84%, transparent); backdrop-filter: blur(7px); }
.g-overlay[hidden] { display: none; }
.g-modal { width: min(100%, 40rem); max-height: min(88vh, 60rem); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--g-ink-3), var(--g-ink-2)); color: var(--g-text);
  border: 1.5px solid color-mix(in srgb, var(--g-green) 14%, transparent); border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.9); overflow: hidden; }
.g-modal-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--g-green) 10%, transparent); }
.g-modal-h { margin: 0; font-family: 'Luckiest Guy', cursive; font-size: max(var(--text-floor), 1.15rem); color: var(--g-green-hi); }
.g-x { margin-left: auto; background: var(--g-green-lo); border: 0; color: var(--g-on); font-size: max(var(--text-floor), 1.4rem);
  cursor: pointer; line-height: 1; padding: 0.2rem 0.4rem; border-radius: 8px; }
.g-x:hover { background: var(--g-green); }
.g-modal-body { padding: 1.1rem; overflow-y: auto; }
.g-modal-foot { padding: 0.9rem 1.1rem; border-top: 1px solid color-mix(in srgb, var(--g-green) 10%, transparent);
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.g-code-in {
  width: 100%; font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: max(var(--text-floor), clamp(1.2rem, 6vw, 1.9rem)); font-weight: 800; letter-spacing: 0.32em; text-indent: 0.32em; text-align: center;
  text-transform: uppercase; padding: 0.8rem 0.6rem; border-radius: 12px;
  background: rgba(0,0,0,0.42); color: var(--g-green-hi);
  border: 2px solid color-mix(in srgb, var(--g-green) 40%, transparent); caret-color: var(--g-green-hi);
}
.g-code-in:focus { outline: none; border-color: var(--g-green-hi); box-shadow: 0 0 24px color-mix(in srgb, var(--g-green) 35%, transparent); }
.g-note { font-size: max(var(--text-floor), 0.85rem); color: var(--g-dim); line-height: 1.55; }
.g-note b { color: var(--g-text); }
.g-err { color: #ff8a8a; font-size: max(var(--text-floor), 0.88rem); min-height: 1.2em; margin: 0.5rem 0 0; }
.g-ok { color: var(--g-green-hi); }

/* ---- terms ---- */
.g-terms { background: rgba(0,0,0,0.3); border: 1px solid color-mix(in srgb, var(--g-green) 10%, transparent); border-radius: 12px;
  padding: 0.9rem 1rem; max-height: 46vh; overflow-y: auto; font-size: max(var(--text-floor), 0.86rem); line-height: 1.62; color: var(--g-text); }
.g-terms h3 { color: var(--g-green-hi); font-size: max(var(--text-floor), 0.95rem); margin: 1.2rem 0 0.35rem; }
.g-terms h3:first-child { margin-top: 0; }
.g-terms p, .g-terms li { margin: 0.45rem 0; }
.g-terms ul { padding-left: 1.1rem; }
.g-terms b, .g-terms strong { color: var(--g-text); }
.g-readmark { display: flex; align-items: center; gap: 0.5rem; font-size: max(var(--text-floor), 0.8rem); color: var(--g-dim);
  margin-top: 0.6rem; }
.g-readbar { flex: 1 1 auto; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--g-green) 12%, transparent); overflow: hidden; }
.g-readfill { display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--g-green), var(--g-green-hi)); transition: width 140ms linear; }
.g-agree { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.9rem; font-size: max(var(--text-floor), 0.9rem);
  line-height: 1.5; cursor: pointer; }
.g-agree input { width: 20px; height: 20px; margin: 0.1rem 0 0; flex: 0 0 auto; accent-color: var(--g-green); }
.g-agree input:disabled { cursor: not-allowed; }
.g-agree.is-locked { opacity: 0.55; cursor: not-allowed; }

/* ---- invite codes ---- */
.g-codes { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.g-code { display: flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.6rem; min-height: 44px;
  background: var(--g-green-hi); border: 1px solid var(--g-green-hi); border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: max(var(--text-floor), 0.9rem); font-weight: 700;
  color: var(--g-on); cursor: pointer; }
.g-code:hover { background: var(--g-green); border-color: var(--g-green); }
.g-code.is-used { background: var(--g-green-lo); border-color: var(--g-green-lo); color: var(--g-on); text-decoration: line-through; cursor: default; }
.g-code .c-tag { margin-left: auto; font-size: max(var(--text-floor), 0.55rem); letter-spacing: 0.1em; text-transform: uppercase;
  font-family: 'Rubik', sans-serif; color: var(--g-on); }

.gate-foot { font-size: max(var(--text-floor), 0.76rem); color: var(--g-dim); line-height: 1.6; max-width: 40rem; }
.gate-foot a { color: var(--g-green-hi); }

@media (prefers-reduced-motion: reduce) {
  .ticket, .ticket::after { animation: none !important; }
  .tk-rocket { transition: none; }
  .g-btn::before, .g-x::before, .g-code::before { animation: none !important; }
}

/* The site's matrix grid as a band across the top of the ticket — the texture every control on the site
   wears, fading into the ticket's face. Decoration only: pure CSS, no artwork to fetch. */
.tk-band { display: block; position: absolute; inset: 0 0 auto 0; height: 34%; overflow: hidden; border-radius: 14px 14px 0 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--g-green) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--g-green) 22%, transparent) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.45) 55%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.45) 55%, transparent 100%);
  opacity: 0.7; }
/* and the ticket's own content sits above it, never behind */
.ticket .tk-top, .ticket .tk-head, .ticket .tk-line { position: relative; z-index: 1; }
.ticket .tk-body { position: relative; }

/* ===== The matrix grid: the door's controls are tiles of green cells too ========================
   The same two layers styles.css puts under every control on the site (its "matrix grid" block):
     ::before  the grid — dark cell lines on the green, faint at rest; on hover / keyboard focus the
               lines brighten and drift downward like the rain behind the ticket
     ::after   the pointer's light — cells near the cursor light up green-bright with a soft halo.
   app.js sets --mx/--my on pointermove for the selectors it tracks; where it does not, the light sits at
   the centre of the control (the 50% defaults) and the drift and the press flash are what move. Reduced
   motion and the ⏸ switch stop both. Type is untouched: the layers sit under the label (isolation + z-index -1) and the
   lines are 1px at 26% ink, so the black label clears the same green it did before.
   The invite shell's own controls (.inv-close, .inv-browse, .inv-code) carry the same block in invite.css
   and share the mx-rain-gate keyframes declared here (the two files are always loaded together). */
.g-btn, .g-x, .g-code { position: relative; isolation: isolate; }
.g-btn::before, .g-x::before, .g-code::before,
.g-btn::after, .g-x::after, .g-code::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
}
.g-btn::before, .g-x::before, .g-code::before {
  background-image:
    linear-gradient(var(--gmx-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--gmx-line) 1px, transparent 1px);
  background-size: var(--gmx-size) var(--gmx-size);
  opacity: 0.42;
  transition: opacity var(--dur-2, 0.16s) ease;
}
/* the mask's stop is any opaque colour — only its alpha is read — so it is the ink rather than a new literal */
.g-btn::after, .g-x::after, .g-code::after {
  background-image:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--gmx-glow) 0, transparent 46px),
    radial-gradient(circle, var(--gmx-cell) 0 1.7px, transparent 2px);
  background-size: 100% 100%, var(--gmx-size) var(--gmx-size);
  background-position: 0 0, calc(var(--gmx-size) / 2) calc(var(--gmx-size) / 2);
  -webkit-mask-image: radial-gradient(circle 48px at var(--mx, 50%) var(--my, 50%), var(--g-ink) 0, transparent 100%);
          mask-image: radial-gradient(circle 48px at var(--mx, 50%) var(--my, 50%), var(--g-ink) 0, transparent 100%);
  opacity: 0;
  transition: opacity var(--dur-2, 0.16s) ease;
}
.g-btn:hover::before, .g-x:hover::before, .g-code:hover::before,
.g-btn:focus-visible::before, .g-x:focus-visible::before, .g-code:focus-visible::before {
  opacity: 0.85;
  animation: mx-rain-gate 1.1s linear infinite;
}
.g-btn:hover::after, .g-x:hover::after, .g-code:hover::after,
.g-btn:focus-visible::after, .g-x:focus-visible::after, .g-code:focus-visible::after { opacity: 1; }
/* the press: every cell lights at once, then the light settles again */
.g-btn:active::after, .g-x:active::after, .g-code:active::after { -webkit-mask-image: none; mask-image: none; opacity: 0.9; }
@keyframes mx-rain-gate { from { background-position: 0 0, 0 0; } to { background-position: 0 var(--gmx-size), 0 0; } }
/* disabled and spent tiles are still tiles, but nothing in them moves or lights */
.g-btn:disabled::before, .g-btn[aria-disabled="true"]::before, .g-code.is-used::before { animation: none; opacity: 0.35; }
.g-btn:disabled::after, .g-btn[aria-disabled="true"]::after, .g-code.is-used::after { display: none; }
html.motion-off .g-btn::before, html.motion-off .g-x::before, html.motion-off .g-code::before { animation: none !important; }
/* the ⏸ switch pauses the ticket's own ambient motion too — the float and the holographic sweep — as reduced motion already does */
html.motion-off .ticket, html.motion-off .ticket::after { animation: none !important; }
/* and the rocket's ease along the countdown rail — a 30 s repaint, not a response to the reader — so both switches stop the same things */
html.motion-off .tk-rocket { transition: none; }
@media (forced-colors: active) {
  .g-btn::before, .g-btn::after, .g-x::before, .g-x::after, .g-code::before, .g-code::after { display: none; }
}
