/* ───────────────────── BLANET · stake field (network.html) ─────────────────────
   Loaded after style.css: tokens, nav, chips, vignette and grain come from there. */

body.net { overflow: hidden; height: 100dvh; }
#net-scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; cursor: grab; touch-action: none; }
#net-scene:active { cursor: grabbing; }
body.is-pointing #net-scene { cursor: pointer; }

/* ───────── projected labels ───────── */
.net-labels { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.net-label {
  position: absolute; left: 0; top: 0; display: grid; gap: 2px; justify-items: center; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  padding: 4px 8px; border-radius: 8px; background: rgba(5, 3, 8, 0.55);
  transition: opacity .3s; will-change: transform;
}
.net-label b { font-weight: 400; color: var(--ink); }
.net-label i { font-style: normal; color: var(--dim); font-size: 9px; }
.net-label.is-halt b { color: var(--amber); }
.net-label.is-line b { color: var(--ink); }
.net-label.is-over b, .net-label.is-over i { color: var(--bad); }
.net-label.is-planet b { color: var(--cyan); }
.net-label.is-hidden { opacity: 0; }

/* ───────── hover tooltip ───────── */
.net-tip {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; display: grid; gap: 3px; max-width: 300px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(10, 6, 18, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px; line-height: 1.35;
}
.net-tip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-tip span { color: var(--muted); font-size: 11.5px; }
.net-tip .is-pass { color: var(--ok); }
.net-tip .is-super { color: var(--amber); }
.net-tip .is-fail { color: #b3a9e0; }

/* ───────── overlay layout ───────── */
.net-ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.net-ui > * { pointer-events: auto; }

.net-head { position: absolute; left: var(--gutter); top: 96px; width: min(372px, 31vw); max-height: calc(100dvh - 170px); overflow-y: auto; scrollbar-width: none; }
.net-head::-webkit-scrollbar { display: none; }
.net-eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); }
.net-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.9vw, 42px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.net-lede { margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); text-shadow: 0 2px 18px rgba(5, 3, 8, 0.95); }

