/* NIORA Hub sections (on top of human.css + app.css) */
.hub { padding-top: 112px; }

/* ---- market pulse ---- */
.pulsebar {
  display: flex; gap: 8px; align-items: stretch; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 30px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.pulsebar::-webkit-scrollbar { display: none; }
.pb-load { padding: 8px 10px; font-size: 13.5px; color: var(--dim); }
.pb-i {
  flex: none; display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px;
  font: inherit; color: inherit; border: 0; background: transparent; text-align: left;
}
.pb-i + .pb-i { border-left: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.pb-i small { font-size: 12px; color: var(--dim); }
.pb-i b { font-family: var(--mono); font-size: 14.5px; font-weight: 800; }
.pb-i em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.pb-coin { cursor: pointer; }
.pb-coin:hover { background: rgba(var(--green-rgb), .07); }
.pc { font-family: var(--mono); font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.pc.up { color: #16a34a; }
.pc.dn { color: #ef4444; }
b.pc { font-size: 14.5px; }

/* ---- section nav ---- */
.hubnav {
  position: sticky; top: 81px; z-index: 30; margin-top: 30px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--bg, #020504) 88%, transparent); backdrop-filter: blur(14px);
}
html[data-theme="light"] .hubnav { background: rgba(255, 255, 255, .9); }
.hubnav::-webkit-scrollbar { display: none; }
.hubnav button {
  flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font: 700 14.5px var(--sans);
}
.hubnav button:hover { color: var(--white); background: rgba(127, 127, 127, .08); }
.hubnav button.on { background: var(--green); color: #022014; }
html[data-theme="light"] .hubnav button.on { background: #0b1310; color: #0fed9c; }

.view { display: none; margin-top: 24px; }
.view.on { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view .kpis { margin-top: 0; }
.view .controls { margin-top: 0; }
.view-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.view-h.sub { margin-top: 34px; }
.view-h h2 { font-size: 26px; font-weight: 900; letter-spacing: -.03em; }
.view-h p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---- hub panels ---- */
.hp { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 18px; min-width: 0; }
.hp-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.hp-h h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.hp-h h2.up { color: #16a34a; }
.hp-h h2.dn { color: #ef4444; }
.hp-more { border: 0; background: none; padding: 0; cursor: pointer; font: 700 13.5px var(--sans); color: var(--green); }
.hp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.ov-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.ov-side { display: grid; gap: 14px; }
.two-col { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.floor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }

/* ---- feed rows ---- */
.flist { display: grid; }
.frow { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .15s; }
.frow:last-child { border-bottom: 0; }
.frow:hover { background: rgba(var(--green-rgb), .05); }
.fr-t { padding-top: 3px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.fr-m { display: grid; gap: 5px; min-width: 0; }
.fr-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); }
.fr-top .kind { font-size: 10.5px; padding: 2px 7px; }
.fr-top .flag { font-size: 10px; padding: 2px 6px; }
.fr-src { font-weight: 600; color: var(--muted); }
.frow b { font-size: 15px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.frow:hover b { color: var(--green); }
.kind.k-news { background: rgba(127, 127, 127, .12); color: var(--muted); }
.kind.k-social { background: rgba(236, 72, 153, .12); color: #db2777; }
.eco-chip { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(var(--green-rgb), .3); color: var(--green); }
.feed-hp { margin-top: 18px; }
.flist-more { margin: 14px auto 4px; display: flex; height: 44px; cursor: pointer; font-family: var(--sans); }
#feco { height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--white); font: 600 14px var(--sans); }

/* ---- trending ---- */
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--white); font: 600 13.5px var(--sans); }
.tchip span { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.tchip em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tchip:hover { border-color: rgba(var(--green-rgb), .5); }
.tchip.hot { border-color: rgba(var(--green-rgb), .45); background: rgba(var(--green-rgb), .08); }
.tchip.hot span { color: var(--green); }
.topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.topic { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.topic-h { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.topic-n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; background: rgba(var(--green-rgb), .12); color: var(--green); }
.topic-t { display: grid; gap: 3px; min-width: 0; }
.topic-t b { font-size: 17px; font-weight: 800; }
.ttype { font-family: var(--mono); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--dim); }
.tsym { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.topic-s { display: grid; justify-items: end; gap: 1px; }
.topic-s b { font-family: var(--mono); font-size: 20px; font-weight: 800; }
.topic-s small { font-size: 11.5px; color: var(--dim); }
.topic-refs { display: grid; gap: 4px; }
.topic-refs a { display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.4; background: rgba(127, 127, 127, .05); }
.topic-refs a:hover { color: var(--green); }
.topic-refs .kind { width: fit-content; font-size: 10px; padding: 1px 6px; }
.topic-refs em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--dim); }
.topic .hp-more { justify-self: start; }

.lrow { width: 100%; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lrow:last-child { border-bottom: 0; }
.lrow:hover .lr-t b { color: var(--green); }
.lrow img, .lrow > i { width: 22px; height: 22px; border-radius: 50%; }
.lr-n { width: 20px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.lr-t { display: grid; gap: 2px; min-width: 0; }
.lr-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-t small { font-size: 12px; color: var(--dim); }
.lr-r { display: grid; grid-auto-flow: column; gap: 6px; align-items: baseline; justify-items: end; font-family: var(--mono); font-size: 12.5px; }
.lr-r small { font-size: 10.5px; color: var(--dim); }
.lrow.pool { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.net { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 800; text-transform: uppercase; background: rgba(var(--green-rgb), .12); color: var(--green); }
.bs { display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: rgba(239, 68, 68, .5); overflow: hidden; max-width: 220px; }
.bs i { display: block; height: 100%; background: #16a34a; }

/* ---- movers ---- */
.mover { display: grid; grid-template-columns: 120px 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.mover:last-child { border-bottom: 0; }
.mv-c { display: grid; gap: 2px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.mv-c b { font-family: var(--mono); font-size: 15px; font-weight: 800; }
.mv-c small { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-c:hover b { color: var(--green); }
.mv-p, .mv-ch { display: grid; gap: 2px; font-family: var(--mono); font-size: 13.5px; }
.mv-ch { justify-items: end; }
.mv-ch .pc { font-size: 15px; }
.mv-p small, .mv-ch small { font-size: 11px; color: var(--dim); }
.mv-why { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; }
.mv-why a { display: block; padding: 8px 10px; border-radius: 10px; background: rgba(127, 127, 127, .06); }
.mv-why a:hover { color: var(--green); }
.mv-why em { font-style: normal; font-weight: 800; color: var(--green); }
.mv-why small { color: var(--dim); }
.mv-why .dim { display: block; padding: 8px 10px; font-size: 12.5px; }
.secrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.secrow:last-child { border-bottom: 0; }
.secrow span { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ovm { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.4; }
.ovm:last-child { border-bottom: 0; }
.ovm button { display: flex; gap: 8px; align-items: baseline; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.ovm button b { font-family: var(--mono); font-size: 14px; }
.ovm a { color: var(--muted); }
.ovm a:hover { color: var(--green); }

/* ---- heatmap ---- */
.heat { position: relative; overflow: hidden; border-radius: 12px; background: rgba(127, 127, 127, .08); }
.heat-big { height: 620px; }
.heat-mini { height: 240px; }
.tile {
  position: absolute; box-sizing: border-box; border: 1px solid rgba(0, 0, 0, .28); padding: 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden;
  color: #fff; font-family: var(--mono); line-height: 1.1; text-align: center; transition: filter .15s;
}
.tile:hover { filter: brightness(1.15); z-index: 1; outline: 2px solid #fff; outline-offset: -2px; }
.tile b { font-weight: 800; }
.tile span { font-size: .72em; font-weight: 700; opacity: .95; }
.tile small { font-size: .5em; opacity: .8; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 700 13.5px var(--mono); cursor: pointer; }
.seg button.on { background: var(--green); color: #022014; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sector { display: grid; gap: 3px; padding: 14px; border-radius: 12px; color: #fff; min-height: 92px; align-content: space-between; }
.sector b { font-size: 13.5px; line-height: 1.3; }
.sector span { font-family: var(--mono); font-size: 18px; font-weight: 800; }
.sector small { font-family: var(--mono); font-size: 11px; opacity: .8; }

/* ---- ecosystems ---- */
.ecobar { width: 100%; display: grid; grid-template-columns: 120px minmax(0, 1fr) 34px; gap: 10px; align-items: center; padding: 6px 0; border: 0; background: none; color: inherit; font: 600 13.5px var(--sans); text-align: left; cursor: pointer; }
.ecobar i { height: 8px; border-radius: 8px; background: rgba(127, 127, 127, .12); overflow: hidden; }
.ecobar u { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, rgba(var(--green-rgb), .5), var(--green)); }
.ecobar b { font-family: var(--mono); font-size: 13px; text-align: right; }
.ecobar:hover span { color: var(--green); }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.eco-card { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.eco-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.eco-h h3 { font-size: 19px; font-weight: 900; letter-spacing: -.02em; }
.eco-h span { font-size: 13px; color: var(--muted); }
.eco-h b { font-family: var(--mono); color: var(--white); }
.eco-list { display: grid; gap: 2px; }
.eco-list a { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.eco-list a:last-child { border-bottom: 0; }
.eco-list a b { font-size: 14px; font-weight: 600; line-height: 1.4; }
.eco-list a:hover b { color: var(--green); }
.eco-list small { font-size: 12px; color: var(--dim); }
.eco-card .hp-more { justify-self: start; }

/* ---- recent comments ---- */
.rc { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rc:last-child { border-bottom: 0; }
.rc em { font-style: normal; color: var(--dim); font-size: 12.5px; }
.rc p { margin-top: 3px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc small { font-size: 11.5px; color: var(--dim); }
.rc:hover b { color: var(--green); }

@media (max-width: 1200px) {
  .ov-grid, .floor-grid { grid-template-columns: 1fr; }
  .topic-list { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .heat-big { height: 460px; }
  .hubnav { top: 68px; }
}
@media (max-width: 640px) {
  .hub { padding-top: 92px; }
  .mover { grid-template-columns: 96px 1fr auto; }
  .eco-grid { grid-template-columns: 1fr; }
}


/* feed row thumbnails */
.frow.has-img { grid-template-columns: 44px minmax(0, 1fr) 132px; align-items: center; }
.fr-img { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: rgba(127, 127, 127, .1); }
@media (max-width: 640px) {
  .frow.has-img { grid-template-columns: 44px minmax(0, 1fr) 88px; }
  .fr-img { width: 88px; }
}

/* videos */
.vid-chans { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vid-chans button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 13px var(--sans); cursor: pointer; }
.vid-chans button.on, .vid-chans button:hover { color: var(--white); border-color: rgba(var(--green-rgb), .55); }
.vid-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.vid-stage { position: sticky; top: 100px; display: grid; gap: 10px; scroll-margin-top: 100px; }
.vid-stage h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.vid-stage small { font-size: 13px; color: var(--dim); }
.vid-stage p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.vid-player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.vid-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-play { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.vid-play img { width: 100%; height: 100%; object-fit: cover; }
.vid-play-i { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0, 0, 0, .65); border: 2px solid rgba(255, 255, 255, .85); }
.vid-play-i::after { content: ""; position: absolute; left: 30px; top: 22px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.vid-play:hover .vid-play-i { background: rgba(15, 237, 156, .85); }
.vid-grid { display: grid; gap: 12px; max-height: 1100px; overflow-y: auto; padding-right: 4px; }
.vid-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 4px 12px; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: none; color: inherit; text-align: left; cursor: pointer; font-family: var(--sans); }
.vid-card:hover, .vid-card.on { border-color: var(--line); background: var(--panel); }
.vid-th { grid-row: 1 / 3; }
.vid-th img { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.vid-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; }
.vid-card small { font-size: 12px; color: var(--dim); }
@media (max-width: 1100px) {
  .vid-wrap { grid-template-columns: 1fr; }
  .vid-stage { position: static; }
  .vid-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* ---------- hub v2: terminal look ---------- */
body.app-page { overflow-x: clip; }
.hub { padding-top: 96px; }
@keyframes nxBlink { 50% { opacity: .35; } }
@keyframes nxCaret { 50% { opacity: 0; } }
@keyframes nxSpin { to { transform: rotate(360deg); } }
@keyframes nxScan { from { transform: translateY(-140px); } to { transform: translateY(1000px); } }
@keyframes nxTape { to { transform: translateX(-50%); } }
@keyframes nxRun { from { left: 4%; } to { left: 95%; } }
@keyframes nxIn { from { opacity: 0; transform: translateY(-6px); } }
.nx-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: nxBlink 1.6s ease-in-out infinite; }

/* ticker tape (market pulse) */
.nx-tape { display: block; overflow: hidden; padding: 0; margin-bottom: 0; border-radius: 12px; background: rgba(127, 127, 127, .04);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.nx-tape-in { display: flex; width: max-content; animation: nxTape 60s linear infinite; }
.nx-tape:hover .nx-tape-in { animation-play-state: paused; }
.nx-tape-copy { display: contents; }
.nx-tape .pb-i { padding: 11px 20px; border-radius: 0; font-family: var(--mono); }
.nx-tape .pb-i + .pb-i { border-left: 1px solid var(--line); border-radius: 0; }
.nx-tape .pb-i small { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nx-tape .pb-i b { font-size: 13.5px; }

/* hero */
.nx-hero { position: relative; padding: 56px 0 44px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.nx-sky { position: absolute; z-index: -1; top: -200px; bottom: -80px; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none; overflow: hidden; }
.nx-sky::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(127, 127, 127, .22) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 25%, transparent 75%); }
.nx-sky::after { content: ""; position: absolute; width: 1100px; height: 1100px; right: -200px; top: -380px; background: radial-gradient(circle, rgba(var(--green-rgb), .18), transparent 60%); }
.nx-scan { position: absolute; left: 0; right: 0; top: 0; height: 140px; background: linear-gradient(180deg, transparent, rgba(var(--green-rgb), .06), transparent); animation: nxScan 8s linear infinite; }
.nx-copy { min-width: 0; }
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(127, 127, 127, .04); }
.nx-chip.g { color: var(--green); border-color: rgba(var(--green-rgb), .35); background: rgba(var(--green-rgb), .07); }
.nx-chip.radar-meta { text-align: left; font-size: 11px; }
.nx-title { margin-top: 26px; font-size: clamp(44px, 4.6vw, 80px); line-height: .98; font-weight: 900; letter-spacing: -.05em; }
.nx-title span { display: block; background: linear-gradient(90deg, #0fed9c, #7dffd0 55%, #0fed9c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-title span::after { content: ""; display: inline-block; width: .4em; height: .76em; margin-left: .08em; vertical-align: -.04em; background: var(--green); box-shadow: 0 0 18px rgba(var(--green-rgb), .8); animation: nxCaret 1s steps(1) infinite; }
.nx-lead { margin-top: 24px; font-size: 20px; font-weight: 650; color: var(--white); }
.nx-intro { margin-top: 16px; max-width: 660px; display: grid; gap: 12px; }
.nx-intro p { font-size: 15.5px; line-height: 1.75; color: var(--muted); }
.nx-cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nx-b1, .nx-b2 { height: 52px; padding: 0 22px; border-radius: 12px; display: inline-flex; align-items: center; gap: 12px; font: 800 15px var(--sans); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.nx-b1 { border: 0; background: var(--green); color: #02130c; box-shadow: 0 14px 40px -14px rgba(var(--green-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nx-b1:hover { transform: translateY(-1px); box-shadow: 0 18px 50px -12px rgba(var(--green-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nx-b2 { border: 1px solid var(--line); background: rgba(127, 127, 127, .05); color: var(--white); }
.nx-b2:hover { border-color: rgba(var(--green-rgb), .5); }
.nx-cta kbd { font: 800 11px var(--mono); padding: 3px 7px; border-radius: 6px; border: 1px solid currentColor; opacity: .55; }
.nx-link { font-weight: 700; font-size: 14.5px; color: var(--green); padding: 0 6px; }
.nx-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nx-trust { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 600 12px var(--mono); color: var(--dim); }
.nx-trust span::before { content: "▸ "; color: var(--green); }

/* radar console: always a dark terminal, in both themes */
.nx-console { --c-line: rgba(255, 255, 255, .08); position: relative; min-width: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; overflow: hidden; color: #e9efec;
  background: linear-gradient(180deg, #07130e, #040806 60%); box-shadow: 0 40px 120px -50px rgba(var(--green-rgb), .55), inset 0 1px 0 rgba(255, 255, 255, .06); }
.nx-cbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-line); font: 700 11.5px var(--mono); letter-spacing: .08em; color: #66716b; }
.nx-cbar b { display: inline-flex; align-items: center; gap: 8px; color: #0fed9c; letter-spacing: .14em; }
.nx-cbar em { margin-left: auto; font-style: normal; color: #9aa59f; }
.nx-scope { position: relative; height: 310px; display: grid; place-items: center; border-bottom: 1px solid var(--c-line); }
.nx-rings { position: relative; width: 272px; height: 272px; border-radius: 50%; border: 1px solid rgba(15, 237, 156, .35);
  background: radial-gradient(circle, rgba(15, 237, 156, .08) 0 2px, transparent 3px), radial-gradient(circle, transparent 32%, rgba(15, 237, 156, .2) 32.4%, transparent 33.2%, transparent 65.6%, rgba(15, 237, 156, .2) 66%, transparent 66.8%); }
.nx-rings::before, .nx-rings::after { content: ""; position: absolute; background: rgba(15, 237, 156, .14); }
.nx-rings::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.nx-rings::after { top: 50%; left: 0; right: 0; height: 1px; }
.nx-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(15, 237, 156, .42), transparent 24%); animation: nxSpin 4.5s linear infinite; }
.nx-blip { position: absolute; z-index: 1; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #0fed9c; box-shadow: 0 0 14px #0fed9c; animation: nxBlink 2.2s ease-in-out infinite; }
.nx-blip.r { background: #ff4d5e; box-shadow: 0 0 14px #ff4d5e; }
.nx-blip:hover { transform: scale(1.6); }
.nx-bl { position: absolute; left: 14px; top: -5px; font: 700 10.5px var(--mono); letter-spacing: .04em; color: #c9d4ce; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 6px #000; }
.nx-bl.l { left: auto; right: 14px; }
.nx-key { position: absolute; left: 16px; bottom: 14px; display: grid; gap: 4px; font: 700 11px var(--mono); }
.nx-key .g { color: #0fed9c; } .nx-key .r { color: #ff4d5e; }
.nx-count { position: absolute; right: 16px; bottom: 14px; text-align: right; font: 700 11px var(--mono); letter-spacing: .08em; color: #66716b; }
.nx-count b { display: block; font-size: 30px; color: #e9efec; letter-spacing: -.02em; }
.nx-stream { display: grid; }
.nx-row { display: grid; grid-template-columns: 50px 96px minmax(0, 1fr) 56px; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--c-line); font-size: 13.5px; color: #e9efec; transition: background .15s; }
.nx-row:last-child { border-bottom: 0; }
.nx-row:hover { background: rgba(15, 237, 156, .06); }
.nx-row.fresh { background: rgba(15, 237, 156, .05); animation: nxIn .8s ease-out; }
.nx-row time { font: 600 11.5px var(--mono); color: #66716b; }
.nx-row .kind { font-size: 10px; padding: 3px 6px; text-align: center; }
.nx-row b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-score { display: grid; gap: 4px; font: 800 11px var(--mono); color: #0fed9c; text-align: right; }
.nx-score i { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #0fed9c var(--s), rgba(255, 255, 255, .1) var(--s)); }
.nx-console .empty { padding: 18px 16px; color: #9aa59f; }

/* stats strip */
.nx-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(127, 127, 127, .03); }
.nx-kpi { position: relative; min-width: 0; padding: 20px 22px 18px; border-right: 1px solid var(--line); }
.nx-kpi:last-child { border-right: 0; }
.nx-kpi small { font: 700 11px var(--mono); letter-spacing: .12em; color: var(--dim); }
.nx-kpi b { display: block; margin-top: 10px; font: 800 32px var(--mono); letter-spacing: -.03em; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-kpi b.g { color: var(--green); }
.nx-kpi b.t { font-size: 24px; margin-top: 15px; font-family: var(--sans); font-weight: 900; }
.nx-kpi b i { font-style: normal; font-size: 18px; color: var(--dim); }
.nx-kpi span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-bars { position: absolute; right: 18px; top: 18px; display: flex; gap: 3px; align-items: flex-end; height: 28px; }
.nx-bars i { width: 4px; border-radius: 1px; background: rgba(var(--green-rgb), .6); }

/* section heads */
.nx-sec { padding-top: 76px; }
.nx-sh { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.nx-sh small { font: 800 12px var(--mono); letter-spacing: .18em; color: var(--green); }
.nx-sh h2 { margin-top: 10px; font-size: clamp(28px, 2.6vw, 42px); font-weight: 900; letter-spacing: -.035em; }
.nx-sh p { max-width: 460px; color: var(--muted); font-size: 14.5px; line-height: 1.65; text-align: right; }

/* HUD panels: corner brackets on hover */
.nx-hud, .hp { position: relative; }
.nx-hud { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(127, 127, 127, .05), rgba(127, 127, 127, .015)); transition: border-color .2s, transform .2s, box-shadow .2s; }
.nx-hud::before, .nx-hud::after, .hp::before, .hp::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: rgba(var(--green-rgb), .75); border-style: solid; opacity: 0; transition: opacity .2s; pointer-events: none; }
.nx-hud::before, .hp::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 16px; }
.nx-hud::after, .hp::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 16px; }
.nx-hud:hover, .hp:hover { border-color: rgba(var(--green-rgb), .35); }
.nx-hud:hover::before, .nx-hud:hover::after, .hp:hover::before, .hp:hover::after { opacity: 1; }
a.nx-hud:hover { transform: translateY(-3px); box-shadow: 0 30px 70px -40px rgba(var(--green-rgb), .55); }

/* desks */
.nx-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.nx-mod { display: flex; flex-direction: column; gap: 10px; min-height: 250px; padding: 22px; overflow: hidden; color: inherit; }
.nx-mod.w2 { grid-column: span 2; }
.nx-mh { display: flex; align-items: center; gap: 10px; font: 800 11px var(--mono); letter-spacing: .14em; color: var(--dim); }
.nx-mh em { font-style: normal; color: var(--green); }
.nx-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.nx-h3 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--white); }
.nx-p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.nx-prev { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 9px; min-height: 30px; }
.nx-prev:empty { display: none; }
.nx-pl { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12.5px; }
.nx-pl time { font: 600 11px var(--mono); color: var(--dim); }
.nx-pl b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-tch { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-tch > span { font: 700 11px var(--mono); padding: 5px 9px; border-radius: 7px; border: 1px solid rgba(var(--green-rgb), .28); color: var(--green); background: rgba(var(--green-rgb), .06); text-transform: uppercase; }
.nx-heat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.w2 .nx-heat { grid-template-columns: repeat(16, 1fr); }
.w2 .nx-heat i { aspect-ratio: 1; }
.nx-heat i { aspect-ratio: 1.4; border-radius: 3px; }
.nx-mv { display: grid; grid-template-columns: 52px 1fr 64px; gap: 8px; align-items: center; font: 700 11.5px var(--mono); }
.nx-mv i { height: 6px; border-radius: 3px; }
.nx-mv i.up { background: var(--green); } .nx-mv i.dn { background: #ef4444; }
.nx-mv .pc { text-align: right; }
.nx-vids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nx-vids img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: rgba(127, 127, 127, .12); }
.nx-msg { font-size: 12.5px; line-height: 1.5; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: rgba(127, 127, 127, .07); }
.nx-msg b { color: var(--white); font-weight: 700; margin-right: 6px; }

/* lifecycle */
.nx-lifew { position: relative; }
.nx-lifew::before { content: ""; position: absolute; left: 4%; right: 4%; top: 39px; height: 2px; background: linear-gradient(90deg, rgba(var(--green-rgb), .1), rgba(var(--green-rgb), .6), rgba(var(--green-rgb), .1)); }
.nx-run { position: absolute; z-index: 1; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 20px var(--green); animation: nxRun 5s ease-in-out infinite; }
.nx-life { position: relative; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.nx-step { padding: 68px 22px 22px; }
.nx-n { position: absolute; top: 20px; left: 22px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font: 800 13px var(--mono); color: var(--green); background: var(--bg); border: 1px solid rgba(var(--green-rgb), .45); }
.nx-step > .flag { position: absolute; top: 29px; right: 20px; }
.nx-step b { display: block; font-size: 19px; font-weight: 800; }
.nx-step p { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.nx-legend { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13px; color: var(--muted); }
.nx-legend > span { display: inline-flex; align-items: center; gap: 10px; }

/* source matrix */
.nx-marquee { display: grid; gap: 16px; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.nx-mq { overflow: hidden; padding: 6px 0; }
.nx-mq-in { display: flex; width: max-content; animation: nxTape var(--d, 50s) linear infinite; }
.nx-mq.to-r .nx-mq-in { animation-name: nxTapeR; }
.nx-mq:hover .nx-mq-in { animation-play-state: paused; }
.nx-mq-copy { display: contents; }
@keyframes nxTapeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.nx-pill { flex: none; display: inline-flex; align-items: center; gap: 12px; height: 58px; margin-right: 16px; padding: 0 22px 0 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(127, 127, 127, .05); font-size: 16px; font-weight: 700; color: var(--white); white-space: nowrap; transition: border-color .2s; }
.nx-pill:hover { border-color: rgba(var(--green-rgb), .45); }
.nx-pill img, .nx-mono { flex: none; width: 28px; height: 28px; border-radius: 8px; object-fit: contain; background: #fff; }
.nx-mono { display: grid; place-items: center; font: 800 13px var(--mono); color: #0b1310; }
.nx-led { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.nx-led.off { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* section bar as a command bar */
.hubnav { margin-top: 76px; padding: 6px; border-radius: 14px; }
.hubnav button { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 15px; border-radius: 10px; }
.hubnav button small { font: 800 10.5px var(--mono); color: var(--dim); }
.hubnav button em { font: 700 11px var(--mono); font-style: normal; padding: 2px 6px; border-radius: 5px; background: rgba(127, 127, 127, .12); }
.hubnav button em:empty { display: none; }
.hubnav button.on { box-shadow: 0 0 28px -8px rgba(var(--green-rgb), .9); }
.hubnav button.on small, .hubnav button.on em { color: inherit; background: rgba(0, 0, 0, .12); }

/* panels below: HUD header strips */
.hp { background: linear-gradient(180deg, rgba(127, 127, 127, .045), rgba(127, 127, 127, .012)); }
.hp-h { margin: -18px -18px 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: rgba(127, 127, 127, .035); border-radius: 16px 16px 0 0; }
.hp-h h2 { font: 800 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--white); }
.hp-more { font: 800 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.fr-t { font-size: 11.5px; }
.view-h h2 { letter-spacing: -.035em; }

/* light theme */
html[data-theme="light"] .nx-title span { background-image: linear-gradient(90deg, #00a36a, #00c98a 55%, #00a36a); }
html[data-theme="light"] .nx-title span::after { background: #00a36a; box-shadow: none; }
html[data-theme="light"] .nx-sky::after { background: radial-gradient(circle, rgba(0, 163, 106, .12), transparent 60%); }
html[data-theme="light"] .nx-b1 { background: #0b1310; color: #0fed9c; box-shadow: 0 14px 40px -18px rgba(0, 0, 0, .5); }
html[data-theme="light"] .nx-pill { background: #fff; box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .35); }
html[data-theme="light"] .nx-n { background: #fff; }
html[data-theme="light"] .hubnav button.on small, html[data-theme="light"] .hubnav button.on em { background: rgba(255, 255, 255, .14); }

@media (max-width: 1180px) {
  .nx-hero { grid-template-columns: minmax(0, 1fr); }
  .nx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nx-kpi:nth-child(3) { border-right: 0; }
  .nx-kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .nx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-life { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-lifew::before, .nx-run { display: none; }
}
@media (max-width: 640px) {
  .nx-hero { padding-top: 30px; gap: 32px; }
  .nx-lead { font-size: 17px; }
  .nx-intro p { font-size: 15px; }
  .nx-b1, .nx-b2 { flex: 1 1 100%; justify-content: center; }
  .nx-scope { height: 300px; place-items: start center; padding-top: 18px; }
  .nx-rings { width: 210px; height: 210px; }
  .nx-bl, .nx-cbar > span { display: none; }
  .nx-count b { font-size: 24px; }
  .nx-row { grid-template-columns: 44px 84px minmax(0, 1fr); }
  .nx-row .nx-score { display: none; }
  .nx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-kpi { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .nx-kpi:nth-child(2n) { border-right: 0; }
  .nx-kpi b { font-size: 26px; }
  .nx-bars { display: none; }
  .nx-bento, .nx-life { grid-template-columns: minmax(0, 1fr); }
  .nx-mod.w2 { grid-column: auto; }
  .nx-mod { min-height: 0; }
  .w2 .nx-heat { grid-template-columns: repeat(8, 1fr); }
  .nx-vids { grid-template-columns: repeat(2, 1fr); }
  .nx-marquee { gap: 10px; }
  .nx-pill { height: 48px; margin-right: 12px; padding: 0 18px 0 12px; gap: 10px; font-size: 14px; }
  .nx-pill img, .nx-mono { width: 24px; height: 24px; }
  .nx-sh { display: block; }
  .nx-sh p { margin-top: 10px; text-align: left; }
  .nx-sec { padding-top: 56px; }
  .hubnav { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-hero *, .nx-hero *::before, .nx-hero *::after, .nx-tape-in, .nx-run, .nx-dot, .nx-mq-in { animation: none !important; }
}
