/* ============================================================================
   ZeroDelay — cyberpunk HUD art direction
   ----------------------------------------------------------------------------
   Loads AFTER zd.css and retunes it. zd.css keeps the layout, forms, buttons
   and RTL logic; this file sets the look.

   The palette is sampled from the logo, not invented. Running the mark through
   a hue histogram gives a dark blue plate (#0e1824) under a glow that sweeps
   cyan -> azure -> electric blue -> violet -> magenta:

       #00edfe   #02c9fe   #0182fe   #0138fd   #6218ff   #9617fc   #c222fc

   Those are the site's colours. Neon cyan leads because it is the brightest
   thing in the mark; violet and magenta follow it; the ground is the plate.
   Anything the logo sits next to therefore belongs to it.

   What keeps this from being the same page as every competitor is the
   structure, not the hue:

   1. HUD framing - hard edges with corner ticks, the way a targeting overlay
      brackets a reading, instead of soft rounded glass.

   2. An instrument grid and scanlines rather than a big blurred bloom. Cheaper
      to render, and it reads as a screen instead of a gradient.

   3. The waveform is the organising motif. The product sells a signal: ping is
      a line, jitter is variance in that line, loss is a gap in it. So a trace
      carries the hero, the comparison and the section rhythm.
   ========================================================================= */

:root {
  /* ── Ground: the logo plate, one step deeper ────────────────────────────── */
  --bg:            #05080f;
  --bg-soft:       #080d18;
  /* Deep navy, not blue-grey. The previous #19243c carried enough grey to read
     as washed out next to a saturated bloom, which is the "whiteness" problem.
     These are pulled toward the blue in the logo plate and darkened, while
     still clearing --bg by enough to stay visible without a border - the cards
     are borderless now, so this luminance step and the shadow are the only
     things separating a card from the page. */
  --surface:       #101a2e;
  --surface-2:     #16223a;
  --surface-3:     #1e2c48;

  --line:          rgba(120, 190, 255, 0.16);
  --line-strong:   rgba(120, 190, 255, 0.30);

  --fg:            #e9f1ff;
  --fg-muted:      #9fadc6;
  /* Clears 4.5:1 on the lightest surface it is used on, which is the binding
     case - it labels stat captions and field hints, not decoration. */
  --fg-dim:        #8b97af;

  /* ── Brand spectrum, straight off the mark ──────────────────────────────── */
  --cyan:          #00dcff;
  --cyan-deep:     #0182fe;
  --blue:          #0138fd;
  --violet:        #9617fc;
  --violet-deep:   #6218ff;
  --magenta:       #c222fc;

  --green:         #2fe6a8;
  --amber:         #ffb340;
  --red:           #ff4d6d;

  /* The RGB triples zd.css builds all 63 of its rgba() values from. Overriding
     them here is what repaints the components; the hex tokens above only cover
     places that use a solid colour. */
  --accent-rgb:    0, 220, 255;
  --violet-rgb:    150, 23, 252;
  --green-rgb:     47, 230, 168;
  --red-rgb:       255, 77, 109;
  --amber-rgb:     255, 179, 64;

  /* ── Geometry ───────────────────────────────────────────────────────────── */
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow:        0 10px 26px -14px rgba(0, 0, 0, 0.85);
  --shadow-lg:     0 24px 52px -22px rgba(0, 0, 0, 0.9);
  /* Neon is the point of the theme, so the glows come back - but as a tight
     ring plus a short bloom, which reads as an emitting edge rather than the
     40px haze that makes text underneath it muddy. */
  --glow-cyan:     0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 0 22px -6px rgba(var(--accent-rgb), 0.55);
  --glow-violet:   0 0 0 1px rgba(var(--violet-rgb), 0.35), 0 0 22px -6px rgba(var(--violet-rgb), 0.5);

  --nav-h:         68px;
  --container:     1240px;

  /* The instrument grid cell. Every vertical rhythm is a multiple of it. */
  --grat:          28px;
}

/* ── Background: graticule, not bloom ─────────────────────────────────────── */
/* Two pools of brand light - cyan from the top-right, violet from the left -
   echoing the way the glow sweeps across the mark. Restrained on purpose: the
   grid and scanlines carry the texture, so these only need to tint. */
.bg-layer::before {
  background:
    radial-gradient(48vw 42vh at 86% -8%, rgba(var(--accent-rgb), 0.10), transparent 62%),
    radial-gradient(42vw 36vh at 2% 6%, rgba(var(--violet-rgb), 0.11), transparent 64%),
    radial-gradient(60vw 40vh at 50% 104%, rgba(1, 56, 253, 0.10), transparent 62%);
  transform: scale(1.04) translate3d(0, 0, 0);
  transform-origin: 50% 30%;
  animation: zd-ambient-drift 14s ease-in-out infinite alternate;
}
.bg-layer::before {
  background-image:
    repeating-linear-gradient(180deg,
      rgba(0, 220, 255, 0.030) 0px, rgba(0, 220, 255, 0.030) 1px,
      transparent 1px, transparent 3px),
    radial-gradient(48vw 42vh at 86% -8%, rgba(var(--accent-rgb), 0.10), transparent 62%),
    radial-gradient(42vw 36vh at 2% 6%, rgba(var(--violet-rgb), 0.11), transparent 64%),
    radial-gradient(60vw 40vh at 50% 104%, rgba(1, 56, 253, 0.10), transparent 62%);
}

