/* ==========================================================================
   CM HUB — monochrome interface
   Black and white, depth from light rather than colour, motion that settles.
   Class names are unchanged, so markup and scripts stay as they are.
   ========================================================================== */

:root {
  /* surfaces, darkest to lightest */
  --bg:        #050505;
  --bg-2:      #090909;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --raised:    rgba(255, 255, 255, 0.08);

  /* lines */
  --line:        rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-bright: rgba(255, 255, 255, 0.42);

  /* type */
  --text:  #f4f4f5;
  --muted: #a3a3a8;
  --dim:   #6a6a70;
  --faint: #45454b;

  /* the only "colours" are shades of white */
  --accent:      #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.72);

  /* status still needs to be legible without hue */
  --good: #ffffff;
  --warn: #b9b9be;
  --bad:  #8a8a90;

  --radius:    16px;
  --radius-sm: 11px;

  /* depth: a dark drop below, a bright edge above */
  --lift-1: 0 1px 0 rgba(255,255,255,0.06) inset, 0 2px 6px rgba(0,0,0,0.55);
  --lift-2: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 30px rgba(0,0,0,0.65);
  --lift-3: 0 1px 0 rgba(255,255,255,0.12) inset, 0 22px 60px rgba(0,0,0,0.8);
  --glow:   0 0 0 1px rgba(255,255,255,0.14), 0 12px 40px rgba(255,255,255,0.07);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Segoe UI', Inter, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  perspective: 1400px;          /* gives children somewhere to tilt into */
}

/* --- backdrop ------------------------------------------------------------ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 620px at 50% -12%, rgba(255,255,255,0.09), transparent 62%),
    radial-gradient(760px 520px at 12% 8%,  rgba(255,255,255,0.045), transparent 58%),
    radial-gradient(760px 520px at 88% 4%,  rgba(255,255,255,0.035), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, #000 100%);
}

.bg-grid {
  position: fixed;
  inset: -20%;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 62px 62px;
  transform: rotateX(58deg) translateZ(-160px) scale(1.9);
  transform-origin: 50% 0%;
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  animation: floor 34s linear infinite;
  opacity: 0.55;
}
@keyframes floor {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 620px, 0 0; }
}

/* --- layout -------------------------------------------------------------- */
.wrap { width: min(1140px, 92vw); margin: 0 auto; }
.section { padding: 76px 0; }
main { min-height: calc(100vh - 220px); }

p { margin: 0 0 12px; }
h2 { font-size: clamp(25px, 3.4vw, 36px); margin: 0 0 10px; font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 17px; margin: 0 0 8px; font-weight: 650; letter-spacing: -0.01em; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head p { color: var(--muted); margin: 0; }

/* --- header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 14px;
  transition: opacity 0.3s var(--ease);
}
.brand:hover { opacity: 0.75; }
.brand .mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(160deg, #ffffff 0%, #c8c8cc 55%, #8e8e94 100%);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--lift-2), 0 0 0 1px rgba(255,255,255,0.25);
  transition: transform 0.45s var(--ease);
}
.brand:hover .mark { transform: rotateY(180deg); }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  padding: 8px 15px;
  border-radius: 9px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: #000; background: var(--accent); font-weight: 650; }

/* --- hero ---------------------------------------------------------------- */
.hero { padding: 92px 0 44px; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: var(--lift-1);
  animation: rise 0.7s var(--ease) both;
}

h1 {
  margin: 24px 0 16px;
  font-size: clamp(40px, 7.4vw, 78px);
  line-height: 1.0;
  font-weight: 800;
  letter-spacing: -0.045em;
  animation: rise 0.7s var(--ease) 0.06s both;
}

/* the old accent class, now light on light */
.gradient {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 40%, #8a8a90 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 12px 40px rgba(255,255,255,0.12);
}

.lead {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17.5px);
  animation: rise 0.7s var(--ease) 0.12s both;
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  background: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%);
  box-shadow: var(--lift-2), 0 0 0 1px rgba(255,255,255,0.2);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), opacity 0.2s;
  transform-style: preserve-3d;
}
.btn:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: var(--lift-3), 0 0 0 1px rgba(255,255,255,0.35), 0 0 44px rgba(255,255,255,0.13);
}
.btn:active { transform: translateY(1px) scale(0.99); box-shadow: var(--lift-1); }
.btn[disabled], .btn.is-loading { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: var(--lift-1); }

