/* ==========================================================================
   Robotgames · Data & Sentiment Stack — public showcase
   Dark, single-commitment theme. Self-contained: no webfonts, no CDN.
   ========================================================================== */

:root {
  --bg:        #0a0e13;
  --bg-alt:    #0d1219;
  --panel:     #111823;
  --panel-2:   #151d29;
  --line:      #1e2836;
  --line-soft: #18202c;

  --ink:       #e8eef6;
  --ink-2:     #aebac8;
  --dim:       #7b8899;

  --cyan:      #38bdf8;
  --violet:    #a78bfa;
  --ok:        #34d399;
  --warn:      #fbbf24;
  --mute:      #64748b;
  --danger:    #f87171;

  --radius:    14px;
  --wrap:      1180px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle top-of-page glow, kept off the print/reduced path */
body::before {
  content: "";
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  background:
    radial-gradient(60% 60% at 25% 20%, rgba(56, 189, 248, .10), transparent 70%),
    radial-gradient(50% 50% at 78% 10%, rgba(167, 139, 250, .09), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
h1 { font-size: clamp(30px, 5.2vw, 54px); font-weight: 700; }
h2 { font-size: clamp(23px, 3.2vw, 33px); font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p  { margin: 0 0 14px; }
code { font-family: var(--mono); font-size: .88em; color: var(--ink-2); background: var(--panel-2); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-soft); }
.dim  { color: var(--dim); }
.grad { background: linear-gradient(96deg, var(--cyan), var(--violet) 65%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 22px; top: 12px; z-index: 50; background: var(--panel); border: 1px solid var(--cyan); padding: 10px 14px; border-radius: 8px; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- header - */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 14, 19, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; font-size: 16px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 13px; font-weight: 750; letter-spacing: .16em; }
.brand-sub   { font-size: 11px; color: var(--dim); letter-spacing: .06em; }
.head-nav { display: flex; gap: 22px; font-size: 14px; }
.head-nav a { color: var(--ink-2); }
.head-nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) { .head-nav { display: none; } }

/* ------------------------------------------------------------------ hero - */
.hero { padding: 76px 0 58px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
}
.hero h1 { margin-bottom: 22px; }
.lede { max-width: 66ch; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--ink-2); margin-bottom: 34px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.stat {
  flex: 1 1 150px; min-width: 132px;
  background: linear-gradient(180deg, var(--panel), var(--bg-alt));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.stat b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--dim); }
.stat.live b { color: var(--ok); }

/* connector snapshot strip */
.pillbar {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); padding: 14px 16px;
}
.pillbar-label { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 11px; }
.pillbar-label .dim { text-transform: none; letter-spacing: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2);
}
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill.up   { border-color: rgba(52, 211, 153, .32); color: #cdf4e4; }
.pill.down { border-color: rgba(248, 113, 113, .30); color: #f3c7c7; }
.dot.ok    { background: var(--ok);     box-shadow: 0 0 0 3px rgba(52, 211, 153, .14); }
.dot.off   { background: transparent;   border: 1.5px solid var(--danger); }

/* ----------------------------------------------------------------- bands - */
.band { padding: 64px 0; border-top: 1px solid var(--line-soft); }
.band.alt { background: var(--bg-alt); }
.sec-head { margin-bottom: 30px; }
.sec-sub { color: var(--ink-2); max-width: 74ch; margin-top: 12px; }

/* --------------------------------------------------------------- product - */
.product { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: start; }
/* Grid items default to min-width:auto, so the non-wrapping <pre> below would
   otherwise push the whole track wider than the viewport on phones. */
.product > *, .console-grid > *, .method-grid > *, .apps > * { min-width: 0; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; gap: 34px; } }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ok); background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .22); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px;
}
.product-copy h2 { margin-bottom: 16px; }
.product-copy > p { color: var(--ink-2); max-width: 60ch; }
.ticks { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); transform: rotate(45deg);
}
.note {
  font-size: 13.5px; color: var(--dim); border-left: 2px solid var(--line);
  padding: 2px 0 2px 14px; margin: 18px 0 0; max-width: 62ch;
}