/* Scanlines. The signature that says "screen" rather than "gradient", and the
   one piece of the old site's cyberpunk styling worth keeping. Very low
   contrast and 3px apart: legible as texture, invisible as stripes, and it
   never fights the text on top of it. */
.bg-layer {
  --scan: repeating-linear-gradient(
    180deg,
    rgba(0, 220, 255, 0.030) 0px,
    rgba(0, 220, 255, 0.030) 1px,
    transparent 1px,
    transparent 3px
  );
}

.bg-layer::after {
  background-image:
    linear-gradient(rgba(190, 220, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 220, 255, 0.028) 1px, transparent 1px);
  background-size: var(--grat) var(--grat);
  mask-image: radial-gradient(140% 100% at 50% 0%, #000 20%, transparent 82%);
  -webkit-mask-image: radial-gradient(140% 100% at 50% 0%, #000 20%, transparent 82%);
  animation: zd-grid-breathe 8s ease-in-out infinite alternate;
}

@keyframes zd-ambient-drift {
  from { transform: scale(1.04) translate3d(-1.2%, -0.5%, 0); opacity: 0.82; }
  to   { transform: scale(1.09) translate3d(1.2%, 0.8%, 0); opacity: 1; }
}
@keyframes zd-grid-breathe {
  from { opacity: 0.48; }
  to   { opacity: 0.78; }
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
/* Borderless. A flat fill, no white wash over it - a white overlay on a navy
   surface is what made these look grey rather than deep.

   With no stroke, three things keep a card from dissolving into the page: the
   luminance step in --surface, a soft shadow that darkens the ground it sits
   on, and a single hairline of brand-tinted light along the top edge. That top
   line is light catching an edge, not an outline - it never runs down the
   sides, so the card still reads as borderless. */
.card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(140, 200, 255, 0.07),
    0 14px 34px -20px rgba(0, 0, 0, 0.95);
}

/* ── Glow cards ───────────────────────────────────────────────────────────── */
/* A coloured bloom in the corner the icon sits in, bleeding down and across.
   Two layers do it: a wide soft pool for the light and a tighter one at the
   badge itself for the source. Positioned at 100% 0 - the page is RTL, so the
   inline-start corner where the badge sits is the visual top-right.

   --glow-a / --glow-b are per-card, set by the hue variants below, so one rule
   serves every colour instead of one rule per colour. */
.card-glow {
  position: relative;
  overflow: hidden;
  --glow-a: rgba(var(--accent-rgb), 0.30);
  --glow-b: rgba(1, 56, 253, 0.18);
}
.card-glow::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 78%;
  height: 74%;
  pointer-events: none;
  background:
    radial-gradient(90% 90% at 100% 0%, var(--glow-a), transparent 62%),
    radial-gradient(120% 120% at 100% 0%, var(--glow-b), transparent 70%);
  opacity: 0.85;
}
/* Keeps the card's own content above the bloom. */
.card-glow > * { position: relative; z-index: 1; }

.card-glow.glow-violet  { --glow-a: rgba(var(--violet-rgb), 0.34); --glow-b: rgba(98, 24, 255, 0.20); }
.card-glow.glow-teal    { --glow-a: rgba(var(--green-rgb), 0.30);  --glow-b: rgba(0, 220, 255, 0.16); }
.card-glow.glow-blue    { --glow-a: rgba(1, 130, 254, 0.32);       --glow-b: rgba(1, 56, 253, 0.20); }
.card-glow.glow-magenta { --glow-a: rgba(194, 34, 252, 0.30);      --glow-b: rgba(150, 23, 252, 0.18); }

.card-hover {
  transition: transform 0.24s var(--ease-out), border-color 0.24s var(--ease),
              background 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.card-hover:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.30);
  background: var(--surface-2);
  box-shadow:
    inset 0 1px 0 rgba(140, 200, 255, 0.12),
    0 18px 40px -20px rgba(0, 0, 0, 0.95);
}
.card-hover:active { transform: translateY(-1px) scale(0.995); }

.card-feature {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.07), transparent 44%),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(var(--accent-rgb), 0.30),
    0 0 0 1px rgba(var(--accent-rgb), 0.16),
    0 18px 44px -22px rgba(0, 0, 0, 0.95);
}

.stat-tile {
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--line);
}

/* ── Icon badges ──────────────────────────────────────────────────────────── */
/* Gradient-filled tiles with a dark glyph, rather than a tinted outline with a
   coloured glyph. The fill is what makes them the brightest object in the card
   and gives the corner bloom behind them something to be emitted from.

   The glyph colour is the page ground, not black: on a saturated gradient a
   true black reads as a hole, while the ground colour reads as cut-out. */