.btn-lg { padding: 17px 40px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 9px; }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--lift-1);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-bright);
  box-shadow: var(--lift-2);
}

.btn-danger {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
  border-color: rgba(255,255,255,0.3);
}
.btn-danger:hover { background: rgba(255,255,255,0.16); border-color: #fff; color: #fff; }

.btn-row { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* --- cards --------------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--lift-2);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* a hairline of light along the top edge sells the depth */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  opacity: 0.7;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.feature { transform-style: preserve-3d; }
.feature:hover {
  transform: translateY(-5px) rotateX(3deg);
  box-shadow: var(--lift-3);
  border-color: var(--line-strong);
}
.feature .icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 20px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  box-shadow: var(--lift-1);
  margin-bottom: 15px;
  filter: grayscale(1) contrast(1.1);
}
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* --- duration options ---------------------------------------------------- */
.options { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.option {
  position: relative;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--lift-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  transform-style: preserve-3d;
}
.option:hover {
  transform: translateY(-6px) rotateX(3deg);
  border-color: var(--line-strong);
  box-shadow: var(--lift-3);
}
.option.selected {
  border-color: var(--accent);
  box-shadow: var(--glow), var(--lift-3);
  transform: translateY(-4px);
}
.option .hours { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.option .hours span { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 7px; letter-spacing: 0; }
.option .meta { color: var(--muted); font-size: 14px; margin-top: 11px; }
.option .badge-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* --- provider route selector --------------------------------------------- */
.provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.provider-option {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 18px;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), transparent 48%),
    var(--surface);
  box-shadow: var(--lift-2);
  transition: transform .32s var(--ease), border-color .32s var(--ease), box-shadow .32s var(--ease);
}

.provider-option:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--lift-3);
}
.provider-option:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.provider-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), var(--glow), var(--lift-3);
}

.provider-logo {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 15px;
  color: #080808;
  background: #f4f4f4;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: inset 0 -7px 15px rgba(0,0,0,.12);
}

.workink-logo { border-radius: 50%; }
.linkvertise-logo { font-size: 13px; }
.provider-copy { display: grid; gap: 4px; min-width: 0; }
.provider-copy strong { font-size: 16px; }
.provider-copy span { color: var(--muted); font-size: 12px; }
.provider-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #070707;
  background: #fff;
  font-size: 12px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.provider-option.selected .provider-check { opacity: 1; transform: scale(1); }
