:root {
  /* FLETCH brand, matched to the marketing series: hot pink on near-black. */
  --bg: #0a0a0e;
  --panel: #121117;
  --panel-raised: #18161e;
  --line: #26232d;
  --ink: #f4f1f4;
  --ink-dim: #aaa3ae;
  --ink-faint: #6e6874;
  --pink: #ff2d7a;
  --pink-bright: #ff5c93;
  --maroon: #3a0f1f;
  --green: #39ff88;
  --red: #ff4d5e;
  --amber: #ffb52e;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Space Grotesk", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse 900px 420px at 12% -8%, rgba(255,45,122,0.16), transparent 60%),
    radial-gradient(ellipse 700px 380px at 100% -5%, rgba(255,45,122,0.08), transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 1.4px);
  background-size: auto, auto, 22px 22px;
  min-height: 100vh;
}

a { color: inherit; }

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--line);
}

.wordmark { font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.wordmark .dot { color: var(--pink-bright); }
.logo { display: block; margin-bottom: 4px; border-radius: 2px; }

.tagline {
  font-size: 13px;
  color: var(--ink-faint);
}

.status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  display: flex;
  gap: 6px;
  align-items: center;
}
.status .pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-faint);
}
.status .pip.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status .pip.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }

.navbar {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.navlink {
  font-size: 13px;
  color: var(--ink-faint);
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease;
}
.navlink:hover { color: var(--ink); }
.navlink.active {
  color: var(--pink-bright);
  border-bottom-color: var(--pink-bright);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.overview-grid .panel-block { margin-bottom: 0; }
.mini-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.mini-row:last-child { border-bottom: none; }
.mini-row .sym { font-weight: 600; }
.mini-row.why { display: block; padding: 8px 0; }

.why-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.mini-row.why .why-line { font-size: 13px; color: var(--ink); }
.why-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  background: var(--ink-faint);
}
.why-dot.sev-LOW { background: var(--green); }
.why-dot.sev-MEDIUM { background: var(--amber); }
.why-dot.sev-HIGH { background: var(--red); }
.why-dot.sev-CRITICAL { background: var(--red); box-shadow: 0 0 6px var(--red); }

.signal-row {
  display: grid;
  grid-template-columns: 56px 100px 180px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
}
.signal-row:last-child { border-bottom: none; }
.signal-row:hover { background: var(--panel-raised); }
.signal-time { font-family: var(--mono); color: var(--ink-faint); font-size: 12px; }
.signal-token { font-weight: 600; }
.signal-type-label { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); text-transform: lowercase; }
.signal-evidence { color: var(--ink-dim); font-size: 12.5px; }

.avail-grid { display: flex; flex-direction: column; gap: 2px; }
.avail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  text-transform: capitalize;
}
.avail-row:last-child { border-bottom: none; }
.avail-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: none;
}
.avail-badge.avail-real { color: var(--green); background: rgba(111,174,102,0.12); }
.avail-badge.avail-key { color: var(--amber); background: rgba(217,164,65,0.12); }
.avail-badge.avail-na { color: var(--ink-faint); background: rgba(255,255,255,0.04); }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.section-head h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
}

table.feed {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.feed th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-faint);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
table.feed td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.feed tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}
table.feed tbody tr:hover { background: var(--panel-raised); }

.sym { font-weight: 600; }
.addr { font-family: var(--mono); color: var(--ink-faint); font-size: 12px; }

.score-badge {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
  min-width: 34px;
}
.score-bar-track {
  width: 60px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pink-bright));
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
  display: inline-block;
}
.chip.LOW { color: var(--green); border-color: rgba(111,174,102,0.4); }
.chip.MEDIUM { color: var(--amber); border-color: rgba(217,164,65,0.4); }
.chip.HIGH { color: var(--red); border-color: rgba(224,72,58,0.5); }
.chip.CRITICAL { color: #fff; background: var(--red); border-color: var(--red); }
.chip.na { color: var(--ink-faint); border-color: var(--line); }

.state-block {
  padding: 18px 20px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-raised);
}
.state-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.state-body {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.state-empty { border-style: dashed; }
.state-empty .state-title { color: var(--ink-faint); }
.state-pending { border-color: rgba(255,45,122,0.32); }
.state-pending .state-title { color: var(--pink-bright); }
.state-unavailable { border-style: dashed; }
.state-unavailable .state-title { color: var(--ink-faint); }
.state-error { border-color: rgba(224,72,58,0.45); }
.state-error .state-title { color: var(--red); }

.loading-line {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.loading-line .cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--pink-bright);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- token detail --- */
.back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  cursor: pointer;
  margin-bottom: 18px;
  display: inline-block;
}
.back:hover { color: var(--pink-bright); }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}
.detail-head h1 { font-size: 26px; margin: 0 0 4px; }
.detail-head .addr { font-size: 13px; }