.net-figures { margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.net-figures > div { padding: 12px 14px; background: rgba(10, 6, 18, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); min-width: 0; }
.net-figures dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.net-figures dd { margin: 6px 0 0; display: grid; gap: 2px; }
.net-figures dd b { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.net-figures dd small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.net-controls { margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 6, 18, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px; transition: color .25s, background .25s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--amber); color: #1a0d00; }
.net-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.net-check input { accent-color: var(--ok); width: 15px; height: 15px; margin: 0; }
.seg button:focus-visible, .net-check input:focus-visible, .net-row:focus-visible, .net-tabs button:focus-visible,
.net-back:focus-visible, .net-search:focus-visible, .net-sheet:focus-visible, .net-how summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.net-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.net-legend li { display: flex; align-items: center; gap: 9px; color: var(--muted); min-width: 0; text-shadow: 0 1px 10px rgba(5, 3, 8, 0.9); }
.net-legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-legend .sw { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 10px var(--sw); }
.net-legend b { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.net-legend em { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bad); border: 1px solid rgba(255, 107, 107, 0.4); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.net-legend .is-note { margin-top: 4px; font-size: 11.5px; color: var(--dim); }
.net-legend .is-note span { white-space: normal; }

.net-how { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.net-how summary { cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); width: fit-content; }
.net-how[open] { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 6, 18, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.net-how p { margin: 10px 0 0; }
.net-how b { color: var(--ink); font-weight: 500; }

/* ───────── validator panel ───────── */
.net-panel {
  position: absolute; right: var(--gutter); top: 96px; bottom: 64px; width: min(388px, 31vw);
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(10, 6, 18, 0.74);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow: hidden;
}
.net-sheet { display: none; }
.net-panel-body, .net-list-view, .net-inspect { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.net-tabs { display: flex; gap: 4px; padding: 12px 12px 0; }
.net-tabs button {
  appearance: none; flex: 1; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; padding: 9px 10px;
}
.net-tabs button b { font-weight: 400; color: var(--dim); margin-left: 4px; font-variant-numeric: tabular-nums; }
.net-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, 0.05); }
.net-tabs button[aria-selected="true"] b { color: var(--amber); }
.net-search {
  margin: 10px 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3);
  color: var(--ink); font-family: var(--body); font-size: 13.5px;
}
.net-search::placeholder { color: var(--dim); }
.net-list-note { margin: 10px 14px 6px; font-size: 11.5px; line-height: 1.45; color: var(--dim); }
.net-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.net-row {
  appearance: none; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--body);
}
.net-row:hover { background: rgba(255, 255, 255, 0.05); }
.net-row.is-selected { background: rgba(255, 177, 92, 0.12); }
.net-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.is-pass { background: var(--ok); box-shadow: 0 0 8px rgba(126, 240, 177, 0.7); }
.dot.is-super { background: var(--amber); box-shadow: 0 0 8px rgba(255, 177, 92, 0.7); }
.dot.is-fail { background: transparent; border: 1.5px solid #8f84c4; }
.net-row-main, .net-row-side { display: grid; gap: 1px; min-width: 0; }
.net-row-side { justify-items: end; }
.net-row .n { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-row .m { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-row .m.is-fail { color: #b3a9e0; }
.net-row b { font-weight: 400; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.net-inspect { padding: 14px 16px 16px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.net-back { appearance: none; align-self: start; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.net-back:hover { color: var(--amber); }
.net-name { margin: 12px 0 0; font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.net-verdict { margin: 10px 0 0; }
.net-facts { margin: 14px 0 0; display: grid; gap: 0; }
.net-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); }
.net-facts dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.net-facts dd { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.net-checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.net-checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.net-checks .mark { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.net-checks .is-pass .mark { color: #04130b; background: var(--ok); }
.net-checks .is-fail .mark { color: var(--bad); border: 1.5px solid var(--bad); }
.net-checks .is-fail { border-color: rgba(255, 107, 107, 0.3); }
.net-checks b { font-weight: 500; font-size: 13px; }
.net-checks p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.net-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.net-notes li { padding-left: 12px; border-left: 2px solid rgba(255, 177, 92, 0.45); }

/* ───────── status strip ───────── */
.net-status { position: absolute; left: var(--gutter); bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 2 * var(--gutter)); }
.net-status .chip { background: rgba(10, 6, 18, 0.8); }
.net-noscript { position: fixed; inset: auto 0 0 0; z-index: 99; margin: 0; padding: 16px var(--gutter); background: #050308; }
.net-noscript a { color: var(--amber); }

/* short desktop windows: drop the lede so the legend stays in view */
@media (min-width: 900px) and (max-height: 840px) { .net-lede { display: none; } .net-figures { margin-top: 16px; } }

/* no WebGL: the page is still the full list, with every check and reason */
.no-webgl #net-scene, .no-webgl .net-labels { display: none; }

/* ───────── narrow screens: copy on top, validators in a bottom sheet ───────── */
@media (max-width: 899px) {
  body.net .nav-links { display: none; }
  .net-head { top: 74px; right: var(--gutter); width: auto; max-height: none; overflow: visible; }
  .net-title { font-size: 24px; }
  .net-lede, .net-how, .net-legend .is-note { display: none; }
  .net-figures { margin-top: 12px; grid-template-columns: repeat(4, 1fr); border-radius: 12px; }
  .net-figures > div { padding: 8px 9px; }
  .net-figures dt { font-size: 8px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .net-figures dd b { font-size: 16px; }
  .net-figures dd small { font-size: 9.5px; }
  .net-controls { margin-top: 10px; }
  .net-legend { margin-top: 10px; gap: 4px; font-size: 12px; }

  .net-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 52px; border-radius: 18px 18px 0 0; border-width: 1px 0 0; transition: height .35s var(--ease-out); }
  .net-panel.is-open { height: min(66dvh, 560px); }
  .net-sheet {
    appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; height: 52px; padding: 0 18px;
    border: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; text-align: left;
  }
  .net-sheet i { width: 9px; height: 9px; border: solid var(--amber); border-width: 2px 2px 0 0; transform: rotate(-45deg) translate(-2px, 2px); transition: transform .3s; flex: none; }
  .net-panel.is-open .net-sheet i { transform: rotate(135deg) translate(-2px, 2px); }
  .net-panel:not(.is-open) .net-panel-body { display: none; }
  .net-status { bottom: 62px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; z-index: 1; }
  .net-panel { z-index: 2; }
  .net-label { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .net-panel, .net-label { transition: none; }
}