.feature-icon {
  border: none;
  border-radius: 12px;
  color: #04121c;
  font-size: 18px;
  background: linear-gradient(145deg, var(--cyan), var(--cyan-deep));
  box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), 0.7);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease);
}
.card-hover:hover .feature-icon {
  transform: translateY(-3px) rotate(-4deg) scale(1.06);
}
.card-hover:hover .feature-icon i { animation: zd-icon-pop 0.36s var(--ease-out); }
@keyframes zd-icon-pop {
  0%   { transform: scale(0.88); }
  65%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Small cause-and-effect motion for controls: arrows continue in their stated
   direction and download icons settle downward. No layout properties move. */
.btn i { transition: transform 0.22s var(--ease-out); }
.btn:hover .fa-arrow-left { transform: translateX(-4px); }
.btn:hover .fa-download { transform: translateY(3px); }
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: 12px;
  inset-block-end: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.22s var(--ease-out), opacity 0.22s var(--ease);
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); opacity: 0.9; }
.feature-icon.is-cyan   { color: #04121c; background: linear-gradient(145deg, var(--cyan), var(--cyan-deep)); box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), 0.7); }
.feature-icon.is-violet { color: #0e0420; background: linear-gradient(145deg, #b46bff, var(--violet)); box-shadow: 0 6px 18px -8px rgba(var(--violet-rgb), 0.65); }
.feature-icon.is-green  { color: #04211a; background: linear-gradient(145deg, #5df3c0, var(--green)); box-shadow: 0 6px 18px -8px rgba(var(--green-rgb), 0.6); }
.feature-icon.is-amber  { color: #201404; background: linear-gradient(145deg, #ffd27a, var(--amber)); box-shadow: 0 6px 18px -8px rgba(var(--amber-rgb), 0.55); }
.feature-icon.is-blue   { color: #04121c; background: linear-gradient(145deg, #4a9bff, var(--blue)); box-shadow: 0 6px 18px -8px rgba(1, 56, 253, 0.7); }

/* ── Ambient panel ────────────────────────────────────────────────────────── */
/* The closing call-to-action. Same idea as a glow card but lit from the top
   centre and from both lower corners, so the panel looks like it is sitting in
   light rather than emitting from one corner. */
.card-ambient {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.card-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 58% at 50% -8%, rgba(var(--accent-rgb), 0.22), transparent 66%),
    radial-gradient(52% 60% at 4% 108%, rgba(var(--violet-rgb), 0.20), transparent 68%),
    radial-gradient(52% 60% at 96% 108%, rgba(1, 130, 254, 0.18), transparent 68%);
}
.card-ambient > * { position: relative; z-index: 1; }

/* The logo tile at the top of that panel. */
.ambient-mark {
  width: 68px; height: 68px;
  margin-inline: auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--line);
  box-shadow: 0 0 34px -10px rgba(var(--accent-rgb), 0.6);
}
.ambient-mark img { width: 44px; height: 44px; }

/* ── Gradient CTA ─────────────────────────────────────────────────────────── */
/* Cyan into violet, the full width of the logo's sweep - reserved for the one
   button that closes the page, so it stays special. */
.btn-gradient {
  background: linear-gradient(100deg, var(--cyan), #6aa6ff 46%, var(--violet));
  border-color: transparent;
  color: #04121c;
  font-weight: 800;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb), 0.7);
}
.btn-gradient:hover {
  background: linear-gradient(100deg, #4ae8ff, #86b8ff 46%, #b46bff);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -12px rgba(var(--accent-rgb), 0.8);
}

/* ── Typography: bigger jumps, mono numerals ──────────────────────────────── */
/* This is the rule that actually sizes the hero - it overrides zd.css's own
   .h-display. Estedad sets wider and heavier than the face this replaced, so
   the same 84px/900 that read as confident before now reads as shouting:
   the two hero lines were filling most of the viewport on a laptop. */
.h-display {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -0.028em; line-height: 1.15; }
.h2 { letter-spacing: -0.02em; }

/* The headline sweep runs the same way the glow runs across the mark:
   cyan into violet. Same three stops, same order - so the wordmark and the
   logo above it read as one object. */
.grad-text {
  background: linear-gradient(100deg, var(--cyan) 0%, var(--cyan-deep) 42%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Section eyebrow becomes a measurement label: monospace, tracked, with a
   tick rule rather than a dot. */
.eyebrow {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--cyan);
  border-radius: 0;
  opacity: 0.7;
}
/* Persian eyebrows need the site face, not the mono one. */
.eyebrow-fa {
  font-family: var(--font);
  direction: rtl;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

/* Any number that represents a reading. The whole page leans on these, so
   they get the mono face, tabular figures and a tight track. */
.readout {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.readout-xl { font-size: clamp(40px, 7vw, 76px); }
.readout-lg { font-size: clamp(28px, 4vw, 44px); }
.readout-sm { font-size: 19px; }
.readout-unit {
  font-family: var(--font);
  font-size: 0.34em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fg-dim);
  margin-inline-start: 0.35em;
}

/* ── Buttons: squared, weighty ────────────────────────────────────────────── */
.btn { border-radius: var(--radius-sm); font-weight: 700; }
.btn-lg { border-radius: var(--radius-sm); padding: 15px 30px; }
.btn-sm { border-radius: 3px; }
.btn-primary {
  /* Cyan into azure, the brightest run of the logo sweep. Text is the plate
     colour rather than black: it is what the mark itself sits on, and it keeps
     the button from looking like a sticker dropped onto the page. */
  background: linear-gradient(100deg, var(--cyan), var(--cyan-deep));
  border-color: transparent;
  color: #04121c;
  box-shadow: 0 0 20px -6px rgba(var(--accent-rgb), 0.6);
}
.btn-primary:hover {
  background: linear-gradient(100deg, #4ae8ff, var(--cyan));
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22), 0 0 28px -6px rgba(var(--accent-rgb), 0.7);
  transform: none;
}

.badge { border-radius: 3px; font-family: var(--font); }
.badge-cyan {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: linear-gradient(rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.14)), rgba(7, 12, 20, 0.8);
  color: #7ceaff;
}

/* ── Section rhythm and rules ─────────────────────────────────────────────── */
/* More air between sections rather than a narrower container. Narrowing
   --container would have tightened the multi-column grids - the anatomy
   column is already the narrowest text on the page at ~290px - so the room
   is taken vertically, where nothing competes for it. */
.section { padding-block: 116px; }

/* A hairline rule with a tick at the start, used to open a section. Replaces
   the centred-eyebrow-over-centred-heading pattern that makes every page in
   this category look identical. */
.rule-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-block-end: 22px;
  border-block-end: 1px solid var(--line);
  margin-block-end: 44px;
}
.rule-head .rule-aside { text-align: start; max-width: 38ch; }
@media (max-width: 800px) {
  .rule-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ── The signal rail ──────────────────────────────────────────────────────── */
/* A thin vertical trace pinned to the viewport edge whose fill tracks scroll
   depth. It is the page's one persistent piece of chrome and it is literally
   the product's subject matter. Hidden on small screens, where 4px of edge is
   worth more as content. */
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  z-index: 40;
  background: rgba(190, 220, 255, 0.06);
  pointer-events: none;
}
.rail-fill {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 0;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}
@media (max-width: 900px) { .rail { display: none; } }

/* ── Waveform ─────────────────────────────────────────────────────────────── */
/* The comparison and hero traces. An SVG polyline is drawn by script; this
   only supplies the frame, the graticule behind it and the two state colours. */
.wave {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(rgba(190, 220, 255, 0.022) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(190, 220, 255, 0.022) 1px, transparent 1px) 0 0 / 12.5% 100%,
    rgba(0, 0, 0, 0.34);
  overflow: hidden;
}
.wave svg { display: block; width: 100%; height: 100%; }
.wave-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wave-line.is-good { stroke: var(--cyan); }
.wave-line.is-bad  { stroke: var(--red); }
/* Low enough to read as a tint under the trace rather than a solid block -
   the line is the data, the fill only gives it a floor. */
.wave-area { stroke: none; opacity: 0.09; }
.wave-area.is-good { fill: var(--cyan); }
.wave-area.is-bad  { fill: var(--red); }

/* Loss shows as a vertical break in the trace, which is what it actually is. */
.wave-drop { stroke: var(--red); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.75; }

.wave-tag {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 10px;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 2px;
  background: rgba(7, 12, 20, 0.82);
  border: 1px solid var(--line);
  color: var(--fg-dim);
}

/* ── Comparison ───────────────────────────────────────────────────────────── */
.vs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.vs-side { background: var(--surface); padding: 26px 24px 24px; }
.vs-side.is-off { background: #1e1622; }
.vs-side.is-on  { background: #12243a; }

.vs-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 14.5px;
  margin-block-end: 18px;
}
.vs-side.is-off .vs-head { color: var(--red); }
.vs-side.is-on  .vs-head { color: var(--cyan); }

.vs-rows { display: grid; gap: 1px; background: var(--line); margin-block-start: 20px; }
.vs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 11px 2px;
  background: inherit;
}
.vs-label { font-size: 12.5px; color: var(--fg-muted); }

/* On a phone the two sides stack, and stacked panels need to stay labelled -
   hence the head inside each side rather than a shared column header. */
@media (max-width: 720px) {
  .vs { grid-template-columns: minmax(0, 1fr); }
}

/* ── Packet journey ───────────────────────────────────────────────────────── */
/* Numbered hops down a vertical trace. The rail is on the list so it does not
   break between items, and each hop's dot sits on it. */
.hops { position: relative; padding-inline-start: 46px; }
.hops::before {
  content: '';
  position: absolute;
  inset-block: 14px 14px;
  inset-inline-start: 15px;
  width: 1px;
  background: linear-gradient(180deg, var(--red), var(--amber) 45%, var(--cyan));
  opacity: 0.5;
}
.hop { position: relative; padding-block-end: 30px; }
.hop:last-child { padding-block-end: 0; }
.hop-dot {
  position: absolute;
  inset-inline-start: -46px;
  inset-block-start: 2px;
  width: 31px; height: 31px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  border: 1px solid var(--line);
  /* Darker than the card, not lighter: the hop number reads as recessed into
     the trace, and --fg-muted on this ground clears 4.5:1 - which it did not
     on --surface-2 (it measured 4.43). */
  background: rgba(0, 0, 0, 0.34);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
}
.hop.is-problem .hop-dot { border-color: rgba(var(--red-rgb), 0.5); color: var(--red); }
.hop.is-fix .hop-dot { border-color: rgba(var(--accent-rgb), 0.5); color: var(--cyan); background: rgba(var(--accent-rgb), 0.14); }

/* ── Marquee ──────────────────────────────────────────────────────────────── */
.game-chip {
  border-radius: 3px;
  border-color: var(--line);
  background: var(--surface);
}

/* ── Plans ────────────────────────────────────────────────────────────────── */
.plan-ribbon { border-radius: 0 0 3px 3px; }
.plan-amount { font-family: var(--font-mono); letter-spacing: -0.03em; }

/* ── Reduced motion ───────────────────────────────────────────────────────── */
/* The waveform animates by default; someone who has asked the OS for less
   motion gets a static trace instead of a moving one. The trace still renders,
   so no information is lost. */
@media (prefers-reduced-motion: reduce) {
  .rail-fill { transition: none; }
  .bg-layer::before,
  .bg-layer::after,
  .card-hover:hover .feature-icon i { animation: none; }
}

/* ── Marquee: second track runs the other way ─────────────────────────────── */
/* The two rows sliding in the same direction read as one thick band. Opposing
   directions read as two, which is the point of having two. zd.css defines the
   base keyframes plus an RTL variant, so the reverse needs both. */
.marquee-track.is-reverse { animation-direction: reverse; }

/* ── Trust seal ───────────────────────────────────────────────────────────── */
/* Enamad supplies its own coloured badge image, so the frame stays neutral and
   just gives it a resting place that matches the panels around it. */
.enamad {
  display: inline-flex;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  /* Matches the panels rather than sitting on a pale tile - the seal image is
     already a light logo, so it does not need a light ground under it. */
  background: var(--surface);
  transition: border-color 0.2s var(--ease);
}
.enamad:hover { border-color: rgba(var(--accent-rgb), 0.4); }
.enamad img { display: block; height: 56px; width: auto; }

/* ══ Imported from the Claude Design project ═══════════════════════════════
   Three pieces were taken across: the hero background, the world map, and the
   game-library table. Everything else on the page stays as it was.
   ========================================================================= */

/* ── Hero background ──────────────────────────────────────────────────────── */
/* A particle constellation on a canvas, under two brand-coloured pools and a
   masked grid. The canvas is decorative and carries no information, so it is
   aria-hidden and simply stops drawing when the user asks for reduced motion. */
.hero-v { position: relative; overflow: hidden; }

.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-fx canvas { width: 100%; height: 100%; display: block; opacity: 0.85; }

.hero-fx-pools,
.hero-fx-grid { position: absolute; inset: 0; }

.hero-fx-pools {
  background:
    radial-gradient(70% 60% at 75% 10%, rgba(56, 140, 255, 0.22), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(176, 124, 255, 0.16), transparent 70%);
}
.hero-fx-grid {
  background-image:
    linear-gradient(rgba(124, 152, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 152, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}

/* The hero's own content has to sit above the effect layer. */
.hero-v > .container { position: relative; z-index: 1; }

/* ── World map ────────────────────────────────────────────────────────────── */
.map-frame {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 19, 40, 0.7), rgba(6, 8, 16, 0.7));
  padding: 18px;
  overflow: hidden;
}
.map-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 152, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 152, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-canvas { position: relative; width: 100%; min-height: 300px; }
.map-canvas svg { display: block; width: 100%; height: auto; }

.map-legend {
  position: relative;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 8px 4px;
  font-size: 12px;
  color: var(--fg-muted);
}
.map-legend span { display: flex; align-items: center; gap: 7px; }
.map-key {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}
.map-key.is-origin { background: var(--magenta); box-shadow: 0 0 9px var(--magenta); }
.map-key.is-line { width: 16px; height: 2px; border-radius: 0; background: var(--cyan); box-shadow: none; }

/* On a phone the map is not a map. A world projection squeezed into 340px puts
   four labelled dots inside a shape too small to read as geography, and the
   arcs between them turn into scribble. The node cards below say the same
   thing - country, city, routes - in text that fits, so the drawing goes and
   the list stays. */
@media (max-width: 700px) {
  .map-frame { display: none; }
  #nodeGrid { margin-block-start: 0 !important; }
}

/* The node rings pulse to show the network is live. Both the pulse and the
   travelling dash on each arc stop under reduced-motion. */
@keyframes zd-node-pulse {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
.zd-node { transform-box: fill-box; transform-origin: center; animation: zd-node-pulse 2.6s ease-out infinite; }

@keyframes zd-arc-flow { to { stroke-dashoffset: -28; } }
.zd-arc { stroke-dasharray: 3 9; animation: zd-arc-flow 1.4s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .zd-node { animation: none; opacity: 0.45; }
  .zd-arc  { animation: none; stroke-dasharray: none; }
}

/* ── Request-feed avatar ──────────────────────────────────────────────────── */
/* All that is left of the folded game table: /games carries the library now,
   and the feed below the booth still draws an initial per row. */
.gl-avatar {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #04121c;
}

/* ── Packet lab ───────────────────────────────────────────────────────────── */
/* The ping / jitter / loss demonstrator. A canvas carries the packet
   animation; everything around it is ordinary markup so it stays legible,
   selectable and translatable. Colours come from the site tokens rather than
   the hardcoded hexes the design file shipped with. */
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px) { .lab { grid-template-columns: minmax(0, 1fr); } }

.lab-stage {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.66), rgba(5, 8, 15, 0.72));
  overflow: hidden;
  min-height: 330px;
}
/* A hairline of light along the top edge, inset from the corners so it reads
   as a lit seam rather than a border. */
.lab-stage::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.lab-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
}
.lab-canvas { width: 100%; height: 300px; display: block; }
@media (max-width: 560px) { .lab-canvas { height: 230px; } }