.score-big {
  text-align: right;
}
.score-big .num {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--pink-bright);
  line-height: 1;
}
.score-big .label {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}
.card .k { font-size: 11px; color: var(--ink-faint); margin-bottom: 6px; font-family: var(--mono); }
.card .v { font-size: 17px; font-weight: 600; }
.card .v.unavailable { font-size: 13px; font-weight: 400; color: var(--ink-faint); font-style: italic; }
.card .sub { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }

.panel-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.panel-block h2 {
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--ink-dim);
  font-weight: 600;
}
.panel-block ul { margin: 0; padding-left: 18px; }
.panel-block li { margin-bottom: 6px; font-size: 13.5px; line-height: 1.5; }

.components {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.component {
  flex: 1 1 140px;
  background: var(--panel-raised);
  border-radius: 5px;
  padding: 10px 12px;
}
.component.na { border: 1px dashed var(--line); background: transparent; }
.component .name { font-size: 11px; color: var(--ink-faint); text-transform: none; }
.component .val { font-family: var(--mono); font-size: 18px; margin-top: 2px; }
.component .val.na { font-size: 13px; color: var(--ink-faint); font-style: italic; }
.component .sub { font-size: 11px; color: var(--ink-faint); margin-top: 4px; line-height: 1.4; }
.component-bar-track {
  width: 100%;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.component-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pink-bright));
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.doc-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.doc-card:hover { border-color: var(--pink); background: var(--panel-raised); }
.doc-card-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-bright);
  margin-bottom: 4px;
}
.doc-card-desc { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; }

footer {
  padding: 24px 28px 40px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

/* --- Meme Radar --- */
.radar-card {
  display: flex;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.radar-card:hover { border-color: var(--pink); background: var(--panel-raised); }

.radar-rank {
  flex: none;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-faint);
  width: 36px;
  line-height: 1;
}

.radar-body { flex: 1; min-width: 0; }

.radar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.radar-sym { font-size: 19px; font-weight: 700; }
.radar-score-badge { display: flex; align-items: baseline; gap: 6px; }
.radar-score-label { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.04em; }
.radar-score-num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--pink-bright); line-height: 1; }

.radar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.radar-fletch-label { margin-left: 14px; }
.radar-fletch-num { color: var(--ink); font-weight: 600; font-size: 13px; }

.radar-signal-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.radar-convergence {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--pink-bright);
}

.radar-why { margin-bottom: 8px; }
.radar-why-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.radar-why ul { margin: 0; padding-left: 16px; }
.radar-why li { font-size: 13px; color: var(--ink-dim); line-height: 1.5; margin-bottom: 2px; }

.radar-metrics {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 8px;
}
.radar-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ============================================================
   Chat (BYOK) — web/chatAgent.js
   ============================================================ */
.chat-key-row {
  display: flex;
  gap: 10px;
}
#chat-api-key,
#chat-input {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 12px;
}
#chat-api-key {
  flex: 1;
}
#chat-api-key:focus,
#chat-input:focus {
  outline: none;
  border-color: var(--pink);
}
.chat-key-status {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 8px;
  min-height: 1em;
}

button#chat-key-save,
button#chat-send {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
button#chat-key-save:hover,
button#chat-send:hover {
  background: var(--pink-bright);
}
button#chat-send:disabled {
  background: var(--line);
  color: var(--ink-faint);
  cursor: default;
}