.provider-option.unavailable { opacity: .42; cursor: not-allowed; filter: grayscale(1); }
.provider-note { min-height: 20px; margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.duration-head { margin-top: 44px; }

.human-check {
  width: min(100%, 520px);
  margin: 0 auto 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: var(--lift-2);
}
.human-check[hidden] { display: none; }
.human-check-copy { display: flex; align-items: center; gap: 11px; }
.human-check-copy > span:last-child { display: grid; gap: 2px; }
.human-check-copy strong { font-size: 14px; }
.human-check-copy small { color: var(--muted); font-size: 11px; }
.human-check-copy small[data-state="verified"] { color: #f5f5f5; }
.human-check-copy small[data-state="error"] { color: #b9b9be; }
.human-check-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px #090909;
}
.turnstile-widget { width: 100%; min-height: 65px; overflow: hidden; border-radius: 8px; }

@media (max-width: 620px) {
  .provider-options { grid-template-columns: 1fr; }
  .provider-option { min-height: 80px; }
}

/* --- supported games ------------------------------------------------------ */
.games-summary {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.games-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: var(--lift-2);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
}
.game-card:hover {
  transform: translateY(-6px) rotateX(4deg);
  border-color: var(--line-strong);
  box-shadow: var(--lift-3);
}
.game-card:active { transform: translateY(-2px) scale(0.99); }

.game-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  box-shadow: var(--lift-1);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* the palette is monochrome; icons join it rather than fight it */
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.45s var(--ease), transform 0.45s var(--ease);
}
.game-card:hover .game-icon { transform: translateZ(20px) scale(1.04); }
.game-card:hover .game-icon img { filter: grayscale(0.15) contrast(1.05); }

/* no icon set, or the URL stopped resolving */
.game-icon.is-fallback::after {
  content: attr(data-initials);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.05em;
}

.game-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.game-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.is-working .game-status {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}
.is-maintenance .game-status {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}
/* a maintenance card recedes, so working games read first */
.is-maintenance { opacity: 0.62; }
.is-maintenance:hover { opacity: 1; }
.is-maintenance .game-icon img { filter: grayscale(1) brightness(0.7); }

@media (max-width: 620px) {
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
  .game-icon { width: 62px; height: 62px; border-radius: 15px; }
  .game-card { padding: 16px 12px; }
}

/* --- pills --------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--lift-1);
}
.pill.good { color: #000; background: var(--accent); border-color: var(--accent); }
.pill.neon { color: var(--text); background: var(--raised); border-color: var(--line-bright); }
.pill.warn { color: var(--warn); border-color: rgba(255,255,255,0.24); }
.pill.bad  { color: var(--bad); border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.02); }

/* --- checkpoint steps ---------------------------------------------------- */
.checkpoint-control {
  overflow: hidden;
  border-color: var(--line-bright);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 22px 100%,
    var(--surface);
}
.checkpoint-control::before {
  content: 'LIVE TELEMETRY';
  position: absolute;
  top: 12px;
  right: 16px;
  color: rgba(255,255,255,0.08);
  font: 10px var(--mono);
  letter-spacing: 0.22em;
}
.checkpoint-control-title { display: flex; align-items: center; gap: 14px; }
.checkpoint-control-title h3 { margin: 0; font-size: 21px; }
.checkpoint-control-title .eyebrow { animation: none; margin-bottom: 7px; }
.control-beacon {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06), 0 0 24px rgba(255,255,255,0.32);
  animation: breathe 2.6s var(--ease) infinite;
}
.checkpoint-health-strip { display: grid; gap: 8px; }
.health-line {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(160px, 2fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28);
  font-size: 12px;
}
.health-meter { height: 5px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,0.08); }
.health-meter > span { display: block; height: 100%; background: var(--accent); }
.health-line[data-health="failing"] .health-meter > span,
.health-line[data-health="degraded"] .health-meter > span { opacity: 0.45; }
.checkpoint-add-grid { display: grid; grid-template-columns: 1fr 2fr 2fr 120px auto; gap: 10px; align-items: end; }
.checkpoint-route-stack { display: grid; gap: 7px; min-width: 270px; }
.checkpoint-route-stack label { display: grid; grid-template-columns: 62px 1fr; gap: 7px; align-items: center; font-size: 10px; color: var(--dim); }
.checkpoint-route-stack input { min-width: 220px; }
.checkpoint-health-cell { min-width: 125px; font-size: 11px; }
.checkpoint-health-cell strong { display: block; margin-top: 5px; }
.checkpoint-diagnostics { border-style: dashed; }
.receipt-lookup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 13px; border-top: 1px solid var(--line); }
.receipt-lookup input { width: 190px; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.diagnostic-check { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.receipt-tag { font: 10px var(--mono); letter-spacing: 0.08em; color: var(--muted); }
.attempt-console {
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.32);
}
.attempt-console .spread { align-items: center; }
.resume-banner { margin: 0 0 16px; border-left: 3px solid var(--accent); }

.steps { display: grid; gap: 13px; margin: 26px 0; }

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--lift-1);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.4s var(--ease), opacity 0.4s var(--ease);
}
.step .dot {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  color: var(--dim);
  background: var(--raised);
  box-shadow: var(--lift-1);
  transition: all 0.4s var(--ease);
}
.step .label { font-weight: 600; }
.step .sub { color: var(--dim); font-size: 13px; }
.step .state { margin-left: auto; }