.gauge-card { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.gauge-card figcaption { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.gauge { margin-bottom: 20px; }
.gauge-track { position: relative; height: 9px; border-radius: 999px; background: var(--panel-2); overflow: visible; border: 1px solid var(--line-soft); }
.gauge-fill { position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(90deg, var(--danger), #64748b 48%, var(--ok)); opacity: .55; }
/* Position lives here, not in a style="" attribute — the site ships a strict
   CSP (style-src 'self'), which blocks inline style attributes outright. */
.gauge-needle {
  position: absolute; top: 50%; left: 68.5%; width: 3px; height: 22px; margin-left: -1.5px;
  background: var(--ink); border-radius: 2px; transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(10, 14, 19, .9);
}
.gauge-scale { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

.code {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 15px 16px; margin: 0; overflow-x: auto; color: var(--ink-2);
}
.c-k { color: var(--cyan); } .c-s { color: #86efac; } .c-n { color: var(--warn); }
.c-p { color: var(--dim); }  .c-c { color: var(--mute); font-style: italic; }
.fig-note { font-size: 12px; color: var(--dim); margin: 12px 0 0; }

/* --------------------------------------------------------------- filters - */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px;
  padding: 16px 18px; margin-bottom: 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--mute); color: var(--ink); }
.chip[aria-pressed="true"] { background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .55); color: #bfe9ff; }
.chip .n { color: var(--dim); margin-left: 5px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.count { margin: 0 0 0 auto; font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- app cards - */
.apps { display: grid; gap: 20px; }
.app-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.app-card.is-hidden { display: none; }
.app-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.app-name { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.app-role { font-size: 13px; color: var(--dim); }
.app-tally { margin-left: auto; display: flex; gap: 6px; }

.case-list { list-style: none; margin: 0; padding: 0; }
.case {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 6px 28px; padding: 17px 22px; border-top: 1px solid var(--line-soft);
}
.case:first-child { border-top: 0; }
.case.is-hidden { display: none; }
.case-title { font-weight: 600; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.case-value { color: var(--ink-2); font-size: 14px; margin: 0; }
@media (max-width: 720px) { .case { grid-template-columns: 1fr; gap: 8px; } }

.app-note { padding: 15px 22px; border-top: 1px solid var(--line-soft); background: var(--bg-alt); font-size: 13px; color: var(--dim); }
.app-card.empty-app { display: none; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.badge.ok   { color: #a7f3d0; border-color: rgba(52, 211, 153, .38); background: rgba(52, 211, 153, .10); }
.badge.warn { color: #fde68a; border-color: rgba(251, 191, 36, .38); background: rgba(251, 191, 36, .10); }
.badge.mute { color: #cbd5e1; border-color: rgba(100, 116, 139, .42); background: rgba(100, 116, 139, .12); }
.badge.store { color: #f5d0fe; border-color: rgba(232, 121, 249, .40); background: rgba(232, 121, 249, .10); }

/* legend */
.legend-card { margin-top: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.legend-card h3 { margin-bottom: 16px; }
.legend { display: grid; gap: 10px; margin: 0 0 6px; }
.legend > div { display: flex; align-items: baseline; gap: 14px; }
.legend dt { flex: none; width: 84px; }
.legend dd { margin: 0; color: var(--ink-2); font-size: 14px; }

/* -------------------------------------------------------------- timeline - */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 4px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 14px 0 14px 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 22px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--mute);
}
.tl-item.ok::before   { border-color: var(--ok);   box-shadow: 0 0 0 4px rgba(52, 211, 153, .12); }
.tl-item.warn::before { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(251, 191, 36, .12); }
.tl-time { font-family: var(--mono); font-size: 12.5px; color: var(--cyan); letter-spacing: .04em; }
.tl-title { font-weight: 620; margin: 4px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.tl-desc { color: var(--ink-2); font-size: 14px; margin: 0; max-width: 78ch; }

/* --------------------------------------------------------- console + map - */
.console-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .console-grid { grid-template-columns: 1fr; } }
.console-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.console-col h3 { margin-bottom: 14px; color: var(--ink); }
.lined { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.lined li { font-size: 14px; color: var(--ink-2); padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.lined li:last-child { border-bottom: 0; padding-bottom: 0; }
.lined .tag { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-right: 8px; }
.lined.plain li b { color: var(--ink); font-weight: 620; }

/* ---------------------------------------------------------------- method - */
.method h2 { margin-bottom: 26px; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 34px; }
@media (max-width: 780px) { .method-grid { grid-template-columns: 1fr; } }
.method-grid h3 { margin-bottom: 9px; color: var(--cyan); }
.method-grid p { color: var(--ink-2); font-size: 14.5px; margin: 0; max-width: 58ch; }

/* ---------------------------------------------------------------- footer - */
.site-foot { border-top: 1px solid var(--line); padding: 34px 0 46px; background: var(--bg-alt); }
.foot-inner { display: grid; gap: 10px; }
.foot-brand { font-size: 13px; font-weight: 650; letter-spacing: .1em; margin: 0; }
.site-foot p.dim { font-size: 12.5px; max-width: 84ch; margin: 0; }
