/* The Observability Index — "telemetry control-room" aesthetic.
   A dark on-call console: phosphor-amber signal accent, a faint instrument-grid field,
   sparkline marks, soft CRT glow on live readouts.
   Saira (display) + B612 Mono (a cockpit-instrument mono, by Airbus).
   Dark = "console" (default) · Light = "daylight ops". */

:root {
  --bg: #0a0d12;
  --bg2: #0e131b;
  --surface: #111824;
  --surface2: #18212f;
  --ink: #e9eef6;
  --muted: #8b98ab;
  --faint: #586677;
  --line: #1b2431;
  --line2: #28333f;
  --accent: #ffb02e;          /* phosphor amber */
  --accent-dim: #e8a33a;
  --accent-soft: rgba(255,176,46,.13);
  --glow: 0 0 14px rgba(255,176,46,.42);
  --grid: rgba(130,155,185,.055);
  --scan: rgba(255,176,46,.018);
  --shadow: 0 26px 64px -30px rgba(0,0,0,.9);
}
[data-theme="light"] {
  --bg: #f3f5f8; --bg2: #e9edf3; --surface: #ffffff; --surface2: #eef2f7;
  --ink: #111823; --muted: #50606f; --faint: #8492a2; --line: #e4e9ef; --line2: #d2dbe4;
  --accent: #d97706; --accent-dim: #b45309; --accent-soft: rgba(217,119,6,.1);
  --glow: 0 0 0 rgba(0,0,0,0); --grid: rgba(40,60,90,.06); --scan: rgba(217,119,6,.015);
  --shadow: 0 24px 56px -32px rgba(30,40,60,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink); position: relative; min-height: 100vh; overflow-x: hidden;
  font-family: "B612 Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* instrument-grid field + faint CRT scanlines, fading toward the fold */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 4px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 4px, 46px 46px, 46px 46px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}
.disp { font-family: "Saira", system-ui, sans-serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
a { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; }

/* ── connective strip (the fleet tie — consistent across every index) ── */
.kstrip {
  position: relative; z-index: 60; background: #05070b; color: #c9d3e0;
  font-family: "B612 Mono", monospace; font-size: 10.5px; letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
.kstrip .wrap { display: flex; align-items: center; gap: 16px; padding: 7px 28px; flex-wrap: wrap; }
.kstrip a { color: #c9d3e0; text-decoration: none; opacity: .8; transition: opacity .2s, color .2s; display: inline-flex; align-items: center; gap: 6px; }
.kstrip a:hover { opacity: 1; color: var(--accent); }
.kstrip .dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; display: inline-block; box-shadow: var(--glow); animation: pulse 2.4s ease-in-out infinite; }
.kstrip .sep { opacity: .3; }
.kstrip .grow { flex: 1; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ── header ───────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--line2); position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px);
}
.head-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
/* sparkline / signal-bars mark */
.brand .node { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; flex: none; }
.brand .node i { width: 3px; background: var(--line2); border-radius: 1px; transition: background .2s; }
.brand .node i:nth-child(1) { height: 35%; } .brand .node i:nth-child(2) { height: 58%; }
.brand .node i:nth-child(3) { height: 42%; } .brand .node i:nth-child(4) { height: 100%; background: var(--accent); box-shadow: var(--glow); }
.brand .node i:nth-child(5) { height: 66%; } .brand .node i:nth-child(6) { height: 80%; }
.brand .node i:nth-child(7) { height: 48%; }
.brand a:hover .node i { background: var(--accent-dim); }
.brand a:hover .node i:nth-child(4) { background: var(--accent); }
.brand .disp { font-weight: 700; font-size: 19px; letter-spacing: .01em; text-transform: uppercase; }
.brand .disp em { font-style: normal; color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 18px; }
.head-actions a { color: var(--muted); text-decoration: none; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; transition: color .2s; }
.head-actions a:hover { color: var(--accent); }
.theme-btn {
  background: var(--surface); border: 1px solid var(--line2); color: var(--ink); width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer; font-size: 14px; transition: border-color .2s, color .2s, box-shadow .2s; display: grid; place-items: center;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow); }