.lab-side { display: flex; flex-direction: column; gap: 14px; }
.lab-panel {
  border-radius: var(--radius);
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(22, 34, 58, 0.7), rgba(5, 8, 15, 0.6));
}

/* Arrival rows: a dot, a bar scaled to the trip time, and the number. */
.lab-rows { display: flex; flex-direction: column; gap: 7px; }
.lab-row { display: flex; align-items: center; gap: 10px; }
.lab-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lab-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(120, 190, 255, 0.1);
  overflow: hidden;
}
.lab-bar { height: 100%; border-radius: 99px; transition: width 0.25s var(--ease); }
.lab-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-width: 54px;
  text-align: start;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mode tabs */
.lab-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-tab {
  border: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.6);
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 999px;
  transition: all 0.18s var(--ease);
}
.lab-tab:hover { color: var(--fg); border-color: var(--line-strong); }
.lab-tab.is-active { color: #fff; font-weight: 800; }

/* Explanation strip under the stage */
.lab-note {
  margin-block-start: 16px;
  border-radius: var(--radius);
  padding: 22px 24px;
  background: linear-gradient(95deg, rgba(24, 38, 66, 0.7), rgba(5, 8, 15, 0.5));
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.lab-note-aside {
  flex: 1;
  min-width: 240px;
  border-inline-start: 2px solid rgba(var(--accent-rgb), 0.4);
  padding-inline-start: 16px;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ── In-game impact ───────────────────────────────────────────────────────── */
.imp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}
.imp-card { border-radius: var(--radius); padding: 20px; }
.imp-card.is-ping   { background: linear-gradient(180deg, rgba(22, 34, 58, 0.6), rgba(5, 8, 15, 0.6)); }
.imp-card.is-jitter { background: linear-gradient(180deg, rgba(34, 22, 60, 0.6), rgba(5, 8, 15, 0.6)); }
.imp-card.is-loss   { background: linear-gradient(180deg, rgba(46, 18, 30, 0.55), rgba(5, 8, 15, 0.6)); }

.imp-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.08em;
}

/* The little animated scenes. Each is a grid with one or two moving marks -
   enough to read as "this is what that number does" without a video. */
.imp-scene {
  position: relative;
  height: 84px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(120, 190, 255, 0.07) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(120, 190, 255, 0.07) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, rgba(5, 8, 15, 0.9), rgba(5, 8, 15, 0.95));
  overflow: hidden;
  margin-block-end: 14px;
}
.imp-mark { position: absolute; }

