/* hood-alerts docs — signal-monitor design system.
   True monochrome: pure near-black / near-white + 3 grays. No hue, anywhere.
   Lanes and states are distinguished by weight, dash pattern, and glyph — never color. */
:root {
  --bg: #080808;
  --bg-elev: #101010;
  --bg-elev-2: #181818;
  --border: #272727;
  --border-strong: #3d3d3d;
  --text: #f4f4f4;
  --text-dim: #b3b3b3;
  --text-faint: #888888;
  --line: #f4f4f4;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 52px;
  --strip-h: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); }
::selection { background: var(--text); color: var(--bg); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px;
  font-family: var(--mono); font-size: 13px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- topbar (secondary nav: corner-anchored, plain, always reachable) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 80;
  height: var(--topbar-h);
  background: rgba(6, 7, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand {
  font-weight: 700; letter-spacing: -0.01em; font-size: 14.5px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--mono);
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text);
  box-shadow: 0 0 0 3px rgba(243, 244, 246, 0.12);
  animation: blink 2.2s steps(1, end) infinite;
}
@keyframes blink { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0.25; } 100% { opacity: 1; } }
.cornernav {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 12.5px;
  min-width: 0; overflow-x: auto; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cornernav a { flex-shrink: 0; }
.cornernav a {
  color: var(--text-dim); padding: 6px 10px; border-radius: 6px;
  border: 1px solid transparent;
}
.cornernav a:hover { color: var(--text); border-color: var(--border); text-decoration: none; }
.cornernav a[aria-current="page"] {
  color: var(--text); border-color: var(--border-strong); background: var(--bg-elev);
}
.cornernav .gh {
  border: 1px solid var(--border-strong); margin-left: 6px;
}
.cornernav .gh:hover { background: var(--bg-elev); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); font-family: var(--mono);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 13px; margin-bottom: 22px;
}
.chip .live { width: 6px; height: 6px; border-radius: 50%; background: var(--text); animation: blink 1.8s steps(1, end) infinite; }
h1 { font-size: clamp(32px, 5.6vw, 52px); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 800; }
h1 .accent { border-bottom: 3px solid var(--text); padding-bottom: 2px; }
.sub { font-size: clamp(15.5px, 2.2vw, 19px); color: var(--text-dim); max-width: 640px; margin: 0 auto 30px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border-strong); cursor: pointer;
  font-family: var(--sans);
}
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { text-decoration: none; filter: brightness(0.92); }
.btn.ghost { color: var(--text); background: var(--bg-elev); }
.btn.ghost:hover { text-decoration: none; border-color: var(--text); }

/* ---------- sections ---------- */
section { padding: 36px 0; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 23px; letter-spacing: -0.02em; margin: 0 0 6px; }
.section-head p { color: var(--text-dim); margin: 0; font-size: 14.5px; max-width: 640px; }
.kicker {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); margin-bottom: 8px;
}
.kicker::before { content: "// "; }

/* ================================================================
   INSTRUMENT — the scrub timeline that replaces a conventional nav.
   ================================================================ */
.instrument {
  position: sticky; top: var(--topbar-h); z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.instrument-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; row-gap: 4px;
  padding: 10px 24px 6px; max-width: 1080px; margin: 0 auto;
  font-family: var(--mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.04em;
  text-transform: uppercase;
}
.instrument-head .readout-title { color: var(--text-dim); }

.strip {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  padding: 0 24px 4px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.strip:active { cursor: grabbing; }
.strip:focus-visible { outline: none; }
.strip:focus-visible .lanes { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 6px; }

.lanes { position: relative; }
.lane {
  position: relative;
  height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: filter 0.15s ease;
}
.lane:last-child { border-bottom: none; }
.lane svg { display: block; width: 100%; height: 100%; }
.lane path.wave {
  fill: none;
  stroke: var(--line);
  vector-effect: non-scaling-stroke;
}
.lane.active path.wave { opacity: 1 !important; stroke-width: calc(var(--w, 1.5) * 1.35); }
.lane .lane-label {
  position: absolute; left: 4px; top: 2px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  color: var(--text-faint); pointer-events: none;
  text-transform: uppercase;
}
.lane.active .lane-label { color: var(--text); }

.marker {
  position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border: 1.5px solid var(--text); border-radius: 50%; background: var(--bg);
  pointer-events: none;
}

.playhead {
  position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text);
  pointer-events: none; z-index: 5;
  transition: left 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.playhead::before {
  content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--text);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border-strong);
}
.strip.dragging .playhead { transition: none; }

