/* RACE//PORT — operator console */
:root {
  --bg: #04060a;
  --bg2: #070b12;
  --panel: rgba(9, 15, 23, .86);
  --panel2: rgba(14, 22, 33, .9);
  --line: #132232;
  --line2: #1d3347;
  --text: #cfdbe7;
  --dim: #6f879c;
  --faint: #3d5266;
  --acc: #3dff9a;
  --acc-d: rgba(61, 255, 154, .12);
  --acc2: #2fd8ff;
  --acc2-d: rgba(47, 216, 255, .12);
  --warn: #ffb547;
  --warn-d: rgba(255, 181, 71, .12);
  --bad: #ff4d7d;
  --bad-d: rgba(255, 77, 125, .12);
  --vio: #a98bff;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 700px at 85% -10%, rgba(47, 216, 255, .08), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, rgba(61, 255, 154, .07), transparent 60%),
              var(--bg);
  color: var(--text);
  font: 13px/1.55 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--acc); color: #001; }
a { color: var(--acc2); text-decoration: none; }
a:hover { text-decoration: underline; }
.fx-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(47, 216, 255, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(47, 216, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
}
.fx-scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
#root { position: relative; z-index: 1; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 9px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- login */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-box { width: min(460px, 100%); }
.logo {
  font: 700 30px/1 var(--head); letter-spacing: .06em; color: #fff; display: inline-flex; gap: 2px; align-items: center;
}
.logo b { color: var(--acc); text-shadow: 0 0 18px rgba(61, 255, 154, .55); font-weight: 700; }
.logo:hover { animation: glitch .35s steps(2) 1; }
@keyframes glitch {
  0% { text-shadow: 2px 0 var(--bad), -2px 0 var(--acc2); transform: translateX(1px); }
  50% { text-shadow: -2px 0 var(--bad), 2px 0 var(--acc2); transform: translateX(-1px); }
  100% { text-shadow: none; transform: none; }
}
.boot { color: var(--dim); font-size: 12px; margin: 18px 0; min-height: 96px; white-space: pre-wrap; }
.boot .okk { color: var(--acc); }
.gate form { display: grid; gap: 12px; }
.gate .sub { color: var(--dim); margin: 6px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------------------------------------------------------------- shell */
.shell {
  display: grid; min-height: 100vh;
  grid-template-columns: 228px minmax(0, 1fr) 300px;
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: "top top top" "nav main feed";
}
.shell.nofeed { grid-template-columns: 228px minmax(0, 1fr) 0; }
.shell.nofeed .feed { display: none; }
.top {
  grid-area: top; display: flex; align-items: center; gap: 18px; padding: 0 18px;
  border-bottom: 1px solid var(--line); background: rgba(4, 6, 10, .82); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.top .logo { font-size: 20px; }
.top .grow { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 11px; letter-spacing: .12em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: pulse 2s infinite; }
.dot.off { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.meter { display: flex; flex-direction: column; line-height: 1.1; }
.meter span { font-size: 10px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.meter b { font: 700 15px var(--mono); color: #fff; }
.ops { display: flex; }
.op {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-left: -6px;
  background: var(--panel2); border: 1px solid var(--acc); color: var(--acc); font-size: 11px; font-weight: 700;
  text-transform: uppercase; box-shadow: 0 0 0 2px var(--bg);
}
.clock { color: var(--acc2); font-size: 12px; min-width: 64px; text-align: right; }
.usr { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; background: var(--panel2);
  border: 1px solid var(--line2); border-radius: var(--r); padding: 6px; display: none; z-index: 40;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
}
.menu.open { display: block; }
.menu button { width: 100%; text-align: left; border: 0; background: none; }
.menu button:hover { background: var(--acc-d); color: var(--acc); }

.nav {
  grid-area: nav; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; background: rgba(4, 6, 10, .5);
}
.nav .grp { color: var(--faint); font-size: 10px; letter-spacing: .18em; padding: 12px 10px 6px; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--dim);
  border: 1px solid transparent; text-decoration: none; transition: all .15s;
}
.nav a .k { color: var(--faint); font-size: 10px; width: 18px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav a.on { color: var(--acc); background: var(--acc-d); border-color: rgba(61, 255, 154, .25); }
.nav a.on .k { color: var(--acc); }
.nav .ai { margin-left: auto; font-size: 9px; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--vio); color: var(--vio); }

.main { grid-area: main; padding: 22px 26px 60px; min-width: 0; }
.feed {
  grid-area: feed; border-left: 1px solid var(--line); position: sticky; top: 56px; height: calc(100vh - 56px);
  display: flex; flex-direction: column; background: rgba(4, 6, 10, .5);
}
.feed h4 { margin: 0; padding: 14px 16px 10px; font: 500 11px var(--mono); letter-spacing: .18em; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.feed-list { overflow-y: auto; padding: 0 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.ev { padding: 8px 10px; border-left: 2px solid var(--line2); background: rgba(255, 255, 255, .015); font-size: 12px; animation: slidein .4s ease; }
.ev .t { color: var(--faint); font-size: 10px; }
.ev .u { color: var(--acc2); }
.ev.ev-claim { border-color: var(--acc); }
.ev.ev-intel { border-color: var(--vio); }
.ev.ev-check { border-color: var(--acc2); }
.ev.ev-release, .ev.ev-user { border-color: var(--warn); }
@keyframes slidein { from { opacity: 0; transform: translateX(10px); } }

/* ---------------------------------------------------------------- headings */
.hd { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hd h1 { margin: 0; font: 700 24px/1.1 var(--head); color: #fff; letter-spacing: .01em; }
.hd h1 .code { color: var(--acc); font: 500 13px var(--mono); display: block; letter-spacing: .2em; margin-bottom: 6px; }
.hd p { margin: 0; color: var(--dim); max-width: 640px; }
.hd .grow { flex: 1; }
h3 { font: 500 11px var(--mono); letter-spacing: .18em; color: var(--dim); text-transform: uppercase; margin: 0 0 12px; }

/* ---------------------------------------------------------------- panels */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 16px;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--acc); opacity: .55; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.cols.wide { grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); }
.muted { color: var(--dim); }
.small { font-size: 11px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------------------------------------------------------------- inputs */
input, select, textarea, button { font: inherit; color: inherit; }
.inp, textarea, select {
  width: 100%; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); border-radius: var(--r);
  padding: 9px 11px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-d); }
textarea { min-height: 190px; resize: vertical; line-height: 1.5; font-size: 12.5px; }
.drop { position: relative; }
.drop.over textarea { border-color: var(--acc2); box-shadow: 0 0 0 3px var(--acc2-d); }
.drop .meta { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; gap: 10px; flex-wrap: wrap; }
label.f { display: grid; gap: 6px; color: var(--dim); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--line2); background: rgba(255, 255, 255, .02); color: var(--text);
  letter-spacing: .06em; font-size: 12px; white-space: nowrap; transition: all .15s; text-decoration: none;
}
.btn:hover { border-color: var(--acc2); color: var(--acc2); text-decoration: none; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: #00140a; font-weight: 700; box-shadow: 0 0 22px rgba(61, 255, 154, .25); }
.btn.pri:hover { color: #00140a; box-shadow: 0 0 30px rgba(61, 255, 154, .5); filter: brightness(1.08); }
.btn.vio { border-color: var(--vio); color: var(--vio); }
.btn.vio:hover { background: rgba(169, 139, 255, .12); }
.btn.bad:hover { border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 5px 9px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(1); }
.kbd { font-size: 10px; color: inherit; opacity: .6; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; }
.chk { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text); }
.chk input { accent-color: var(--acc); width: 15px; height: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line2); color: var(--dim); cursor: pointer; font-size: 11px;
  background: none; transition: all .15s; user-select: none;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.on { border-color: var(--acc2); color: var(--acc2); background: var(--acc2-d); }
.chip b { color: var(--text); font-weight: 500; margin-left: 4px; }

/* ---------------------------------------------------------------- stats */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.tile span { color: var(--dim); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.tile b { display: block; font: 700 26px/1.2 var(--head); color: #fff; margin-top: 4px; }
.tile i { font-style: normal; color: var(--faint); font-size: 11px; }
.tile::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--c, var(--acc)), transparent); }
.tile.g { --c: var(--acc); } .tile.g b { color: var(--acc); }
.tile.c { --c: var(--acc2); }
.tile.r { --c: var(--bad); } .tile.r b { color: var(--bad); }
.tile.y { --c: var(--warn); } .tile.y b { color: var(--warn); }
.tile.v { --c: var(--vio); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; background: linear-gradient(180deg, var(--acc), rgba(61, 255, 154, .15)); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .5s; }
.bars .b span { font-size: 9px; color: var(--faint); }
.bars .b em { font-style: normal; font-size: 10px; color: var(--dim); }
.hbar { display: grid; grid-template-columns: 190px 1fr 60px; gap: 10px; align-items: center; margin: 6px 0; font-size: 12px; }
.hbar .track { height: 8px; background: rgba(255, 255, 255, .04); border-radius: 9px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc2), var(--acc)); border-radius: 9px; }
.hbar b { text-align: right; font-weight: 500; }

/* ---------------------------------------------------------------- tables & lists */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tab { padding: 9px 14px; border: 0; background: none; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; letter-spacing: .06em; font-size: 12px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--acc); border-color: var(--acc); }
.tab .n { color: var(--faint); margin-left: 6px; }
.tab.on .n { color: var(--acc); opacity: .7; }
.scroll { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0, 0, 0, .25); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 0; background: #08101a; text-align: left; font-weight: 500; color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 9px 10px; border-bottom: 1px solid var(--line2); z-index: 1; }
td { padding: 7px 10px; border-bottom: 1px solid rgba(19, 34, 50, .7); vertical-align: top; overflow-wrap: anywhere; }
tr:hover td { background: rgba(47, 216, 255, .03); }
.list { font-size: 12.5px; padding: 8px 12px; margin: 0; white-space: pre; line-height: 1.7; counter-reset: ln; }
.list div { counter-increment: ln; }
.list div::before { content: counter(ln); color: var(--faint); display: inline-block; width: 46px; font-size: 10px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid; }
.tag.fresh { color: var(--acc); border-color: rgba(61, 255, 154, .4); background: var(--acc-d); }
.tag.taken { color: var(--bad); border-color: rgba(255, 77, 125, .4); background: var(--bad-d); }
.tag.junk { color: var(--warn); border-color: rgba(255, 181, 71, .35); background: var(--warn-d); }
.tag.info { color: var(--acc2); border-color: rgba(47, 216, 255, .35); background: var(--acc2-d); }
.tag.vio { color: var(--vio); border-color: rgba(169, 139, 255, .4); background: rgba(169, 139, 255, .1); }
.empty { color: var(--faint); padding: 26px; text-align: center; }

/* ---------------------------------------------------------------- progress */
.prog { height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.prog i {
  display: block; height: 100%; width: 0; transition: width .3s;
  background: repeating-linear-gradient(45deg, var(--acc) 0 10px, #2bd47f 10px 20px); background-size: 28px 28px;
  animation: stripes 1s linear infinite; box-shadow: 0 0 12px var(--acc);
}
@keyframes stripes { to { background-position: 28px 0; } }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- notices */
.note { padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--panel2); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note.warn { border-color: rgba(255, 181, 71, .45); color: var(--warn); background: var(--warn-d); }
.note.good { border-color: rgba(61, 255, 154, .4); color: var(--acc); background: var(--acc-d); }
.note.bad { border-color: rgba(255, 77, 125, .45); color: var(--bad); background: var(--bad-d); }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--acc); border-radius: var(--r); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); animation: slidein .25s; }
.toast.bad { border-left-color: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 150; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: min(420px, 100%); margin: 0; }

/* ---------------------------------------------------------------- intel cards */
.intel { display: grid; gap: 14px; }
.icard h2 { margin: 0; font: 700 20px var(--head); color: #fff; }
.icard .one { color: var(--acc2); margin: 4px 0 12px; }
.icard .sum { color: var(--text); line-height: 1.7; margin: 0 0 14px; }
.icard dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 12px; }
.icard dt { color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding-top: 2px; }
.icard dd { margin: 0; }
.pitch { border: 1px dashed rgba(169, 139, 255, .5); background: rgba(169, 139, 255, .07); color: #ddd2ff; padding: 10px 12px; border-radius: var(--r); margin-bottom: 12px; }
.pitch b { color: var(--vio); font-size: 10px; letter-spacing: .16em; display: block; margin-bottom: 4px; }
.qrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.qrow:hover { background: rgba(255, 255, 255, .02); }
.qrow .one { color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hide { display: none !important; }
.mob-only { display: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr) 0; }
  .shell .feed { display: none; }
  .shell.feedopen .feed { display: flex; position: fixed; right: 0; top: 56px; width: min(320px, 90vw); z-index: 30; background: var(--bg2); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px auto minmax(0, 1fr); grid-template-areas: "top" "nav" "main"; }
  .nav { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav .grp { display: none; }
  .nav a { flex: none; }
  .main { padding: 16px 16px 60px; }
  .top { gap: 10px; padding: 0 12px; }
  .top .meter.hide-m, .clock, .live .lbl { display: none; }
  .mob-only { display: inline-flex; }
  .hbar { grid-template-columns: 100px 1fr 46px; }
  .icard dl { grid-template-columns: 1fr; }
}

/* intel quotes from the site */
.quotes { display: grid; gap: 8px; margin: 0 0 14px; }
.quotes blockquote { margin: 0; padding: 8px 12px; border-left: 2px solid var(--acc2); background: rgba(47, 216, 255, .05); color: var(--text); font-size: 12px; line-height: 1.6; }
.icard .note { margin-bottom: 10px; }