@keyframes zd-act  { 0%,18% { transform: scale(1); opacity: 1; } 30%,100% { transform: scale(.7); opacity: .35; } }
@keyframes zd-hit  { 0%,42% { opacity: 0; transform: scale(.6); } 56% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes zd-tele { 0%,35% { transform: translateX(0); } 42%,62% { transform: translateX(-46px); } 70%,100% { transform: translateX(-14px); } }
@keyframes zd-gone { 0%,44% { opacity: 1; } 52%,74% { opacity: 0; } 82%,100% { opacity: 1; } }
@keyframes zd-drift { from { transform: translateX(0); } to { transform: translateX(-190px); } }

@media (prefers-reduced-motion: reduce) {
  .imp-mark { animation: none !important; }
}

/* Before / after summary */
.imp-compare {
  margin-block-start: 18px;
  border-radius: var(--radius);
  padding: 22px 24px;
  background: linear-gradient(95deg, rgba(20, 40, 70, 0.75), rgba(5, 8, 15, 0.6));
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.imp-figures { display: flex; gap: 26px; flex-wrap: wrap; }
.imp-figure { text-align: center; }
.imp-before {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.75;
}
.imp-after { font-family: var(--font-mono); font-size: 22px; font-weight: 800; line-height: 1.3; }

/* ── Ticket desk ──────────────────────────────────────────────────────────── */
/* The game library, rebuilt as a booth: you name a game and a machine prints
   either a boarding pass or a request slip. The point of the metaphor is that
   "we do not have it" stops being a dead end - the same gesture that gets a
   pass gets a numbered receipt instead, so a miss is still an answer.

   Everything on the dark side uses the site tokens. The ticket itself is the
   one light surface on the page, and it is meant to be: a receipt reads as
   paper or it reads as nothing. */

.tk-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) {
  /* The printer goes on top when it stops being a sidebar: the ticket is the
     output, and an output below the fold is an output nobody sees. */
  .tk-desk { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .tk-printer { order: -1; }
}

.tk-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ── What "supported" covers ──────────────────────────────────────────────── */
/* One line of facts instead of a grid of counters. Counters here had to be
   fetched, and two of them read zero until an admin had filed something - a
   section whose job is to say "yes we support that" cannot open with zeros. */
.tk-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--fg-dim);
}
.tk-scope li { display: flex; align-items: center; gap: 7px; }
.tk-scope i { color: var(--fg-muted); font-size: 12px; }
.tk-scope b { color: var(--fg-muted); font-weight: 700; }