.quickjump {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-width: 1080px; margin: 0 auto; padding: 10px 24px 14px;
}
.quickjump a {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  white-space: nowrap;
}
.quickjump a .n { color: var(--text-faint); }
.quickjump a:hover { border-color: var(--border-strong); color: var(--text); }
.quickjump a[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.quickjump a[aria-current="true"] .n { color: var(--bg); opacity: 0.6; }
.quickjump a .tag { margin-left: 2px; }

/* ---------- readout / channel articles ---------- */
.readout { padding: 28px 0 8px; }
.channel {
  padding: 22px 0; border-top: 1px solid var(--border);
}
.channel:first-child { border-top: none; padding-top: 4px; }
.ch-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ch-index { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.channel h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 5px; padding: 3px 8px; border: 1px solid var(--border-strong); color: var(--text-dim);
}
.tag.free { border-style: solid; }
.tag.premium { border-style: dashed; color: var(--text); }
.tag.premium::before { content: "\25C6  "; }
.ch-desc { color: var(--text); font-size: 15px; max-width: 66ch; margin: 0 0 14px; }
.ch-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 14px; font-size: 13.5px; }
.ch-meta dt { color: var(--text-faint); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 2px; }
.ch-meta dd { margin: 0; color: var(--text-dim); }
.ch-meta code { color: var(--text); }
.ch-example { margin-top: 6px; }

/* JS-enhanced: single active channel focused; others still in the DOM (no-JS readable),
   just visually collapsed so the instrument reads like one live readout. */
body.js .channel { display: none; animation: fade-in 0.22s ease; }
body.js .channel[data-active] { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- live feed (app.js — unmodified logic, restyled) ---------- */
.feed-meta { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); margin-bottom: 16px; }
.feed-meta b { color: var(--text); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; transition: border-color 0.16s, transform 0.16s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card .sym { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.card .badge { font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--border-strong); white-space: nowrap; }
.badge.prem { border-style: solid; color: var(--text); }
.badge.prem::before { content: "\25B2 "; }
.badge.disc { border-style: dashed; color: var(--text-dim); }
.badge.disc::before { content: "\25BC "; }
.badge.flat { color: var(--text-faint); }
.badge.flat::before { content: "\2022 "; }
.card .prices { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); margin-top: 10px; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.card .prices b { color: var(--text); }
.card .links { margin-top: 12px; display: flex; gap: 14px; font-size: 12px; }
.card .links a { color: var(--text-dim); }
.card .links a:hover { color: var(--text); }
.skeleton { height: 112px; background: linear-gradient(90deg, var(--bg-elev) 25%, var(--bg-elev-2) 50%, var(--bg-elev) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius); border: 1px solid var(--border); }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.feed-note { color: var(--text-faint); font-size: 12.5px; margin-top: 14px; }
.feed-error { color: var(--text); font-size: 13.5px; background: var(--bg-elev); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; }

/* ---------- feature grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.feat { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; }
.feat h3 { margin: 0 0 6px; font-size: 15px; }
.feat p { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.feat .eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-faint); border: 1px solid var(--border-strong); border-radius: 5px; padding: 2px 6px; margin-bottom: 10px;
}

/* ---------- content pages (commands / premium / self-host) ---------- */
.doc h2 { font-size: 25px; letter-spacing: -0.02em; margin: 36px 0 10px; }
.doc h3 { font-size: 17.5px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc .lead { color: var(--text-dim); font-size: 16.5px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.table-scroll table { margin: 0; min-width: 460px; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
td code, .doc p code, li code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text); }
pre { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
pre code { color: var(--text); background: none; border: none; padding: 0; }
.callout { border-left: 3px solid var(--text); background: var(--bg-elev); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 20px 0; color: var(--text-dim); font-size: 13.5px; }
.callout.warn { border-left-style: dashed; border-left-width: 3px; }
.callout.warn::before { content: "\26A0  "; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.tier { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.tier.pro { border-style: dashed; border-color: var(--border-strong); }
.tier h3 { margin: 0 0 4px; font-size: 19px; }
.tier .price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 16px; font-family: var(--mono); }
.tier .price span { font-size: 13px; font-weight: 500; color: var(--text-dim); font-family: var(--sans); }
.tier ul { list-style: none; padding: 0; margin: 0; }
.tier li { padding: 7px 0 7px 24px; position: relative; color: var(--text); font-size: 14px; border-top: 1px solid var(--border); }
.tier li::before { content: "\2713"; position: absolute; left: 0; color: var(--text); font-weight: 700; }
.tier li.no { color: var(--text-faint); }
.tier li.no::before { content: "\2013"; color: var(--text-faint); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 30px 0 44px; margin-top: 44px; color: var(--text-dim); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.legal { color: var(--text-faint); font-size: 11.5px; max-width: 620px; margin-top: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  :root { --topbar-h: 46px; }
  .cornernav a:not([data-always]) { padding: 6px 8px; font-size: 11.5px; }
  .lane { height: 26px; }
  .lane .lane-label { font-size: 8px; }
  .instrument-head { font-size: 9.5px; }
  .quickjump { gap: 5px; padding-bottom: 12px; }
  .quickjump a { font-size: 10.5px; padding: 5px 7px; }
  .ch-meta { grid-template-columns: 1fr; gap: 2px 0; }
  .ch-meta dt { margin-top: 8px; }
  h1 { font-size: 30px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .lane { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* no-JS: instrument strip has no content to draw, so collapse it cleanly and let
   quickjump + the fully-listed readout stand alone as the real navigation. */
.strip:empty,
.instrument-head:empty {
  display: none;
}
