:root {
  --bg: #0c0d10;
  --ink: #ece7dc;
  --muted: #8d8778;
  --line: #2a2c33;
  --panel: #14161c;
  --floor: #d9d1c0;
  --floor-ink: #1a1712;
  --left: #4c8dff;
  --center: #c7b07a;
  --right: #e24a4a;
  --yes: #3dba7a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 22px 28px 10px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.mark {
  font-family: Newsreader, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 1.35rem;
}
.tag { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.pill {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
}
.pill.on { color: var(--yes); border-color: #245c3d; }

.skynet-page { background: #0c0d10; }
.skynet-banner,
.klmx-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 28px 0;
  min-height: 132px;
  padding: 22px 20px;
  text-decoration: none;
  color: #140e0c;
  background: linear-gradient(180deg, #ffe08a 0%, #ff5c5c 100%);
  border: 3px solid #ece7dc;
  box-shadow: 0 0 0 1px #ff5c5c55, 0 16px 40px rgba(255, 92, 92, 0.22);
  cursor: default;
}
.klmx-connect { cursor: pointer; }
.klmx-connect:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.klmx-connect-title {
  font-family: Newsreader, Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.1rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
}
.klmx-connect-line {
  max-width: 36em;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-style: italic;
  line-height: 1.35;
  text-align: center;
  opacity: 0.88;
}

.search-wrap { padding: 28px 28px 8px; max-width: 980px; }
.lede { color: #c8c2b4; max-width: 62ch; margin-bottom: 18px; }
#search-form { display: flex; gap: 8px; }
#q {
  flex: 1;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid #3a3d48;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.05rem;
}
#q:focus { outline: 1px solid var(--center); }
#go {
  background: var(--ink);
  color: var(--bg);
  border: 0;
  padding: 0 22px;
  font: 600 14px "IBM Plex Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
#go:disabled { opacity: 0.5; cursor: wait; }

.trending { margin-top: 16px; }
.trending #chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 12px;
  font: 14px "IBM Plex Sans", sans-serif;
  cursor: pointer;
  max-width: 34ch;
  text-align: left;
  line-height: 1.3;
}
.chip em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--center);
}
.chip:hover { border-color: var(--center); color: var(--center); }

.status {
  margin: 8px 28px 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--center);
  min-height: 1.4em;
}
.status.err { color: var(--right); }

main { padding: 18px 28px 64px; display: grid; gap: 36px; }
.kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.meta { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); }

.floor {
  background: var(--floor);
  color: var(--floor-ink);
  padding: 22px 24px;
}
.floor .kicker { color: #6b6354; }
.floor h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 14px;
}
#consensus { list-style: none; display: grid; gap: 8px; }
#consensus li {
  background: rgba(255,255,255,0.35);
  padding: 8px 12px;
  border-left: 3px solid #1a1712;
}
#consensus .who { display: block; font-size: 11px; color: #6b6354; margin-top: 4px; }
.coverage { margin-top: 14px; font-size: 13px; color: #4e483c; }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.col {
  border: 1px solid var(--line);
  padding: 12px;
  background: var(--panel);
  min-height: 120px;
}
.col h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.col.left { border-top: 3px solid var(--left); }
.col.center { border-top: 3px solid var(--center); }
.col.right { border-top: 3px solid var(--right); }
.col.left h3 { color: var(--left); }
.col.center h3 { color: var(--center); }
.col.right h3 { color: var(--right); }
.hl { margin-bottom: 14px; }
.hl a {
  color: inherit;
  text-decoration: none;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.3;
}
.hl a:hover { text-decoration: underline; }
.hl .src { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.empty-col { color: var(--muted); font-size: 13px; }

.tells { display: flex; flex-wrap: wrap; gap: 10px; }
.tell {
  display: flex; gap: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}
.tell span { padding: 8px 12px; font-size: 13px; }
.tell .l { background: rgba(76,141,255,0.12); }
.tell .c { background: rgba(199,176,122,0.12); }
.tell .r { background: rgba(226,74,74,0.12); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
th:first-child, td:first-child { text-align: left; min-width: 12ch; }
th { font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
th.left { color: var(--left); }
th.center { color: var(--center); }
th.right { color: var(--right); }
.dot-yes { color: var(--yes); font-size: 16px; }
.dot-no { color: #3a3d48; font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .name { font-weight: 600; }
.card .emo {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.card.left { box-shadow: inset 3px 0 0 var(--left); }
.card.center { box-shadow: inset 3px 0 0 var(--center); }
.card.right { box-shadow: inset 3px 0 0 var(--right); }
.card .frame { font-family: Newsreader, Georgia, serif; font-size: 1.05rem; }
.card ul { margin-left: 1.1em; color: #c8c2b4; font-size: 14px; }
.card .agenda { color: var(--ink); font-size: 14px; }
.loaded { display: flex; flex-wrap: wrap; gap: 6px; }
.loaded i {
  font-style: normal;
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 2px 6px;
  color: var(--center);
}

.split-sec p { max-width: 70ch; font-size: 1.08rem; color: #d6d0c4; }
.empty { padding: 32px 28px; color: var(--right); }

footer {
  border-top: 1px solid var(--line);
  padding: 18px 28px 28px;
  color: var(--muted);
  font-size: 12px;
  max-width: 80ch;
}
footer code { color: var(--ink); }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .top, .search-wrap, main, .status, footer, .empty, .klmx-connect { padding-left: 16px; padding-right: 16px; }
  .klmx-connect { margin-left: 16px; margin-right: 16px; min-height: 110px; }
  #search-form { flex-direction: column; }
  #go { padding: 12px; }
}