.step.available {
  border-color: var(--line-bright);
  box-shadow: var(--glow), var(--lift-2);
  transform: translateX(3px);
}
.step.available .dot {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
  animation: breathe 2.6s var(--ease) infinite;
}
.step.completed { border-color: var(--line-strong); background: var(--surface-2); }
.step.completed .dot { color: #000; background: var(--accent); border-color: var(--accent); }
.step.locked { opacity: 0.4; }

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50%      { box-shadow: 0 0 0 9px rgba(255,255,255,0); }
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  margin: 20px 0 7px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a8a90, #ffffff);
  box-shadow: 0 0 18px rgba(255,255,255,0.35);
  transition: width 0.7s var(--ease);
}
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

/* --- alerts -------------------------------------------------------------- */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--lift-1);
  font-size: 14px;
  margin-bottom: 18px;
  animation: rise 0.45s var(--ease) both;
}
.alert.error   { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.07); }
.alert.success { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); }
.alert.warn    { border-color: rgba(255,255,255,0.2); }
.alert[hidden] { display: none; }

/* --- the key ------------------------------------------------------------- */
.key-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-bright);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  box-shadow: var(--lift-2);
  margin: 22px 0;
  overflow: hidden;
}
/* a slow sweep of light across the key */
.key-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.09) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: sweep 4.5s var(--ease) infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }

.key-value {
  font-family: var(--mono);
  font-size: clamp(17px, 3.6vw, 29px);
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #fff;
  text-shadow: 0 0 28px rgba(255,255,255,0.35);
  word-break: break-all;
  text-align: center;
}

.countdown {
  font-family: var(--mono);
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- stats --------------------------------------------------------------- */
.stat-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }
.stat {
  padding: 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--lift-1);
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
.stat .k { color: var(--dim); font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat .v.sm { font-size: 14.5px; }

/* --- forms --------------------------------------------------------------- */
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 550; }

