/* Maze Chase pages in TrueUp's look: the same tokens, type, header, cards and buttons as the TrueUp website.
   The arcade itself stays black and pixel-sharp inside a card. Light and dark via [data-theme]. */
:root, [data-theme="light"] {
  --bg: #f6f7fb; --bg-2: #eef0f7; --card: #ffffff; --card-2: #f8f9fc; --line: #e3e6ef; --line-2: #d4d8e5;
  --text: #151a2d; --muted: #5a6178; --dim: #8a90a6;
  --accent: #4f46e5; --accent-2: #6366f1; --accent-soft: #eef0ff; --accent-ink: #ffffff;
  --ok: #0f9d6b; --ok-soft: #e6f7ef; --warn: #b7791f; --warn-soft: #fdf4e3; --bad: #d03a3a; --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(20, 24, 45, .05), 0 8px 24px rgba(20, 24, 45, .06);
  --hero: radial-gradient(1200px 400px at 10% -10%, #e4e5ff 0%, transparent 60%), radial-gradient(900px 400px at 110% 0%, #dff5ee 0%, transparent 55%);
  --code: #f1f3f9;
}
[data-theme="dark"] {
  --bg: #0c0f1a; --bg-2: #121628; --card: #151a2d; --card-2: #1a2036; --line: #262d47; --line-2: #333b5a;
  --text: #e9ecf6; --muted: #a2a9c2; --dim: #707895;
  --accent: #818cf8; --accent-2: #a5b4fc; --accent-soft: #1f2447; --accent-ink: #0c0f1a;
  --ok: #34d399; --ok-soft: #10352b; --warn: #fbbf24; --warn-soft: #3a2e12; --bad: #f87171; --bad-soft: #3d1a1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --hero: radial-gradient(1200px 400px at 10% -10%, #232867 0%, transparent 60%), radial-gradient(900px 400px at 110% 0%, #0f3b33 0%, transparent 55%);
  --code: #0f1322;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; transition: background .2s, color .2s; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--code); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

/* ---------- top bar (as on the TrueUp website) */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.3px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), #10b981); font-size: 17px; }
.logo .product { font-weight: 600; color: var(--muted); font-size: 15px; letter-spacing: 0; padding-left: 10px; border-left: 1px solid var(--line-2); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--muted); font-size: 14.5px; font-weight: 600; padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); text-decoration: none; background: var(--bg-2); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.link { color: var(--muted); font-size: 14px; padding: 6px; }
.link:hover { color: var(--accent); text-decoration: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; font-size: 17px; box-shadow: var(--shadow); }
.icon-btn:hover { border-color: var(--accent); }

/* ---------- layout */
.page { max-width: 1160px; margin: 0 auto; padding: 36px 24px 72px; }
.hero-band { background: var(--hero); border-bottom: 1px solid var(--line); }
.hero-band .page { padding-top: 44px; padding-bottom: 36px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin: 0 0 6px; }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1px; margin: 0 0 12px; }
h2 { font-size: 22px; letter-spacing: -.3px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 0 0 4px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 22px; max-width: 700px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-title h3 { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 11px; padding: 10px 18px; font-weight: 650; font-size: 14.5px;
       cursor: pointer; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); white-space: nowrap; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 750; letter-spacing: -.5px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the arcade inside a card */
.arcade-card { padding: 14px; background: var(--card); }
.arcade-screen { position: relative; background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.arcade-screen canvas { display: block; image-rendering: pixelated; height: min(74vh, 760px); max-width: 100%; aspect-ratio: 560 / 720; }

/* ---------- charts */
.chart { width: 100%; display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

footer.site-foot { border-top: 1px solid var(--line); }
footer.site-foot .page { padding: 22px 24px 30px; display: flex; justify-content: space-between; gap: 16px; color: var(--dim); font-size: 13px; }

@media (max-width: 800px) {
  .bar-in { gap: 12px; padding: 10px 14px; }
  .logo .product, .right .link { display: none; }
  .site-nav a { padding: 6px 8px; font-size: 13.5px; }
  h1 { font-size: 30px; }
  .page { padding: 22px 14px 48px; }
}