/* ── Search ───────────────────────────────────────────────────────────────── */
.tk-search { position: relative; }
.tk-search-row { display: flex; gap: 10px; }
.tk-field {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  direction: ltr;
  text-align: left;
}
/* A game name is Latin far more often than not, and the field is typed into in
   both scripts. Isolating it keeps a Persian title from dragging the Latin one
   around when someone types both. */
.tk-field::placeholder { direction: ltr; text-align: left; }
.tk-print-btn { white-space: nowrap; flex: none; }

.tk-sugg {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 8px);
  z-index: 30;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden auto;
  max-height: 292px;
}
.tk-sugg-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-block-end: 1px solid rgba(var(--accent-rgb), 0.08);
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.tk-sugg-item:last-child { border-block-end: none; }
.tk-sugg-item:hover,
.tk-sugg-item.is-active { background: rgba(var(--accent-rgb), 0.12); }
.tk-sugg-name {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-sugg-tag { margin-inline-start: auto; font-size: 11px; color: var(--fg-dim); flex: none; }
.tk-mark { color: var(--cyan); background: none; font-weight: 800; }

/* ── Quick picks ──────────────────────────────────────────────────────────── */
/* One row, always. Wrapping turned five shortcuts into three stacked lines that
   pushed the ticket off screen, so the row scrolls sideways instead and the
   mask tells you there is more of it. */
.tk-quick-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tk-quick-label { flex: none; font-size: 12.5px; color: var(--fg-dim); }
.tk-quick {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block-end: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Symmetrical, so it reads the same in either direction. */
  /* Only the scrolling end fades; the labelled end never has content sliding
     under it. */
  mask-image: linear-gradient(to left, transparent 0, #000 26px, #000 100%);
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 26px, #000 100%);
}
.tk-quick::-webkit-scrollbar { display: none; }
.tk-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--accent-rgb), 0.05);
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.tk-chip:last-child { margin-inline-end: 22px; }
.tk-chip:hover { background: rgba(var(--accent-rgb), 0.14); border-color: var(--line-strong); color: var(--fg); }