input, select, textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  border-color: var(--line-bright);
  background: rgba(0,0,0,0.6);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 0 0 3px rgba(255,255,255,0.09);
}
input.mono { font-family: var(--mono); letter-spacing: 0.09em; text-transform: uppercase; }
select option { background: #0d0d0d; color: var(--text); }

.field { margin-bottom: 16px; }
/* Three changelog boxes side by side on a wide editor, stacking on a phone. */
.changelog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.changelog-grid label { font-size: 12.5px; margin-bottom: 5px; }
@media (max-width: 720px) { .changelog-grid { grid-template-columns: 1fr; } }

.inline-form { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-form > * { flex: 1 1 200px; }
.inline-form .btn { flex: 0 0 auto; }

/* --- faq ----------------------------------------------------------------- */
details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  background: var(--surface);
  box-shadow: var(--lift-1);
  margin-bottom: 11px;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
details.faq:hover { border-color: var(--line-strong); background: var(--surface-2); }
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}
details.faq[open] summary::after { content: '+'; transform: rotate(45deg); }
details.faq p { color: var(--muted); font-size: 14px; margin: 12px 0 0; animation: rise 0.35s var(--ease) both; }

/* --- tables -------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--lift-1);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
/* top, not middle: a row whose cells differ in height (a select over its
   explanation, wrapped action buttons) otherwise floats its short cells into
   the middle of the tall ones, and the columns stop reading as columns. */
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
th {
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.55);
  font-weight: 600;
}
tbody tr { transition: background 0.25s var(--ease); }
tbody tr:hover { background: rgba(255,255,255,0.035); }
tbody tr:last-child td { border-bottom: none; }
td.mono, .mono { font-family: var(--mono); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* A control that has to stay pressable: the explanation under it wraps, which
   lets the column shrink, and a full-width select shrinks with it until the
   label reads "Worki". Its own minimum keeps both labels whole. */
.status-select { min-width: 148px; }
.status-why {
  margin-top: 6px;
  max-width: 190px;
  white-space: normal;
  line-height: 1.4;
}
td a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-bright); }
td a:hover { text-decoration-color: #fff; }

/* --- footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 28px 0;
  color: var(--dim);
  font-size: 13px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.3s var(--ease); }
.site-footer a:hover { color: #fff; }
/* the ad disclosure sits under the footer row, not inside it: the row is a
   space-between flex pair, and a third item there collapses on a phone. */
.site-footer .footer-note {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

/* Emoji are the only colour left in the interface. Drain them so the palette
   stays honest - applied to the elements that carry them, never to a sticky or
   positioned container, since `filter` would make a new stacking context. */
.btn,
.pill,
.admin-nav button,
.brand .mark,
.feature .icon,
.eyebrow,
.alert > span:first-child,
.nav a { filter: grayscale(1); }

/* --- utilities ----------------------------------------------------------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.hidden, [hidden] { display: none !important; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: rise 0.55s var(--ease) both; }

/* --- admin --------------------------------------------------------------- */
.admin-shell { display: grid; grid-template-columns: 216px 1fr; gap: 26px; align-items: start; }
.admin-nav { position: sticky; top: 88px; display: grid; gap: 5px; }
.admin-nav button {
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.admin-nav button:hover { background: var(--surface); color: var(--text); transform: translateX(3px); }
.admin-nav button.active {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-color: var(--line-bright);
  color: #fff;
  box-shadow: var(--lift-1);
}

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; flex: 0 1 auto; }

/* --- analytics ----------------------------------------------------------- */
.analytics-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.analytics-head h2 { margin: 12px 0 4px; }
.analytics-head .eyebrow { animation: none; }
.analytics-signal-card { overflow: hidden; }
.analytics-signal-card::after {
  content: '';
  position: absolute;
  inset: 72px 26px 26px;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 100% 25%;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.signal-legend { display: flex; gap: 14px; color: var(--muted); }
.signal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.signal-legend i { width: 9px; height: 9px; display: inline-block; border: 1px solid var(--line-bright); }
.signal-legend i.served { background: #f4f4f5; }
.signal-legend i.unsupported { background: repeating-linear-gradient(135deg, #777 0 2px, #222 2px 4px); }
.signal-chart {
  position: relative;
  z-index: 1;
  height: 210px;
  display: flex;
  align-items: end;
  gap: clamp(2px, 0.55vw, 7px);
  padding-top: 26px;
  overflow: hidden;
}
.signal-column { height: 100%; min-width: 3px; flex: 1; display: flex; flex-direction: column; justify-content: end; gap: 6px; }
.signal-stack {
  min-height: 3px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 4px 4px 2px 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.07);
  animation: signal-rise 0.5s var(--ease) both;
}
.signal-segment.served { background: linear-gradient(180deg, #fff, #999); }
.signal-segment.unsupported { background: repeating-linear-gradient(135deg, #777 0 3px, #191919 3px 6px); }
.signal-date { color: var(--faint); font: 9px var(--mono); text-align: center; min-height: 13px; }
@keyframes signal-rise { from { transform: scaleY(0); transform-origin: bottom; opacity: 0; } }

.rank-list { display: grid; gap: 15px; margin-top: 20px; }
.rank-row { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(90px, 1.5fr) auto; gap: 10px; align-items: center; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rank-track { height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.06); box-shadow: inset 0 1px 3px #000; }
.rank-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #777, #fff); }
.rank-value { color: var(--muted); font: 11px var(--mono); }

.validation-score { display: flex; align-items: baseline; gap: 9px; margin: 17px 0 12px; }
.validation-score strong { font-size: 42px; line-height: 1; letter-spacing: -0.055em; }
.validation-meter { height: 9px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.validation-meter > span { display: block; height: 100%; background: linear-gradient(90deg, #777, #fff); border-radius: inherit; }
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-top: 18px; }
.outcome-grid div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.outcome-grid strong { color: var(--text); font-family: var(--mono); }
.inbox-card { border-color: var(--line-strong); }
.demand-number { font-size: 24px; line-height: 1; font-weight: 750; letter-spacing: -0.04em; }

/* Privacy panel: an austere vault ledger inside the existing monochrome shell. */
.privacy-vault { overflow: hidden; border-color: var(--line-strong); }
.privacy-vault::after {
  content: 'PRIVATE / SERVER SIDE / REDACTED';
  position: absolute;
  right: -34px;
  top: 86px;
  transform: rotate(90deg);
  color: rgba(255,255,255,0.075);
  font: 9px var(--mono);
  letter-spacing: 0.22em;
  pointer-events: none;
}
.privacy-title { display: flex; align-items: center; gap: 15px; }
.privacy-title .eyebrow { animation: none; padding: 4px 10px; margin-bottom: 7px; }
.privacy-title h3 { margin: 0; font-size: 21px; }
.privacy-seal {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  font-size: 23px;
  box-shadow: inset 0 0 0 5px #050505, inset 0 0 0 6px var(--line-strong), 0 0 28px rgba(255,255,255,0.08);
}
.privacy-ledger {
  min-height: 120px;
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.22);
  font-size: 12.5px;
}
.privacy-ledger > div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.privacy-ledger > div:last-child { border-bottom: 0; }
.privacy-ledger strong { text-align: right; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; grid-auto-flow: column; overflow-x: auto; padding-bottom: 4px; }
  .admin-nav button { white-space: nowrap; }
  .analytics-head { align-items: stretch; flex-direction: column; }
  .checkpoint-add-grid { grid-template-columns: 1fr 1fr; }
  .checkpoint-add-grid input:nth-child(2), .checkpoint-add-grid input:nth-child(3) { grid-column: 1 / -1; }
  .health-line { grid-template-columns: 1fr auto; }
  .health-line .health-meter { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 620px) {
  .section { padding: 50px 0; }
  .hero { padding: 58px 0 30px; }
  .card, .option { padding: 20px; }
  .site-header .wrap { flex-direction: column; align-items: stretch; }
  .nav { justify-content: center; }
  .btn, .btn-row .btn { width: 100%; }
  .key-box { flex-direction: column; }
  .bg-grid { opacity: 0.3; }
  .signal-chart { height: 160px; }
  .signal-date { display: none; }
  .outcome-grid { grid-template-columns: 1fr; }
  .checkpoint-add-grid, .diagnostic-grid { grid-template-columns: 1fr; }
  .checkpoint-add-grid input:nth-child(2), .checkpoint-add-grid input:nth-child(3) { grid-column: auto; }
  .checkpoint-control-title { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg-grid { animation: none; }
}

/* Live activity counters (homepage hero) ---------------------------------- */
.live-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin: 26px auto 0;
  max-width: 760px;
  font-size: 14px;
  color: var(--muted);
}
.live-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: var(--bg-2, #090909);
  white-space: nowrap;
}
.live-stat b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* In-game how-to guide (post-key page) ------------------------------------ */
.howto-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.howto-step { display: flex; align-items: flex-start; gap: 13px; }
.howto-num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--bg-2, #090909);
  color: var(--text);
  font-weight: 700; font-size: 14px;
}
.howto-body { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.howto-body b { color: var(--text); font-size: 14.5px; }
.howto-body span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.keyprompt-mock { margin-top: 20px; text-align: center; }
.kp-caption { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.kp-window {
  max-width: 340px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  padding: 16px 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.kp-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--text); font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.kp-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.kp-input {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  padding: 11px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.kp-actions { display: flex; gap: 9px; }
.kp-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 9px;
  font-weight: 700; font-size: 13px;
  background: var(--accent, #fff); color: #000;
}
.kp-btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); }

/* --- Adsterra display/native ad slots ------------------------------------ */
.cmhub-ads { margin: 26px auto 8px; text-align: center; }
.cmhub-ad-tag {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted, #7a7a86); opacity: .7; margin-bottom: 8px;
}
.cmhub-ad { display: flex; justify-content: center; align-items: center; margin: 12px auto; max-width: 100%; overflow: hidden; }
.cmhub-ad[data-ad="native"] { display: block; max-width: 900px; }
.cmhub-ad iframe { max-width: 100%; }