/* ── hero ─────────────────────────────────────────────── */
.hero { padding: 72px 0 30px; position: relative; }
.hero .kicker {
  font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.hero .kicker::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: var(--glow); animation: pulse 2.4s ease-in-out infinite;
}
.hero h1 {
  font-family: "Saira", sans-serif; font-weight: 700; font-size: clamp(42px, 7vw, 84px); line-height: .98;
  letter-spacing: -.01em; margin-top: 20px; max-width: 17ch;
}
.hero h1 .amp { color: var(--accent); text-shadow: var(--glow); }
.hero .lede { margin-top: 24px; font-size: clamp(13.5px, 1.5vw, 15.5px); color: var(--muted); max-width: 62ch; line-height: 1.7; }
.stats { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.stat {
  background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 16px 22px; min-width: 132px;
  position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); box-shadow: var(--glow); }
.stat .num { font-family: "Saira", sans-serif; font-weight: 700; font-size: 33px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }

/* ── toolbar ──────────────────────────────────────────── */
.toolbar {
  position: sticky; top: 63px; z-index: 40; padding: 16px 0 13px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px);
}
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 240px; display: flex; align-items: center; gap: 11px; background: var(--surface);
  border: 1px solid var(--line2); border-radius: 8px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--glow); }
.search svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.search input { flex: 1; border: none; background: none; color: var(--ink); font-family: "B612 Mono", monospace; font-size: 12.5px; outline: none; }
.search input::placeholder { color: var(--faint); }
.sort { display: flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.sort button {
  background: var(--surface); border: none; border-right: 1px solid var(--line); padding: 11px 14px; cursor: pointer;
  font-family: "B612 Mono", monospace; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); transition: all .18s;
}
.sort button:last-child { border-right: none; }
.sort button.active { color: #0a0d12; background: var(--accent); font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.chip {
  background: var(--surface); border: 1px solid var(--line2); border-radius: 7px; padding: 7px 13px; cursor: pointer;
  font-family: "B612 Mono", monospace; font-size: 10.5px; color: var(--muted); transition: all .18s; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { color: #0a0d12; border-color: var(--accent); background: var(--accent); font-weight: 700; }
.chip .ct { opacity: .6; margin-left: 6px; }
.chip.active .ct { opacity: .82; }

/* ── grid + cards ─────────────────────────────────────── */
.meta-line { font-size: 10.5px; color: var(--faint); letter-spacing: .08em; padding: 22px 0 14px; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(346px, 1fr)); gap: 16px; padding-bottom: 56px; }
.card {
  background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 20px; text-decoration: none;
  color: inherit; position: relative; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s cubic-bezier(.2,.7,.2,1), border-color .22s, box-shadow .22s; opacity: 0; transform: translateY(14px);
}
.card.in { opacity: 1; transform: translateY(0); }
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform .35s cubic-bezier(.2,.7,.2,1); box-shadow: var(--glow);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleY(1); }
.card-top { display: flex; align-items: center; gap: 12px; }
.card .av { width: 42px; height: 42px; border-radius: 8px; flex: none; object-fit: cover; background: var(--surface2); border: 1px solid var(--line2); }
.card .id { flex: 1; min-width: 0; }
.card .name { font-family: "Saira", sans-serif; font-weight: 700; font-size: 18.5px; letter-spacing: 0; line-height: 1.12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .owner { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.card .rank { font-family: "Saira", sans-serif; font-weight: 700; font-size: 20px; color: var(--faint); flex: none; font-variant-numeric: tabular-nums; }
.card .cat {
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dim); align-self: flex-start;
  margin-top: 14px; padding: 4px 9px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card .desc {
  font-size: 11.5px; color: var(--muted); margin-top: 11px; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gauge { display: flex; align-items: center; gap: 11px; margin-top: 15px; }
.gauge .bar { flex: 1; height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.gauge .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width 1.1s cubic-bezier(.2,.7,.2,1); box-shadow: var(--glow); }
.gauge .score { font-family: "Saira", sans-serif; font-weight: 700; font-size: 15px; color: var(--accent); width: 26px; text-align: right; text-shadow: var(--glow); font-variant-numeric: tabular-nums; }
.card-foot { display: flex; gap: 13px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--faint); flex-wrap: wrap; align-items: center; }
.card-foot .star { color: var(--accent); }
.card-foot .lang::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: middle; }
.empty { grid-column: 1/-1; text-align: center; padding: 72px; color: var(--faint); }

/* ── about / FAQ (static, server-rendered — citable for AI/answer engines) ── */
.about { border-top: 1px solid var(--line2); padding: 48px 0 8px; }
.about h2 { font-family: "Saira", sans-serif; font-weight: 700; font-size: clamp(22px, 3vw, 31px); letter-spacing: -.005em; margin-bottom: 8px; }
.about .intro { color: var(--muted); max-width: 72ch; font-size: 13.5px; line-height: 1.72; margin-bottom: 28px; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.faq .q { background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 20px 22px; }
.faq .q h3 { font-family: "Saira", sans-serif; font-weight: 600; font-size: 15.5px; margin-bottom: 8px; color: var(--ink); }
.faq .q p { font-size: 12px; color: var(--muted); line-height: 1.65; }

/* ── footer ───────────────────────────────────────────── */
footer { border-top: 1px solid var(--line2); padding: 40px 0 64px; margin-top: 36px; }
.foot-row { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
footer .blurb { max-width: 50ch; color: var(--muted); font-size: 12px; line-height: 1.7; }
footer .links { display: flex; flex-direction: column; gap: 8px; }
footer .links a { color: var(--muted); text-decoration: none; font-size: 11.5px; transition: color .2s; }
footer .links a:hover { color: var(--accent); }
footer .links .grouphead { color: var(--faint); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.updated { font-size: 10.5px; color: var(--faint); margin-top: 24px; letter-spacing: .04em; }

/* ── detail page ──────────────────────────────────────── */
.detail { padding: 50px 0 48px; }
.crumb { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 26px; }
.crumb a { color: var(--muted); text-decoration: none; } .crumb a:hover { color: var(--accent); }
.detail-head { display: flex; align-items: center; gap: 20px; }
.detail-head .av { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--line2); flex: none; background: var(--surface2); }
.detail h1 { font-family: "Saira", sans-serif; font-weight: 700; font-size: clamp(30px, 5vw, 52px); line-height: 1.0; letter-spacing: -.01em; }
.detail .sub { color: var(--faint); margin-top: 10px; font-size: 12px; letter-spacing: .02em; }
.detail .desc-big { font-size: clamp(14.5px, 1.9vw, 19px); color: var(--muted); margin-top: 26px; max-width: 66ch; line-height: 1.65; }
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px,1fr)); gap: 12px; margin: 32px 0; }
.detail-stats .box { background: var(--surface); border: 1px solid var(--line2); border-radius: 10px; padding: 17px 19px; position: relative; overflow: hidden; }
.detail-stats .box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); box-shadow: var(--glow); }
.detail-stats .num { font-family: "Saira", sans-serif; font-weight: 700; font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums; }
.detail-stats .lbl { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 7px; }
.topics { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.topic { font-size: 10.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line2); padding: 6px 12px; border-radius: 6px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #0a0d12; text-decoration: none;
  padding: 13px 24px; border-radius: 9px; font-family: "B612 Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent), var(--glow); }
.related { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
.related h2 { font-family: "Saira", sans-serif; font-weight: 700; font-size: 21px; margin-bottom: 18px; letter-spacing: -.005em; }

/* ── responsive + motion ──────────────────────────────── */
@media (max-width: 640px) { .wrap { padding: 0 18px; } .grid { grid-template-columns: 1fr; } .hero { padding: 48px 0 26px; } .kstrip .wrap { padding: 7px 18px; } .detail-head { gap: 14px; } .detail-head .av { width: 56px; height: 56px; } }
@media (prefers-reduced-motion: reduce) {
  .card { opacity: 1; transform: none; transition: none; }
  .card::before, .gauge .bar i { transition: none; }
  .kstrip .dot, .hero .kicker::before { animation: none; }
  html { scroll-behavior: auto; }
}