/* ── The miss ─────────────────────────────────────────────────────────────── */
/* Shown the moment the typed name stops matching anything, before any button is
   pressed. Waiting for a click to say "not in the list" makes the visitor ask
   twice for one answer. */
.tk-miss {
  border: 1px dashed rgba(var(--amber-rgb), 0.42);
  border-radius: var(--radius);
  background: rgba(var(--amber-rgb), 0.07);
  padding: 16px 17px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tk-miss-head { display: flex; align-items: flex-start; gap: 10px; }
.tk-miss-head i { color: var(--amber); font-size: 15px; margin-block-start: 2px; flex: none; }
.tk-miss-title { font-size: 14px; color: var(--amber); font-weight: 600; }
.tk-miss-sub { font-size: 12.5px; color: var(--fg-muted); margin-block-start: 4px; }
.tk-miss-row { display: flex; gap: 9px; flex-wrap: wrap; }
.tk-miss-row .field { flex: 1; min-width: 168px; }
/* The submit is the card's one action and the card is amber, so a cyan primary
   would read as belonging to something else on the page. */
.tk-miss-row .btn {
  border-color: rgba(var(--amber-rgb), 0.5);
  background: rgba(var(--amber-rgb), 0.14);
  color: var(--amber);
  flex: none;
}
.tk-miss-row .btn:hover {
  background: rgba(var(--amber-rgb), 0.24);
  border-color: rgba(var(--amber-rgb), 0.7);
}
.tk-miss-note { font-size: 11.5px; color: var(--fg-dim); }
.tk-miss-err { font-size: 12.5px; color: var(--red); }

.tk-ok {
  border: 1px solid rgba(var(--green-rgb), 0.35);
  border-radius: var(--radius);
  background: rgba(var(--green-rgb), 0.08);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--green);
}

/* ── Feed ─────────────────────────────────────────────────────────────────── */
.tk-feed {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 19, 40, 0.55), rgba(6, 8, 16, 0.55));
  overflow: hidden;
}
.tk-tabs { display: flex; border-block-end: 1px solid var(--line); }
.tk-tab {
  flex: 1;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.tk-tab:hover { color: var(--fg-muted); background: rgba(var(--accent-rgb), 0.04); }
.tk-tab[aria-selected="true"] { color: var(--fg); background: rgba(var(--accent-rgb), 0.07); }
.tk-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}
.tk-tab-n {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 11px;
  color: var(--fg-dim);
  margin-inline-start: 6px;
}