.chat-log {
  min-height: 160px;
  max-height: 440px;
  overflow-y: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.chat-empty {
  color: var(--ink-faint);
  font-size: 13px;
  padding: 24px 4px;
  text-align: center;
}
.chat-msg {
  display: flex;
  margin-bottom: 10px;
}
.chat-msg.chat-user { justify-content: flex-end; }
.chat-msg.chat-assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-user .chat-bubble {
  background: var(--pink);
  color: #fff;
  border-bottom-right-radius: 2px;
}
.chat-assistant .chat-bubble {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-bottom-left-radius: 2px;
}
.chat-toolcalls {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  margin: -4px 0 10px 2px;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
#chat-input {
  flex: 1;
  resize: vertical;
  font-family: var(--sans);
}

/* ---------- FLETCH AI ---------- */
.ai-card {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px 14px 20px;
  background: linear-gradient(180deg, rgba(255,45,122,0.10), rgba(255,45,122,0.03));
  border: 1px solid rgba(255,92,147,0.28);
  border-left: 3px solid var(--pink-bright);
  border-radius: 6px;
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--pink-bright);
  margin-bottom: 8px;
}
.ai-mark { width: 18px; height: 18px; image-rendering: pixelated; }
.ai-live .ai-head::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.ai-text { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 72ch; }
.ai-prov { font-size: 11.5px; color: var(--ink-faint); }
.ai-facts { margin-top: 8px; font-size: 12px; color: var(--ink-dim); }
.ai-facts summary { cursor: pointer; color: var(--ink-faint); }
.ai-facts summary:hover { color: var(--ink-dim); }
.ai-facts ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.55; }
.lifecycle-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.lifecycle-item { display: inline-flex; align-items: center; gap: 6px; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

.chat-panel { border-color: rgba(255,92,147,0.28); }
.chat-empty p { max-width: 56ch; margin: 0 auto 14px; line-height: 1.55; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-suggestion {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.chat-suggestion:hover,
.chat-suggestion:focus-visible { border-color: var(--pink-bright); color: #fff; outline: none; }
.chat-byok summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-dim); }
.chat-byok[open] summary { margin-bottom: 10px; }

.ask-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
  background: var(--pink);
  border: 1px solid var(--pink-bright);
  border-radius: 999px;
  padding: 10px 16px 10px 12px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.ask-fab img { width: 20px; height: 20px; image-rendering: pixelated; }
.ask-fab:hover,
.ask-fab:focus-visible { background: var(--pink-bright); outline: none; }
.ask-fab[hidden] { display: none; }
@media (max-width: 640px) {
  .ask-fab { right: 14px; bottom: 14px; padding: 9px 12px 9px 10px; }
  .ai-text { font-size: 14px; }
}

/* ============================================================
   Responsive — tablet and mobile. Additive only: nothing above
   this block changes for desktop. Tables scroll horizontally
   rather than being rebuilt as cards — the existing product,
   made robust, not redesigned.
   ============================================================ */

@media (max-width: 900px) {
  main { padding: 20px 16px; }
  .topbar { padding: 16px 16px 12px; }
  .navbar { padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .navlink { white-space: nowrap; }

  .overview-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .docs-grid { grid-template-columns: 1fr; }

  .detail-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .score-big { text-align: left; }
}

@media (max-width: 640px) {
  .tagline { display: none; } /* status pip + short label still visible; full sentence is redundant on a narrow header */
  .status { font-size: 11px; }

  .grid { grid-template-columns: 1fr; }
  .components { gap: 8px; }
  .component { flex-basis: 100%; }

  .detail-head h1 { font-size: 21px; }
  .score-big .num { font-size: 32px; }

  /* Tables: horizontal scroll instead of squeezed/overflowing columns */
  table.feed { display: block; overflow-x: auto; white-space: nowrap; }
  table.feed thead, table.feed tbody, table.feed tr { display: table; width: 100%; table-layout: fixed; }

  /* Signal rows use a fixed-width grid on desktop — on mobile, stack
     time/token/severity on one line and let evidence wrap full-width
     below it, instead of overflowing the fixed column widths. */
  .signal-row {
    display: block;
    padding: 10px 4px;
  }
  .signal-row .signal-time,
  .signal-row .signal-token,
  .signal-row .signal-type {
    display: inline-block;
    margin-right: 10px;
  }
  .signal-row .signal-evidence {
    display: block;
    margin-top: 4px;
  }

  .why-line { font-size: 11.5px; }

  .radar-card { flex-direction: column; gap: 8px; padding: 14px 16px; }
  .radar-rank { width: auto; font-size: 16px; }
  .radar-score-num { font-size: 22px; }
}


/* ================= 2026-09 visual pass ================= */
.topbar { align-items: center; padding: 16px 28px; position: sticky; top: 0; z-index: 20;
  background: rgba(10,10,14,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-cat { width: 40px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 10px rgba(255,45,122,0.35)); transition: transform .2s ease; }
.brand:hover .brand-cat { transform: translateY(-3px) rotate(-3deg); }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-word { display: block; height: 22px; width: auto; align-self: flex-start; object-fit: contain; }
.tagline { font-size: 12.5px; color: var(--ink-faint); }
.status { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 12px; color: var(--ink); }
.status .pip.ok { background: var(--green); box-shadow: 0 0 10px var(--green); animation: fl-pulse 1.8s ease-in-out infinite; }
@keyframes fl-pulse { 50% { box-shadow: 0 0 2px var(--green); opacity: .55; } }
.navbar { background: rgba(18,17,23,0.9); overflow-x: auto; scrollbar-width: none; position: sticky; top: 73px; z-index: 19; }
.navbar::-webkit-scrollbar { display: none; }
.navlink { white-space: nowrap; font-weight: 500; }
.navlink.active { color: #fff; border-bottom-color: var(--pink); }

main { padding-bottom: 110px; }

/* AI card */
.ai-card { border-radius: 14px; }
.ai-head { display: flex; align-items: center; gap: 10px; }
.ai-mark { width: 22px; height: auto; image-rendering: pixelated; }
.ai-badge { margin-left: auto; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 6px; background: var(--pink); color: #fff; }
.ai-badge.facts { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }

.fact-list { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.fact-list .fact { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--ink); max-width: 78ch; }
.fact-list .fact .why-dot { margin-top: 7px; }
.fact-list .chip { vertical-align: 1px; margin-right: 2px; }
.sym-inline { font-weight: 700; color: #fff; }
a.hash { font-family: var(--mono); font-size: .92em; color: var(--pink-bright); text-decoration: none; border-bottom: 1px dashed rgba(255,92,147,.45); }
a.hash:hover { color: #fff; border-bottom-color: #fff; }
.asof { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-left: 8px; }

/* loading */
.loading-line { display: flex; align-items: center; gap: 12px; justify-content: center; }
.loading-cat { width: 34px; height: auto; image-rendering: pixelated; animation: fl-hop 1.1s ease-in-out infinite; }
@keyframes fl-hop { 0%,100% { transform: translateY(0); } 45% { transform: translateY(-7px); } }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.table-wrap table.feed { border: 0; margin: 0; }
table.feed tbody tr { transition: background .12s ease; }
table.feed tbody tr:hover { background: rgba(255,45,122,0.06); }
table.feed th { font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--ink-faint); letter-spacing: .02em; text-transform: none; }
.num-cell { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
table.feed .sym { font-size: 15px; }

/* chips, score */
.chip { border-radius: 6px; }
.chip.CRITICAL { background: var(--red); color: #fff; border-color: var(--red); }
.chip.HIGH { color: var(--red); border-color: rgba(255,77,94,.6); }
.chip.MEDIUM { color: var(--amber); border-color: rgba(255,181,46,.55); }
.chip.LOW { color: var(--green); border-color: rgba(57,255,136,.5); }
.why-dot.sev-LOW { background: var(--green); }
.why-dot.sev-MEDIUM { background: var(--amber); }
.why-dot.sev-HIGH, .why-dot.sev-CRITICAL { background: var(--red); }

/* token page */
.detail-head { align-items: flex-start; }
.score-big .num { color: var(--pink); text-shadow: 0 0 24px rgba(255,45,122,.35); }
.risk-under { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.panel-block, .card { border-radius: 14px; }
.avail-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.avail-chip { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.avail-chip.on { color: var(--green); border-color: rgba(57,255,136,.35); }

/* Ask FLETCH AI button */
.ask-fab { background: var(--pink); box-shadow: 0 10px 30px rgba(255,45,122,.35); }
.ask-fab img { width: 22px; height: auto; image-rendering: pixelated; }

footer { max-width: 900px; margin: 0 auto; line-height: 1.6; }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .tagline { display: none; }
  .brand-cat { width: 32px; }
  .status { font-size: 11px; padding: 6px 10px; max-width: 52vw; min-width: 0; }
  #status-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .brand { min-width: 0; }
  .brand-word { height: 18px; }
  .table-wrap table.feed { display: table; min-width: 860px; white-space: normal; }
  .table-wrap table.feed td:first-child { min-width: 250px; }
  .detail-head .addr a.hash { word-break: break-all; }
  .navbar { padding: 0 8px; top: 61px; }
  .navlink { padding: 12px 10px; }
  .detail-head { flex-direction: column; gap: 12px; }
  .risk-under { justify-content: flex-start; }
  .signal-row { grid-template-columns: 52px 1fr; }
  .ask-fab span { display: none; }
  .ask-fab { padding: 14px; border-radius: 50%; }
}


/* ================= mascot motion ================= */
.brand { position: relative; }
.brand-cat { animation: cat-idle 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
.brand-cat.hop { animation: cat-hop .55s cubic-bezier(.3,1.6,.5,1), cat-idle 4.5s ease-in-out .55s infinite; }
@keyframes cat-idle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes cat-hop { 0% { transform: translateY(0) scale(1,1); } 30% { transform: translateY(-12px) scale(.95,1.06); } 65% { transform: translateY(0) scale(1.08,.92); } 100% { transform: none; } }

.cat-say { position: absolute; left: 44px; top: 44px; z-index: 30; white-space: nowrap; pointer-events: none;
  font-family: var(--mono); font-size: 12px; color: #0a0a0e; background: #fff; padding: 6px 10px; border-radius: 10px 10px 10px 2px;
  box-shadow: 0 8px 20px rgba(0,0,0,.4); opacity: 0; transform: translateY(-4px) scale(.9); transition: opacity .18s ease, transform .18s ease; }
.cat-say.on { opacity: 1; transform: none; }

/* AI card cat: hops while loading, reacts to CRITICAL findings */
.ai-card .loading-cat { animation: cat-hop-loop 1.1s ease-in-out infinite; }
@keyframes cat-hop-loop { 0%,100% { transform: translateY(0); } 45% { transform: translateY(-7px); } }
.ai-mark.alert { animation: cat-shake .5s ease-in-out 2; }
@keyframes cat-shake { 0%,100% { transform: none; } 20% { transform: rotate(-10deg); } 40% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.cat-bang { font-family: var(--sans); font-weight: 700; color: var(--red); margin-left: -6px; transform-origin: bottom; animation: bang-pop .5s cubic-bezier(.2,1.8,.4,1); }
@keyframes bang-pop { from { opacity: 0; transform: scale(.2) translateY(6px); } to { opacity: 1; transform: none; } }

/* empty / pending states: the cat naps */
.state-block.has-cat { display: flex; gap: 16px; align-items: center; }
.state-cat { position: relative; flex: none; width: 46px; }
.state-cat img { width: 46px; height: auto; image-rendering: pixelated; opacity: .85; animation: cat-breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes cat-breathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.95); } }
.state-cat .zz { position: absolute; right: -6px; top: -4px; font-family: var(--mono); font-weight: 600; font-size: 12px; color: var(--pink-bright); opacity: 0; animation: zz 2.8s ease-in infinite; }
.state-cat .zz.z2 { font-size: 9px; animation-delay: 1.4s; }
@keyframes zz { 0% { opacity: 0; transform: translate(0,0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(10px,-18px); } }

/* Ask FLETCH AI: the cat on the button wiggles now and then */
.ask-fab img { animation: fab-wiggle 7s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes fab-wiggle { 0%,86%,100% { transform: none; } 89% { transform: rotate(-14deg) translateY(-2px); } 92% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.ask-fab:hover img { animation: cat-hop .5s cubic-bezier(.3,1.6,.5,1); }

/* once-per-visit stroll along the bottom */
.cat-walker { position: fixed; left: -80px; bottom: 18px; z-index: 15; pointer-events: none; animation: cat-walk 11s linear forwards; }
.cat-walker img { width: 44px; height: auto; image-rendering: pixelated; display: block; animation: cat-step .36s steps(2) infinite; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
@keyframes cat-walk { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 160px)); } }
@keyframes cat-step { 0% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  .brand-cat, .brand-cat.hop, .ai-card .loading-cat, .loading-cat, .ai-mark.alert, .state-cat img, .state-cat .zz, .ask-fab img, .cat-walker { animation: none !important; }
  .cat-walker { display: none; }
}