.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 17px;
  border-block-end: 1px solid rgba(var(--accent-rgb), 0.07);
  font-size: 13px;
}
.tk-list li:last-child { border-block-end: none; }
.tk-list-name {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-list-meta { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.tk-votes { font-size: 11.5px; color: var(--fg-dim); }
.tk-badge {
  font-size: 11.5px;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tk-badge.is-added   { color: var(--fg-dim); border: none; padding: 0; }
.tk-badge.is-queued,
.tk-badge.is-review  { color: var(--fg-dim); background: rgba(var(--accent-rgb), 0.06); border-color: var(--line); }
/* One green dot carries "shipped" - a filled green pill on every row made the
   list shout at the ticket next to it. */
.tk-badge.is-added::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-inline-end: 7px;
  vertical-align: 1px;
}
.tk-empty { padding: 24px 18px; text-align: center; font-size: 12.5px; color: var(--fg-dim); }

/* ── Printer ──────────────────────────────────────────────────────────────── */
.tk-printer { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.tk-machine {
  /* Capped rather than full-width: stacked, the desk is a 304px column with a
     268px ticket under it, and a machine stretched to the container reads as a
     divider instead of a printer. Deliberately low contrast - the ticket is the
     only thing in this section that should pull the eye. */
  width: 100%;
  max-width: 304px;
  border-radius: var(--radius) var(--radius) 4px 4px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.1);
  padding: 12px 14px 9px;
}
.tk-machine-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--fg-dim);
  margin-block-end: 9px;
}
/* The live dot is the one thing on the machine that moves while it is idle -
   enough to say the booth is open without animating the whole panel. */
.tk-led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(var(--green-rgb), 0.8);
  animation: tk-led 2.4s ease-in-out infinite;
}
@keyframes tk-led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.tk-mouth {
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, #000 0%, #060a12 58%, rgba(var(--accent-rgb), 0.18) 100%);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.95);
}

.tk-paper {
  position: relative;
  width: 268px;
  max-width: 100%;
  box-sizing: border-box;
  margin-block-start: -6px;
  background: linear-gradient(180deg, #f3f7fd, #e4ecf7);
  color: #16203a;
  padding: 18px 19px 30px;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 18px 38px -14px rgba(0, 0, 0, 0.85);
  /* Torn bottom edge. A polygon rather than a mask so it renders the same
     everywhere; the worst failure is a straight edge, not a missing ticket. */
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 7px),
    95% 100%, 90% calc(100% - 7px), 85% 100%, 80% calc(100% - 7px),
    75% 100%, 70% calc(100% - 7px), 65% 100%, 60% calc(100% - 7px),
    55% 100%, 50% calc(100% - 7px), 45% 100%, 40% calc(100% - 7px),
    35% 100%, 30% calc(100% - 7px), 25% 100%, 20% calc(100% - 7px),
    15% 100%, 10% calc(100% - 7px), 5% 100%, 0 calc(100% - 7px)
  );
  animation: tk-print 0.55s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes tk-print {
  from { transform: translateY(-92%) rotate(-0.6deg); opacity: 0; }
  to   { transform: translateY(0) rotate(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-paper { animation: none; }
  .tk-led { animation: none; }
}

.tk-paper-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #5c6b88;
}
.tk-kind { color: #16203a; }

.tk-paper-body {
  border-block: 1px dashed #9aa9c2;
  margin-block: 12px;
  padding-block: 13px;
  text-align: center;
}
.tk-game {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tk-game-sub { font-size: 12px; color: #5c6b88; margin-block-start: 5px; }

.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 10px; font-size: 11.5px; }
.tk-cell-l { color: #5c6b88; }
.tk-cell-v { font-weight: 700; margin-block-start: 2px; overflow-wrap: anywhere; }
.tk-cell-v.is-mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.tk-cell-v.is-ok   { color: #0a6b45; }
.tk-cell-v.is-wait { color: #8a5605; }

/* space-between rather than a fixed gap: the bars are generated at a handful of
   widths, and letting the row distribute the slack makes it span the ticket at
   any width instead of clustering against one edge. */
.tk-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  height: 40px;
  margin: 15px 0 7px;
}
.tk-bars span { flex: 0 0 auto; background: #16203a; border-radius: 1px; }

.tk-no {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 11px;
  letter-spacing: 2px;
  text-align: center;
}
.tk-fine {
  font-size: 10.5px;
  color: #5c6b88;
  text-align: center;
  margin-block-start: 9px;
  line-height: 1.6;
}

/* The stub: a perforation and one line of what to do next. Two notches bitten
   out of the sides sell the tear better than the dashed rule alone. */
.tk-stub {
  position: relative;
  margin-block-start: 13px;
  padding-block-start: 13px;
  border-block-start: 1px dashed #9aa9c2;
  text-align: center;
}
.tk-stub::before,
.tk-stub::after {
  content: "";
  position: absolute;
  inset-block-start: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
}
.tk-stub::before { inset-inline-start: -26px; }
.tk-stub::after  { inset-inline-end: -26px; }
.tk-stub .btn { width: 100%; }

.tk-blank {
  width: 268px;
  max-width: 100%;
  box-sizing: border-box;
  margin-block-start: -6px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  padding: 46px 20px;
  text-align: center;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--fg-dim);
  background: rgba(var(--accent-rgb), 0.03);
}
.tk-hint { font-size: 11.5px; color: var(--fg-dim); text-align: center; max-width: 268px; }

/* ── Full list ────────────────────────────────────────────────────────────── */
/* The booth answers "do you have X". /games answers "what do you have", which
   is a different question people also arrive with -- so this is a link out to
   that page rather than a panel that unfolds a second copy of the list. */
.tk-all-link {
  border-top: 1px solid var(--line);
  margin-block: 4px 0;
  padding-block-start: 16px;
}
