
:root {
  --bg: #0a0a0a; --bg2: #141414; --bg3: #1e1e1e;
  --fg: #e0e0e0; --fg2: #888;
  --accent: #4ecdc4; --accent2: #ff6b6b;
  --green: #51cf66; --red: #ff6b6b; --amber: #ffd93d;
  --border: #2a2a2a;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  --rail-w: 172px; --rail-w-collapsed: 52px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--mono); background: var(--bg); color: var(--fg); font-size: 14px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
header { border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; background: var(--bg); z-index: 100; }
#sanity-subbar { display: none; position: sticky; z-index: 90; background: var(--bg); border-bottom: 1px solid var(--border); padding: 6px 0; }
/* position: relative so the search popup can hang off the container rather than
   off the 280px input. The rail is fixed at z-index 110 and the header is a
   stacking context at 100, so a popup anchored to the input and wide enough for
   a realm path slid *under* the rail; anchored here it simply cannot reach it. */
header .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; }
.logo { font-size: 18px; font-weight: bold; color: var(--accent); cursor: pointer; }
.logo { display: inline-flex; align-items: center; gap: 7px; }
.logo-mark { width: 19px; height: 19px; flex: 0 0 19px; color: var(--accent); }
#rename-notice { background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 13px; }
#rename-notice .container { display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  white-space: nowrap; overflow: hidden; }
#rename-notice b { color: var(--accent); }
#rename-notice button { margin-left: auto; margin-right: 190px; background: none; border: 1px solid var(--border);
  color: var(--fg2); font: inherit; font-size: 12px; padding: 2px 9px; border-radius: 4px; cursor: pointer; }
#rename-notice button:hover { color: var(--fg); border-color: var(--fg2); }
html.rail-collapsed .logo { gap: 0; }

/* The nav rail.
   It was a horizontal bar in the header and had reached eighteen entries,
   which on any window narrower than a desktop wrapped to three rows of
   look-alike words and pushed the content down by that much on every page.
   A vertical rail gives each entry a fixed place a reader can learn, and the
   icon is what survives the collapsed width — the one thing a 52px rail can
   still show.
   `nav` and the `#nav-<view>` ids are kept exactly as they were: route()
   drives the active class off them, and the e2e suite walks them.

   Nineteen flat entries later it needed a second axis. Six of them are a
   section landing page (gas, govdao, contracts, blocks, home) and the rest
   are views *of* that section, which the flat list said nothing about: a
   reader looking for the parameter table had to know it was called "params"
   and that it had nothing to do with "sanity" two rows below. So sections
   nest, expanded by default, and each section's landing page repeats its
   children as a pill strip (.pagenav) — which is also what keeps them
   reachable when the rail is collapsed to icons and the children are gone. */
body { padding-left: var(--rail-w); }
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 110;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden; }
/* The nav scrolls, not the whole rail.
   With overflow on the rail, the brand and the collapse button scrolled away
   with the links, and worse: the rail became a scroll container the moment its
   content passed the viewport, so a wheel anywhere over the left 172px scrolled
   the nav by a few pixels instead of scrolling the page. Measured at a 1000px
   viewport on 2026-09-23, the rail's content was exactly 1000px, so the next
   entry anyone added tipped it over; adding `glossary` is what found it.
   Confining the scroll to nav means the chrome stays pinned, the wheel only
   goes to the nav when the cursor is actually on it, and the rail has room to
   grow again. min-height:0 is required: a flex item will not shrink below its
   content without it, and the overflow would never engage. */
.rail nav { overflow-y: auto; overflow-x: hidden; min-height: 0; }
.rail nav::-webkit-scrollbar { width: 6px; }
.rail nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.rail-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.rail-top .logo { font-size: 15px; white-space: nowrap; overflow: hidden; }
.rail nav { display: flex; flex-direction: column; gap: 1px; padding: 0 6px 8px; }
.rail nav a { display: flex; align-items: center; gap: 10px; color: var(--fg2); font-size: 12.5px;
  cursor: pointer; padding: 5px 8px; border-radius: 4px; white-space: nowrap;
  border-left: 2px solid transparent; }
.rail nav a:hover { color: var(--fg); background: var(--bg3); text-decoration: none; }
.rail nav a.active { color: var(--accent); background: var(--bg3); border-left-color: var(--accent); }
.rail nav a svg { width: 15px; height: 15px; flex: 0 0 15px; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rail nav a { position: relative; }
.rail nav a.has-watch::after { content: ''; position: absolute; left: 17px; top: 5px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg2); }
html.rail-collapsed .rail nav a.has-watch::after { left: calc(50% + 4px); }

/* Sections. The children are a plain indented list under the parent, with
   the guide line doing the work a second icon column would do badly at
   12.5px. Every section is always open: the parent row is a link to a real
   page, and the twisty that used to fold it made the row read as a
   disclosure header instead, so the label looked unclickable. Six sections
   of at most four children never needed folding, and dropping it drops the
   stored preference with it. */
.rail nav .nav-kids { display: flex; flex-direction: column; gap: 1px;
  margin: 1px 0 4px 21px; padding-left: 4px; border-left: 1px solid var(--border); }
.rail nav .nav-kids a { padding: 4px 8px; font-size: 12px; }
/* A parent whose child is the current page. Muted while the labels are
   visible — the child row already carries the accent, and two accents in a
   column read as two selections — and promoted to the full active styling
   once the rail is collapsed and the child row is gone. */
.rail nav a.in-section { color: var(--fg); }
html.rail-collapsed .rail nav .nav-kids { display: none; }
html.rail-collapsed .rail nav a.in-section { color: var(--accent); background: var(--bg3);
  border-left-color: var(--accent); }
.rail-foot { margin-top: auto; padding: 8px 6px 12px; }
/* The about block: which build is this, since when, and where to say it is
   wrong. Deliberately quiet: it sits under every page but is never the thing
   being read, so it is one step down in size and colour from a nav entry. */
.rail-about { border-top: 1px solid var(--border); margin: 0 2px 8px; padding: 8px 4px 2px;
  font-size: 10px; letter-spacing: -.2px; line-height: 1.55; color: var(--fg2); }
.rail-about .ra-row { display: flex; gap: 5px; align-items: baseline; white-space: nowrap; }
.rail-about .ra-k { flex: 0 0 32px; opacity: .7; }
.rail-about .ra-v { overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.rail-about a.ra-v { color: var(--fg); }
.rail-about a.ra-v:hover { color: var(--accent); }
.rail-about .ra-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; }
.rail-about .ra-links a { color: var(--fg2); }
.rail-about .ra-links a:hover { color: var(--accent); }
html.rail-collapsed .rail-about { display: none; }
.rail-toggle { display: flex; align-items: center; gap: 10px; width: 100%; background: none;
  border: none; color: var(--fg2); font-family: var(--mono); font-size: 12.5px; cursor: pointer;
  padding: 5px 8px; border-radius: 4px; }
.rail-toggle:hover { color: var(--fg); background: var(--bg3); }
.rail-toggle svg { width: 15px; height: 15px; flex: 0 0 15px; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Collapsed: icons only. The label is still in the DOM for the accessibility
   tree and for the e2e suite's text selectors, just not painted — hiding it
   with display:none would take it out of both. */
html.rail-collapsed body { padding-left: var(--rail-w-collapsed); }
html.rail-collapsed .rail { width: var(--rail-w-collapsed); }
html.rail-collapsed .rail .rail-label { position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.rail-collapsed .rail nav a, html.rail-collapsed .rail-toggle { justify-content: center; padding: 6px 0; }
html.rail-collapsed .rail-top { justify-content: center; padding: 12px 0 10px; }
html.rail-collapsed .rail-toggle svg { transform: scaleX(-1); }
.search-box { margin-left: auto; position: relative; }
.search-box input { background: var(--bg2); border: 1px solid var(--border); color: var(--fg); padding: 6px 30px 6px 12px; border-radius: 4px; font-family: var(--mono); font-size: 13px; width: 240px; outline: none; transition: box-shadow 0.15s, border-color 0.15s, width 0.15s; }
/* A visible glow, not just the border-color swap it had before — the box
   looks identical whether focused or not otherwise, easy to lose track of
   which element a keystroke actually goes to. */
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(78,205,196,0.2); width: 280px; }
/* The "/" shortcut only ever showed up in the "?" help overlay — nothing on
   the box itself said it was there. Hidden once there's something to search
   for or the field already has focus, so it never fights the caret. */
.search-box .kbd-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--fg2); border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; pointer-events: none; background: var(--bg); }
.search-box input:focus + .kbd-hint, .search-box input:not(:placeholder-shown) + .kbd-hint { display: none; }
/* The popup is sized for what it holds, not for the box above it. A realm path
   is gno.land/r/<40-character address>/<name>, sixty-odd characters that a
   280px dropdown clipped at exactly the wrong end: two of one deployer's
   realms, "/bubblerumble" and "/bubblerumble2", rendered as the same row.
   Anchored to the input's right edge and capped against the viewport, so it can
   grow left over the page without ever pushing a horizontal scrollbar. */
#search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-width: 820px; margin-left: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; max-height: min(70vh, 560px); overflow-y: auto; overflow-x: hidden; display: none; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
#search-results.open { display: block; }
.search-section-label { padding: 8px 12px 4px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--fg2); }
.search-loading { padding: 10px 12px; color: var(--fg2); font-size: 12px; }
.search-result { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--bg3); }
.search-result .badge { flex: none; }
.search-result-text { flex: 1; min-width: 0; }
/* What identifies a package is the END of its path, so the two halves give up
   room in the opposite order to the reading order: the namespace shrinks first
   (999 against 1) and is the only part that ever shows an ellipsis; the name
   survives whole until there is genuinely nothing left to take. */
/* The popup shows a few rows per group; these two lead to the rest. */
.search-more { display: block; padding: 6px 12px 8px 12px; font-size: 12px; color: var(--fg2); border-bottom: 1px solid var(--border); text-decoration: none; }
.search-more:hover { color: var(--fg); background: var(--bg3); }
.search-all { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg2); border-top: 1px solid var(--border); color: var(--accent); text-decoration: none; font-size: 13px; }
.search-all:hover { background: var(--bg3); }
.search-all-key { font-family: var(--mono); font-size: 10px; color: var(--fg2); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; }
.search-page-group { margin: 0 0 20px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg2); }
.search-page-kinds { margin: 8px 0 16px; }
.search-result-title { display: flex; align-items: baseline; font-family: var(--mono); font-size: 14px; }
.search-result-prefix { flex: 0 999 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg2); }
.search-result-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.search-result-sub { margin-top: 2px; font-size: 12px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar { display: flex; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat .label { font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; }
.stat .value { font-size: 20px; font-weight: bold; color: var(--accent); }
.stat-link { cursor: pointer; }
.stat-link:hover .label { color: var(--accent); }
.stat-link:hover .value { text-decoration: underline; }
/* The window's share of a tile, under the all-time figure. Deliberately small:
   the total is the anchor a reader recognises, the delta is what tells them
   whether the anchor moved. */
.stat .delta { font-size: 11px; color: var(--fg2); margin-top: 2px; white-space: nowrap; min-height: 14px; }
/* Used by the tiles and by every "vs before" cell, so a rise reads the same
   colour wherever it appears on the page. */
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--fg2); }
.window-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 0 0; }
.window-bar .win-label { font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; }
.window-bar .win-range { font-size: 11px; color: var(--fg2); }
main { padding: 20px 0; }
/* overflow-x lets a table with a wide column (events' free-text "attributes",
   say) scroll its own table rather than pushing the whole page wider than
   the viewport — every table on the site lives directly inside a .section,
   so this one rule covers all of them without touching each table's own
   markup. */
/* Discover.
 *
 * A card, not a table row. The whole point of this page is that a line reading
 * `package.deployed | gno.land/r/moul/hello` tells a non-developer nothing, so
 * the sentence is the primary element and the machine-readable identifiers are
 * demoted to a footer. Sizing follows from that: the headline is the largest
 * text on the page after the page title, and the ids are 11px monospace.
 *
 * The left border carries the verdict. It is the one piece of state a reader
 * scans for down a column, and a 3px rule reads faster than a pill they have to
 * fixate on, so the pill is there too but the border is what you see first. */
.dsc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.dsc-sub { color: var(--fg2); font-size: 12px; margin-bottom: 10px; max-width: 78ch; line-height: 1.5; }
.dsc-filters { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 10px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.dsc-fgroup { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dsc-flabel { color: var(--fg2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; margin-right: 2px; }
.dsc-chip { cursor: pointer; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; color: var(--fg2);
            background: none; border: 1px solid var(--border); font-family: inherit; white-space: nowrap; }
.dsc-chip:hover { color: var(--fg); border-color: var(--fg2); }
.dsc-chip.on { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.dsc-chip .n { opacity: 0.6; margin-left: 4px; }

.dsc-card { position: relative; border: 1px solid var(--border); border-left: 3px solid var(--border);
            border-radius: 4px; background: var(--bg2); padding: 13px 15px; margin-bottom: 10px; }
.dsc-card.v-share { border-left-color: var(--green); }
.dsc-card.v-maybe { border-left-color: var(--amber); }
.dsc-card.v-hold  { border-left-color: var(--border); opacity: 0.72; }
.dsc-card.demoted { opacity: 0.66; }

/* The feed row: the same event as a card, at a third of the height.
 *
 * The card is right for the two or three rows that answer the question and
 * wrong for the fifty underneath: seven lines each put four events on a screen,
 * and a feed you cannot scan is a feed nobody reads to the bottom. So the lead
 * block keeps the card and the feed gets this, which is two lines plus whatever
 * the reader opens.
 *
 * A <details> rather than a click handler, so the whole thing keeps working
 * from a keyboard and the browser owns the open state. */
.dsc-row { border-bottom: 1px solid var(--border); }
.dsc-row > summary { display: grid; grid-template-columns: 52px 60px 1fr; gap: 10px; align-items: baseline;
                     padding: 7px 4px; cursor: pointer; list-style: none; }
.dsc-row > summary::-webkit-details-marker { display: none; }
.dsc-row > summary:hover { background: var(--bg2); }
.dsc-row[open] > summary { background: var(--bg2); }
.dsc-row-age { font-family: var(--mono); font-size: 11px; color: var(--fg2); text-align: right; }
.dsc-row-main { min-width: 0; }
.dsc-row-line { font-size: 13.5px; line-height: 1.4; color: var(--fg); }
/* One line, clipped rather than wrapped: a row that grows to two lines when a
 * package has a long name reintroduces exactly the raggedness this replaced. */
.dsc-row-meta { font-family: var(--mono); font-size: 10.5px; color: var(--fg2); margin-top: 2px;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsc-row-meta .sep { opacity: 0.4; margin: 0 5px; }
.dsc-row.v-hold .dsc-row-line { color: var(--fg2); }
.dsc-row-body { padding: 2px 4px 14px 126px; }
.dsc-row-body .dsc-matters { margin-top: 0; }
.dsc-row-body .dsc-verdict { border-top: none; padding-top: 0; margin-top: 9px; }
@media (max-width: 720px) {
  .dsc-row > summary { grid-template-columns: 44px 1fr; }
  .dsc-row > summary .dsc-pill { grid-column: 1; }
  .dsc-row-body { padding-left: 4px; }
}
.dsc-headline { font-size: 15px; line-height: 1.45; color: var(--fg); }
.dsc-matters { font-size: 13px; line-height: 1.5; color: var(--fg2); margin-top: 5px; max-width: 78ch; }
.dsc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px;
            font-size: 11px; color: var(--fg2); font-family: var(--mono); }
.dsc-meta a { font-size: 11px; }
.dsc-meta .sep { opacity: 0.4; }

/* The verdict line. Always present, including on a hold, because "why not" is
 * the part a reader learns from: a queue that silently drops what it ruled out
 * teaches nothing and cannot be argued with. */
.dsc-verdict { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding-top: 9px;
               border-top: 1px dashed var(--border); font-size: 12px; line-height: 1.45; }
.dsc-pill { flex: 0 0 auto; padding: 2px 8px; border-radius: 3px; font-size: 10.5px; font-weight: bold;
            text-transform: uppercase; letter-spacing: 0.5px; }
.dsc-pill.v-share { background: rgba(81,207,102,0.15); color: var(--green); }
.dsc-pill.v-maybe { background: rgba(255,217,61,0.15); color: var(--amber); }
.dsc-pill.v-hold  { background: rgba(136,136,136,0.15); color: var(--fg2); }
.dsc-reason { color: var(--fg2); }
.dsc-blocking { color: var(--amber); }
.dsc-axes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.dsc-axis { font-size: 10.5px; color: var(--fg2); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; }
.dsc-axis b { color: var(--fg); font-weight: 600; }

/* Layer 1 and the fact set, collapsed. The audit trail belongs on the page and
 * not in a separate tool, but it is not what the page is for, so it is one
 * click away rather than always on screen. */
.dsc-why { margin-top: 9px; }
.dsc-why > summary { cursor: pointer; font-size: 11px; color: var(--fg2); list-style: none; }
.dsc-why > summary::-webkit-details-marker { display: none; }
.dsc-why > summary::before { content: '\25B8 '; }
.dsc-why[open] > summary::before { content: '\25BE '; }
.dsc-why > summary:hover { color: var(--fg); }
.dsc-what { font-size: 12px; color: var(--fg2); line-height: 1.5; margin: 8px 0 0; padding-left: 14px; }
.dsc-facts { margin: 8px 0 0; padding-left: 14px; font-family: var(--mono); font-size: 11px; }
.dsc-facts div { display: flex; gap: 8px; padding: 1px 0; }
.dsc-facts .k { color: var(--fg2); min-width: 140px; }
.dsc-facts .v { color: var(--fg); word-break: break-all; }

.dsc-empty { border: 1px dashed var(--border); border-radius: 4px; padding: 18px; color: var(--fg2);
             font-size: 13px; line-height: 1.55; max-width: 78ch; }
.dsc-empty b { color: var(--fg); font-weight: 600; }
.dsc-envelope { color: var(--fg2); font-size: 11px; font-family: var(--mono); margin-top: 20px;
                padding-top: 10px; border-top: 1px solid var(--border); }
.dsc-more { display: block; margin: 16px auto 0; padding: 7px 18px; background: var(--bg2);
            border: 1px solid var(--border); border-radius: 4px; color: var(--fg2); cursor: pointer;
            font-family: inherit; font-size: 12px; }
.dsc-more:hover { color: var(--fg); border-color: var(--fg2); }
.dsc-ruled > summary { cursor: pointer; color: var(--fg2); font-size: 12px; margin: 22px 0 12px; }
.section { margin-bottom: 32px; overflow-x: auto; }
.section-title { font-size: 14px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; word-break: break-all; }
td[rowspan] { vertical-align: top; }
tr:hover { background: var(--bg2); }
tr { white-space: nowrap; }
.truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: bold; }
.badge-realm { background: rgba(78,205,196,0.15); color: var(--accent); }
.badge-pkg { background: rgba(255,107,107,0.15); color: var(--accent2); }
/* Status. Green and red mean "did it succeed", and nothing else does — see the
   message-type palette below. */
.badge-ok { background: rgba(81,207,102,0.15); color: var(--green); }
.badge-fail { background: rgba(255,107,107,0.15); color: var(--red); }
/* Not a status: it says the figures beside it are a sum across chains. Amber
   because green and red are spoken for above, and because a blended total is
   neither a success nor a failure, it is a number that needs a caveat. */
.badge-blend { background: rgba(255,193,7,0.15); color: #ffc107; }
/* Message types, one hue each.
   Deliberately avoiding green and red: those are the status colours, and the
   type and status badges sit two columns apart on the same row. A successful
   BankMsgSend used to render in badge-fail red beside a green "ok", and MsgRun
   in badge-ok green whether it succeeded or not, so the colour that carried the
   most weight on the row was the one that meant nothing. */
.badge-call    { background: rgba(78,205,196,0.15);  color: #4ecdc4; }
.badge-deploy  { background: rgba(167,139,250,0.18); color: #a78bfa; }
.badge-enable  { background: rgba(100,181,246,0.18); color: #64b5f6; }
.badge-reject  { background: rgba(255,159,67,0.18);  color: #ff9f43; }
.badge-run     { background: rgba(255,217,61,0.15);  color: #ffd93d; }
.badge-send    { background: rgba(244,143,177,0.18); color: #f48fb1; }
/* Infrastructural traffic the reader is rarely looking for: present, legible,
   and not competing with the rows that carry meaning. */
.badge-session { background: rgba(136,136,136,0.15); color: var(--fg2); }
/* --- Proposal verification panel, timeline and parameter diff -------------
   A governance page is read by someone deciding how to vote, so the visual
   order has to be severity order: an alert is a red left rule you cannot
   scroll past, an info is quiet enough to skim. Three levels, no more --
   a fourth would mean nothing at a glance. */
.sig { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-left: 3px solid var(--border);
       background: var(--bg2); border-radius: 0 4px 4px 0; margin-bottom: 6px; }
.sig-alert { border-left-color: var(--red); background: rgba(255,107,107,0.07); }
.sig-warn  { border-left-color: var(--amber); background: rgba(255,217,61,0.06); }
.sig-info  { border-left-color: var(--accent); background: rgba(78,205,196,0.05); }
.sig-icon { font-size: 13px; line-height: 1.5; flex: 0 0 auto; }
.sig-alert .sig-icon { color: var(--red); }
.sig-warn .sig-icon { color: var(--amber); }
.sig-info .sig-icon { color: var(--accent); }
.sig-title { font-size: 13px; font-weight: 600; }
.sig-detail { font-size: 12px; color: var(--fg2); line-height: 1.55; margin-top: 2px; max-width: 90ch; }
.sig-detail code { background: var(--bg3); padding: 0 4px; border-radius: 3px; font-family: var(--mono); font-size: 11px; }
.sig-counts { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--fg2); margin-bottom: 10px; flex-wrap: wrap; }

/* The timeline is one row per transaction, never per rendered state: a step
   with no tx hash is a claim nobody can check, so it does not get drawn. */
.tl { position: relative; margin: 0 0 4px; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-step { position: relative; padding: 7px 0; }
.tl-dot { position: absolute; left: -19px; top: 12px; width: 9px; height: 9px; border-radius: 50%;
          background: var(--bg); border: 2px solid var(--fg2); }
.tl-created .tl-dot { border-color: var(--accent); }
.tl-vote .tl-dot { border-color: #a78bfa; }
.tl-executed .tl-dot { border-color: var(--green); background: var(--green); }
.tl-attempt .tl-dot { border-color: var(--red); }
.tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.tl-detail { font-size: 12px; color: var(--fg2); margin-top: 2px; font-family: var(--mono); }
.tl-fx { margin-top: 5px; font-size: 12px; background: var(--bg2); border: 1px solid var(--border);
         border-radius: 4px; padding: 6px 9px; display: inline-block; }
.tl-fx-type { color: var(--green); font-family: var(--mono); }
.tl-fx-attr { color: var(--fg2); font-family: var(--mono); }

/* Added and removed values in a parameter diff. Colour alone never carries
   it -- every row also gets a + or - glyph, for the same reason the vote bar
   has a tooltip. */
.pd-add { color: var(--green); }
.pd-del { color: var(--red); text-decoration: line-through; }
.pd-same { color: var(--fg2); }
.pd-row { font-family: var(--mono); font-size: 12px; padding: 1px 0; }
.dep-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--border);
            border-radius: 4px; padding: 3px 8px; font-size: 12px; margin: 0 6px 6px 0; font-family: var(--mono); }
.dep-chip a { font-size: 11px; }
/* The section strip: the same children the rail nests under a section, as
   pills at the top of every page in it. Deliberately not .tabs — several of
   these pages already carry a .tabs row of their own (packages has all/inert,
   accounts has activity/balances) and two identical underline rows stacked
   would read as one control with eight options. Real hrefs, so the middle
   button and "copy link address" work the way they do everywhere else. */
.pagenav { display: flex; gap: 5px; flex-wrap: wrap; align-items: center;
  margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pagenav a { padding: 3px 11px; border-radius: 999px; font-size: 12px; color: var(--fg2);
  border: 1px solid var(--border); background: var(--bg2); white-space: nowrap; }
.pagenav a:hover { color: var(--fg); border-color: var(--fg2); text-decoration: none; }
.page-lead { margin: 2px 0 10px; color: var(--fg2); font-size: 13px; }
html.embed .page-lead { display: none; }
.pagenav a.active { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
html.embed .pagenav { display: none; }

/* Big numbers. A summary page's job is to be read across the room and then
   left; the .stats-bar chips are for a page whose reader wants nine figures
   at once, and /gas had grown to exactly that. Four numbers at 28px say more
   than nine at 15px, and each one links to the page that breaks it down. */
.bignums { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 4px 0 22px; }
.bignum { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.bignum .bn-label { font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 0.8px; }
.bignum .bn-value { font-size: 26px; line-height: 1.15; color: var(--fg); font-variant-numeric: tabular-nums; }
.bignum .bn-sub { font-size: 11px; color: var(--fg2); }
.bignum.bn-link { cursor: pointer; }
.bignum.bn-link:hover { border-color: var(--accent); }
.bignum.bn-link:hover .bn-value { color: var(--accent); }
/* "and the rest of this list is on its own page", under a preview table. */
.more-link { font-size: 12px; margin: 6px 0 20px; }

/* Tabs carry an icon from the same sprite the rail uses. A nine-tab row of
   13px grey words all the same length reads as one grey band -- the shape in
   front of each label is what makes a tab findable at a glance, and what makes
   "which one am I on" answerable without comparing two shades of text. The
   icon is decorative: the label stays, so nothing here depends on recognising
   a glyph. */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; cursor: pointer; color: var(--fg2);
       font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab svg { width: 14px; height: 14px; flex: 0 0 14px; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.tab:hover { color: var(--fg); background: var(--bg2); }
.tab:hover svg { opacity: 1; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab.active svg { opacity: 1; }
/* The count beside a tab's name. Dimmed and a size down: it is the answer to
   "is there anything in here", not a heading, and at full weight seven numbers
   compete with the seven words they qualify. */
.tab-count { color: var(--fg2); font-size: 11px; opacity: 0.75; font-weight: 400; font-variant-numeric: tabular-nums; }
.tab.active .tab-count { opacity: 0.9; }
/* The one door into /lab from a page outside it. Pushed to the far end and
   never `active`: it navigates away rather than switching a panel. */
.tab-lab { margin-left: auto; color: var(--fg2); opacity: 0.7; }
.tab-lab:hover { opacity: 1; text-decoration: none; }
.tab-changes + .tab-lab { margin-left: 0; }
    /* The state tree. Monospace throughout: these are values a developer will
       compare, copy and paste, and a proportional font makes two addresses that
       differ in one character look identical. */
    /* Where a realm's bytes are, above the tree that spells them out. */
    .state-sizemap { margin: 10px 0 14px; }
    .state-sizebar { display: flex; height: 16px; border-radius: 3px; overflow: hidden; background: var(--bg2, rgba(127,127,127,.1)); }
    .state-seg { background: var(--accent, #2aa198); min-width: 2px; }
    .state-seg + .state-seg { border-left: 1px solid var(--bg, #002b36); }
    .state-seg-rest { background: var(--fg2, #657b83); }
    .state-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 11.5px; }
    .state-legend-item { display: inline-flex; gap: 5px; align-items: baseline; }
    .state-legend-name { color: var(--fg); font-family: var(--mono, monospace); }
    .state-legend-size { color: var(--fg2); }
    /* An absent or empty value is not a value: it should recede, not read as
       content the way "len 0" did. */
    .state-dim { color: var(--fg2); opacity: .7; }
    .state-func { color: var(--accent, #2aa198); text-decoration: none; }
    .state-func:hover { text-decoration: underline; }
    .state-meta { margin-left: auto; padding-left: 12px; flex: none; display: inline-flex; gap: 8px; }
    /* Code search results. One hit is a path, a file and the matched line;
       the line is the part people scan, so it gets the monospace and the
       highlight and everything else stays quiet. */
    /* A stdlib path is not a chain path: no namespace, no identicon, so it
       renders as plain monospace rather than through realmPathEl. */
    .code-hit-std { font-family: var(--mono, monospace); color: var(--fg); }

    .code-hits { display: flex; flex-direction: column; gap: 2px; }
    .code-hit { padding: 6px 8px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
    .code-hit:hover { background: var(--bg2, rgba(127,127,127,.07)); border-color: var(--border, rgba(127,127,127,.2)); }
    .code-hit-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
    .code-hit-file { color: var(--fg2); font-size: 11.5px; }
    .code-snippet {
      font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
      font-size: 12px; color: var(--fg2); margin-top: 3px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .code-snippet mark { background: transparent; color: var(--accent, #2aa198); font-weight: 600; }

    .state-tree { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12.5px; line-height: 1.7; }
    .state-head { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
    .state-head:hover { background: var(--bg2, rgba(127,127,127,.07)); }
    .state-twisty { display: inline-block; width: 11px; color: var(--fg2); flex: none; }
    .state-name { color: var(--fg); }
    .state-type { color: var(--fg2); font-size: 11.5px; }
    /* The value is the thing the reader came for, so it is the one part
       allowed to wrap and to take the remaining width. */
    .state-value { color: var(--blue, #268bd2); white-space: pre-wrap; word-break: break-word; min-width: 0; }
    .state-ref { color: var(--fg2); font-size: 11.5px; font-style: italic; }
    .state-expand-bar { margin: 8px 0 4px; display: flex; align-items: center; }
    .state-size { color: var(--fg2); font-size: 11px; }

.tab-content { display: none; }
.tab-content.active { display: block; }
pre { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; white-space: pre; }
/* Source colours. Variables rather than literals so a light theme, when the
   site grows one, is a single block that redefines them. */
:root {
  --syn-kw: #c678dd; --syn-str: #98c379; --syn-cmt: #5c6370; --syn-fn: #61afef;
  --syn-type: #e5c07b; --syn-num: #d19a66; --syn-op: #abb2bf; --syn-builtin: #56b6c2;
  --syn-pkg: #e06c75; --syn-decl: #61afef;
}
.syn-kw { color: var(--syn-kw); }
.syn-str { color: var(--syn-str); }
.syn-cmt { color: var(--syn-cmt); font-style: italic; }
.syn-fn { color: var(--syn-fn); }
.syn-type { color: var(--syn-type); }
.syn-num { color: var(--syn-num); }
.syn-op { color: var(--syn-op); }
.syn-builtin { color: var(--syn-builtin); }
.syn-pkg { color: var(--syn-pkg); }
.syn-decl { color: var(--syn-decl); font-weight: bold; }
.syn-ref { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--fg2); }
.syn-ref:hover { color: var(--accent); }
.syn-imp { color: var(--syn-str); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; }
.syn-imp:hover { color: var(--accent); }
.syn-flash { background: rgba(78,205,196,0.15); }
#dep-graph { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; min-height: 600px; position: relative; overflow: hidden; margin-bottom: 24px; }
#contract-map { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; position: relative; overflow: hidden; }
#contract-map svg { display: block; }
#dep-graph svg { display: block; }

/* /code: the code explorer. Scoped under cx- so nothing here reaches another
   page. Wider than the 1200px every other page uses: a tree and a file side
   by side need the room, and the map is better for every pixel it gets. */
.container:has(> #view-code.active) { max-width: 1760px; }
#view-code main { padding: 12px 0 0; }
.cx-top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-title { display: inline-flex; align-items: center; gap: 7px; font-size: 19px; font-weight: bold; color: var(--fg); }
.cx-title:hover { text-decoration: none; color: var(--accent); }
.cx-title svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-nets { display: flex; gap: 4px; flex-wrap: wrap; }
.cx-net { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg2); color: var(--fg2); font: 12px var(--mono); cursor: pointer; }
.cx-net i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cx-net:hover { color: var(--fg); border-color: var(--fg2); }
.cx-net[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: var(--bg3); font-weight: bold; }
.cx-stats { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg2); }
.cx-stats b { color: var(--fg); font-size: 14px; }
.cx-jump { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; padding: 5px 8px 5px 12px; min-width: 200px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--fg2); font: 12px var(--mono); cursor: pointer; }
.cx-jump span { flex: 1; text-align: left; }
.cx-jump:hover { border-color: var(--accent); color: var(--fg); }
.cx-jump kbd, .cx-pal-foot kbd { font: 11px var(--mono); padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg3); }
/* The code map's link to its timeline, and the timeline's back to the map. */
.cx-tab { font-size: 13px; color: var(--fg2); padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }
.cx-tab:hover { color: var(--fg); border-color: var(--accent); text-decoration: none; }
.cx-tab[aria-current="page"] { color: var(--fg); border-color: var(--accent); background: var(--bg3); font-weight: bold; }

/* /code/timeline: every publication on one chain, newest first. tl- scoped. */
.tl-heat { margin: 4px 0 14px; padding: 12px 14px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); overflow-x: auto; }
.tl-heat-head { display: flex; gap: 6px 16px; align-items: baseline; flex-wrap: wrap; font-size: 12px; color: var(--fg2); margin-bottom: 8px; }
.tl-heat-head b { color: var(--fg); font-size: 14px; }
.tl-cal { display: grid; grid-template-columns: 28px repeat(53, 11px); grid-template-rows: 14px repeat(7, 11px); gap: 3px; width: max-content; }
.tl-cal-m, .tl-cal-w { font-size: 10px; color: var(--fg2); line-height: 11px; white-space: nowrap; }
.tl-cell { width: 11px; height: 11px; border-radius: 2px; background: var(--bg3); border: 0; padding: 0; cursor: pointer; }
.tl-cell[data-l="1"] { background: #164d4a; } .tl-cell[data-l="2"] { background: #23736e; }
.tl-cell[data-l="3"] { background: #34a099; } .tl-cell[data-l="4"] { background: var(--accent); }
.tl-cell:hover, .tl-cell:focus-visible { outline: 1px solid var(--fg); outline-offset: 0; }
.tl-cell[aria-pressed="true"] { outline: 2px solid var(--amber); outline-offset: 0; }
.tl-cell.tl-out { visibility: hidden; }
.tl-legend { display: flex; align-items: center; gap: 3px; margin-left: auto; font-size: 11px; color: var(--fg2); }
.tl-legend .tl-cell { cursor: default; }
.tl-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tl-chip { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg2); color: var(--fg2); font: 12px var(--mono); cursor: pointer; }
.tl-chip:hover { color: var(--fg); border-color: var(--fg2); }
.tl-chip[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: var(--bg3); }
.tl-in { padding: 4px 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; color: var(--fg); font: 12px var(--mono); width: 170px; }
.tl-in:focus { outline: none; border-color: var(--accent); }
.tl-count { margin-left: auto; font-size: 12px; color: var(--fg2); }
.tl-day { margin: 18px 0 8px; font-size: 13px; font-weight: bold; color: var(--fg2); text-transform: lowercase; }
.tl-day:first-child { margin-top: 0; }
.tl-card { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 12px; padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); }
.tl-card:hover { border-color: #3a3a3a; }
/* A realm card's picture: a fixed 128x72 box in its own column, so a card is
   one height whether its image is in flight, drawn, or replaced by a tile. */
.tl-card.tl-has-shot { grid-template-columns: 32px minmax(0, 1fr) 128px; }
.tl-shot { align-self: start; flex: 0 0 auto; }
.tl-pathbox, .tl-whobox { display: inline-flex; align-items: baseline; gap: 2px; min-width: 0; }
.tl-pathbox .copy-btn, .tl-whobox .copy-btn { opacity: 0; font-size: 11px; }
.tl-card:hover .copy-btn, .tl-card .copy-btn:focus-visible { opacity: 1; }
@media (max-width: 720px) { .tl-card.tl-has-shot { grid-template-columns: 32px minmax(0, 1fr); } }
.tl-av .identicon svg { border-radius: 4px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; min-width: 0; }
.tl-head .tl-path { font-family: var(--mono); font-weight: bold; overflow-wrap: anywhere; }
.tl-who { font-weight: bold; color: var(--fg); }
.tl-verb { color: var(--fg2); }
.tl-kind { font-size: 11px; padding: 0 7px; border-radius: 999px; border: 1px solid currentColor; line-height: 17px; }
.tl-kind-new { color: var(--green); } .tl-kind-version { color: var(--accent); }
.tl-kind-redeploy { color: var(--fg2); } .tl-kind-failed { color: var(--red); }
.tl-debut { color: var(--amber); }
.tl-sum { margin-top: 4px; color: var(--fg); font-size: 13px; overflow-wrap: anywhere; }
.tl-meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--fg2); }
.tl-more { display: block; margin: 12px auto; }
.tl-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 12px; }
.tl-card .tag-chips { margin-top: 5px; }
.tl-tags-k { font-size: 12px; color: var(--fg2); }

/* Code-derived tags (pkg/tags), one component everywhere: a chip in the tag's
   own colour, set from JS as --tag so no tag name is ever part of a selector. */
.tag-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; vertical-align: middle; }
.tag-chip { --tag: #888; display: inline-flex; align-items: center; gap: 4px; font: 11px var(--mono); line-height: 16px;
  padding: 0 7px; border-radius: 999px; color: var(--tag); border: 1px solid color-mix(in srgb, var(--tag) 55%, transparent);
  background: color-mix(in srgb, var(--tag) 10%, transparent); white-space: nowrap; cursor: help; text-decoration: none; }
a.tag-chip, button.tag-chip { cursor: pointer; }
a.tag-chip:hover, button.tag-chip:hover { background: color-mix(in srgb, var(--tag) 22%, transparent); text-decoration: none; }
button.tag-chip { font: 11px var(--mono); }
button.tag-chip[aria-pressed="true"] { color: var(--bg); background: var(--tag); }
.tag-chip .tag-n { color: var(--fg2); }
button.tag-chip[aria-pressed="true"] .tag-n { color: var(--bg); }
td .tag-chips { display: flex; margin-top: 3px; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tl-end { text-align: center; color: var(--fg2); font-size: 12px; margin: 14px 0; }
.cx-drawer-btn { display: none; padding: 5px 10px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--fg); font: 12px var(--mono); cursor: pointer; }

.cx-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  height: calc(100vh - var(--cx-top, 150px) - 14px); min-height: 460px; background: var(--bg2); }
.cx-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg); }
.cx-filter { margin: 8px; padding: 6px 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; color: var(--fg); font: 12px var(--mono); }
.cx-filter:focus { outline: none; border-color: var(--accent); }
.cx-tree { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; outline: none; }
.cx-tree:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.cx-tree-inner { position: relative; min-width: 100%; }
.cx-tree-foot { padding: 5px 10px; border-top: 1px solid var(--border); color: var(--fg2); font-size: 11px; }
.cx-row { position: absolute; left: 0; right: 0; height: 24px; display: flex; align-items: center; gap: 6px; padding-right: 8px;
  font-size: 12.5px; white-space: nowrap; color: var(--fg); cursor: pointer; user-select: none; }
.cx-row:hover { background: var(--bg3); }
.cx-row.sel { background: rgba(78, 205, 196, 0.15); }
.cx-row.act { box-shadow: inset 2px 0 0 var(--accent); }
.cx-tree:not(:focus) .cx-row.act:not(.sel) { box-shadow: none; }
.cx-row.cx-ns { font-weight: bold; }
.cx-tw { flex: 0 0 12px; width: 12px; color: var(--fg2); text-align: center; font-size: 11px; }
.cx-lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cx-n { flex: 0 0 auto; color: var(--fg2); font-size: 11px; font-weight: normal; }
.cx-test { color: var(--fg2); }
.cx-k { flex: 0 0 auto; font-size: 9.5px; line-height: 14px; padding: 0 4px; border-radius: 3px; border: 1px solid; font-weight: normal; }
.cx-k.r { color: #4ecdc4; border-color: rgba(78, 205, 196, 0.4); }
.cx-k.p { color: #b48ead; border-color: rgba(180, 142, 173, 0.45); }
.cx-k.f { color: var(--fg2); border-color: var(--border); }

.cx-main { position: relative; min-width: 0; min-height: 0; overflow: auto; }
.cx-empty { padding: 20px; color: var(--fg2); }
.cx-dim { color: var(--fg2); }
.cx-sep { color: var(--fg2); margin: 0 5px; }
.cx-pkg { padding: 12px 16px 24px; }
.cx-crumbs { font-size: 13px; margin-bottom: 8px; word-break: break-all; }
.cx-here { font-weight: bold; }
.cx-pkg-head { margin-bottom: 10px; }
.cx-pkg-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-pkg-path { font-size: 17px; word-break: break-all; }
.cx-out { margin-left: auto; display: flex; gap: 14px; font-size: 12px; }
.cx-facts { display: flex; gap: 4px 16px; flex-wrap: wrap; color: var(--fg2); font-size: 12px; margin-top: 6px; }
.cx-rail { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
.cx-rail-k { color: var(--fg2); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-right: 6px; }
.cx-gens, .cx-deploys { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cx-gen { display: inline-flex; flex-direction: column; align-items: center; padding: 2px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); color: var(--fg); line-height: 1.3; }
.cx-gen:hover { border-color: var(--accent); text-decoration: none; }
.cx-gen.on { border-color: var(--accent); background: rgba(78, 205, 196, 0.15); font-weight: bold; }
.cx-gen-h { color: var(--fg2); font-size: 10px; font-weight: normal; }
.cx-gen-line { width: 14px; height: 1px; background: var(--border); }
.cx-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.cx-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cx-dot.ok { background: var(--green); opacity: 0.55; }
.cx-dot.fail { background: var(--red); opacity: 0.7; }
.cx-dot.cur { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.cx-dot:hover { opacity: 1; text-decoration: none; }
.cx-compare { font-size: 12px; }
/* The diff view: what changed between two publications. */
.cx-diff-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cx-diff-sides { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg2); }
.cx-diff-side { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); color: var(--fg); }
.cx-diff-totals { font-size: 12.5px; color: var(--fg2); }
.cx-diff-api { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; background: var(--bg); font-size: 12.5px; }
.cx-diff-api h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg2); margin: 0 0 6px; }
.cx-diff-api-none { color: var(--fg2); }
.cx-diff-sig { font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; margin: 2px 0; padding: 2px 6px; border-radius: 4px; }
.cx-diff-sig.add, .cx-diff-row.add { background: rgba(80, 200, 120, 0.13); }
.cx-diff-sig.del, .cx-diff-row.del { background: rgba(255, 99, 99, 0.13); }
.cx-diff-file { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; overflow: hidden; background: var(--bg); }
.cx-diff-fhead { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 12.5px; cursor: pointer; user-select: none; }
.cx-diff-fhead .cx-blob-name { flex: 1 1 auto; min-width: 0; word-break: break-all; }
.cx-diff-file.closed .cx-diff-body { display: none; }
.cx-diff-file.closed .cx-diff-fhead { border-bottom: none; }
.cx-diff-n.add { color: var(--green); }
.cx-diff-n.del { color: var(--red); }
.cx-diff-body { overflow-x: auto; }
.cx-diff-row { display: flex; font: 12.5px/1.5 var(--mono); white-space: pre; min-width: max-content; }
.cx-diff-ln { flex: 0 0 4.5em; padding: 0 8px; text-align: right; color: var(--fg2); opacity: 0.7; user-select: none; }
.cx-diff-sign { flex: 0 0 1.4em; text-align: center; user-select: none; color: var(--fg2); }
.cx-diff-row.add .cx-diff-sign { color: var(--green); }
.cx-diff-row.del .cx-diff-sign { color: var(--red); }
.cx-diff-text { padding-right: 16px; }
.cx-diff-gap { padding: 2px 12px; font: 12px/1.6 var(--mono); color: var(--fg2); background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cx-diff-more { padding: 8px 12px; font-size: 12.5px; }
/* One row that scrolls sideways: r/gnoland/boards2/v0 ships 252 files, and a
   strip that wraps would push the code a screen down. The tree lists them all. */
.cx-files { position: relative; display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.cx-file-tab { flex: 0 0 auto; white-space: nowrap; }
.cx-file-tab { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; font-size: 12px; color: var(--fg2); border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0; }
.cx-file-tab:hover { color: var(--fg); text-decoration: none; background: var(--bg3); }
.cx-file-tab.on { color: var(--fg); background: var(--bg); border-color: var(--border); font-weight: bold; margin-bottom: -1px; }
.cx-viewer { background: var(--bg); border: 1px solid var(--border); border-top: none; border-radius: 0 0 6px 6px; }
.cx-blob-head { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
.cx-blob-name { font-weight: bold; }
.cx-blob-skel { padding: 16px; }
.cx-blob { display: flex; }
.cx-gutter { display: flex; flex-direction: column; padding: 12px 0; background: var(--bg2); border-right: 1px solid var(--border); user-select: none; flex: 0 0 auto; }
.cx-ln { padding: 0 10px; text-align: right; color: var(--fg2); font: 13px/1.5 var(--mono); opacity: 0.7; }
.cx-ln:hover { color: var(--accent); text-decoration: none; opacity: 1; }
.cx-ln.cx-line-on { color: var(--bg); background: var(--amber); font-weight: bold; opacity: 1; }
.cx-code { margin: 0; padding: 12px 16px; border: none; border-radius: 0; background: var(--bg); flex: 1 1 auto; min-width: 0; outline: none; }
.cx-code span.cx-line-on { display: inline-block; width: 100%; background: rgba(255, 217, 61, 0.14); }
.cx-dir { display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.cx-dir-row { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--border); color: var(--fg); font-size: 13px; }
.cx-dir-row:last-child { border-bottom: none; }
.cx-dir-row:hover { background: var(--bg3); text-decoration: none; }

.cx-map { position: absolute; inset: 0; display: flex; flex-direction: column; }
.cx-map-bar { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.cx-map-crumbs { flex: 1 1 auto; min-width: 0; }
.cx-map-open { margin-left: 12px; }
.cx-map-toggles { display: flex; gap: 12px; flex-wrap: wrap; }
.cx-seg { display: inline-flex; align-items: center; gap: 2px; }
.cx-seg-k { color: var(--fg2); font-size: 11px; margin-right: 4px; }
.cx-seg-b { padding: 2px 8px; background: var(--bg); border: 1px solid var(--border); color: var(--fg2); font: 11px var(--mono); cursor: pointer; }
.cx-seg-b:first-of-type { border-radius: 4px 0 0 4px; }
.cx-seg-b:last-child { border-radius: 0 4px 4px 0; }
.cx-seg-b[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: bold; }
.cx-map-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cx-map-canvas { display: block; }
.cx-map-tip { position: absolute; z-index: 5; max-width: 420px; padding: 7px 10px; background: rgba(20, 20, 20, 0.96); border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); word-break: break-all; }
.cx-tip-path { font-weight: bold; }
.cx-map-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 5px 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--fg2); }
.cx-lg-item { display: inline-flex; align-items: center; gap: 6px; }
.cx-lg-bar { display: inline-block; width: 120px; height: 8px; border-radius: 4px; }
.cx-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.cx-pal-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, 0.55); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cx-pal { width: min(720px, 94vw); background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); overflow: hidden; }
.cx-pal-input { width: 100%; padding: 12px 14px; background: var(--bg); border: none; border-bottom: 1px solid var(--border); color: var(--fg); font: 15px var(--mono); outline: none; }
.cx-pal-list { max-height: min(56vh, 520px); overflow: auto; }
.cx-pal-opt { display: flex; align-items: center; gap: 8px; padding: 5px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cx-pal-opt.act { background: rgba(78, 205, 196, 0.15); box-shadow: inset 2px 0 0 var(--accent); }
.cx-pal-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cx-pal-text mark { background: transparent; color: var(--amber); font-weight: bold; }
.cx-pal-foot { padding: 6px 14px; border-top: 1px solid var(--border); color: var(--fg2); font-size: 11px; }
.cx-scrim { display: none; }

/* A phone: the tree becomes a drawer over the page, and the file takes the
   width. The panes stop scrolling on their own; the page scrolls. */
@media (max-width: 760px) {
  .cx-drawer-btn { display: inline-block; }
  .cx-jump { min-width: 0; margin-left: 0; }
  .cx-stats { width: 100%; }
  .cx-body { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; overflow: visible; border: none; background: none; }
  .cx-main { overflow: visible; }
  .cx-side { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); z-index: 300; transform: translateX(-102%);
    transition: transform 0.18s ease-out; border-right: 1px solid var(--border); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5); }
  .cx-side.open { transform: none; }
  .cx-drawer-open .cx-scrim { display: block; position: fixed; inset: 0; z-index: 299; background: rgba(0, 0, 0, 0.5); }
  .cx-map { position: relative; height: 70vh; }
  .cx-pkg { padding: 8px 0 16px; }
  .cx-out { margin-left: 0; width: 100%; }
  .cx-code { padding: 10px; }
}

/* gnohub (experimental, /lab). Scoped under gh- so nothing here can reach a
   page outside it, which is the point of an experiment: reverting it is one
   block, not a hunt through the shared rules above. */
.gh-lab-intro h2, .gh-hero h2 { font-size: 22px; margin-bottom: 6px; }
.gh-lab-intro p, .gh-hero p { color: var(--fg2); max-width: 70ch; margin-bottom: 20px; }
.gh-lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.gh-lab-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 16px; }
.gh-lab-card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: bold; margin-bottom: 8px; }
.gh-lab-card p { color: var(--fg2); font-size: 13px; margin-bottom: 12px; }
.gh-lab-card-foot { font-size: 13px; }

/* /lab/github. Same gh- scope: it is a lab surface, so reverting it is one
   block. Everything below is either a pill row, a chip or a table cell, and
   the tables themselves use the site's shared rules deliberately: this page
   is read the same way /realms is, and a second table idiom would be a second
   thing to keep in step. */
.gh-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 16px; }
.gh-pill { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg2);
  color: var(--fg2); font-size: 12px; cursor: pointer; }
.gh-pill:hover { color: var(--fg); border-color: var(--fg2); }
.gh-pill.on { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: bold; }
.gh-pills-label { color: var(--fg2); font-size: 12px; margin-right: 2px; }
/* The evidence cell. A discovered row makes a claim and has to carry why, and
   the why is a whole sentence: it wraps rather than being cut to one line. */
.gh-why { color: var(--fg2); font-size: 12px; max-width: 46ch; }
.gh-why code { font-size: 11px; }
.gh-note { color: var(--fg2); font-size: 12px; margin: 6px 0 10px; max-width: 80ch; }
.gh-warn { color: var(--amber); }
.gh-off { background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--amber);
  border-radius: 6px; padding: 14px 16px; color: var(--fg2); font-size: 13px; max-width: 80ch; }
.gh-off code { color: var(--fg); }
.gh-q { font-family: var(--mono, monospace); font-size: 11px; color: var(--fg2); word-break: break-all; }

.gh-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; margin-bottom: 14px; }
.gh-crumb-sep { color: var(--fg2); }
.gh-crumb-here { font-weight: bold; }
.gh-dim { color: var(--fg2); }

.gh-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .gh-two-col { grid-template-columns: minmax(0, 1fr); } }

.gh-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
.gh-panel-head { padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg3);
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg2); }
.gh-panel-body { padding: 4px 0; }
.gh-empty { padding: 16px 14px; color: var(--fg2); font-size: 13px; }

.gh-owner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; padding: 8px; }
.gh-owner-tile { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 4px; color: var(--fg); }
.gh-owner-tile:hover { background: var(--bg3); text-decoration: none; }
.gh-owner-name { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-owner-count { color: var(--fg2); font-size: 11px; margin-left: auto; white-space: nowrap; }
.gh-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  flex: 0 0 24px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--accent); font-size: 11px; font-weight: bold; text-transform: uppercase; }
.gh-avatar-lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 20px; }

.gh-owner-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.gh-owner-title { font-size: 22px; }
.gh-owner-sub { font-size: 13px; }

.gh-repo-list { display: flex; flex-direction: column; }
.gh-repo-row { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.gh-repo-row:last-child { border-bottom: none; }
.gh-repo-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gh-repo-name { font-weight: bold; }
.gh-repo-row-facts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--fg2); font-size: 12px; margin-top: 3px; }

.gh-repo-head { border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.gh-repo-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 19px; }
.gh-repo-title-path { font-weight: bold; word-break: break-all; }
.gh-repo-facts { display: flex; gap: 20px; flex-wrap: wrap; margin: 10px 0 12px; }
.gh-meta { display: flex; flex-direction: column; }
.gh-meta-k { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg2); }
.gh-meta-v { font-size: 13px; }
.gh-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.gh-tab { padding: 6px 12px; color: var(--fg2); border-bottom: 2px solid transparent; font-size: 13px; }
.gh-tab:hover { color: var(--fg); text-decoration: none; }
.gh-tab.active { color: var(--fg); border-bottom-color: var(--accent2); font-weight: bold; }
.gh-tab-out { margin-left: auto; color: var(--accent); }

.gh-readme { padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.7; }
.gh-file-list { display: flex; flex-direction: column; }
.gh-file-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); }
.gh-file-row:last-child { border-bottom: none; }
.gh-file-row:hover { background: var(--bg3); }
.gh-file-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gh-file-name svg { width: 14px; height: 14px; flex: 0 0 14px; stroke: currentColor; fill: none;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; color: var(--fg2); }
.gh-file-size { margin-left: auto; color: var(--fg2); font-size: 11px; white-space: nowrap; }
.gh-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.gh-chip { padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; background: var(--bg3); }

.gh-blob-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gh-blob-name { font-weight: bold; }
/* The gutter is its own column rather than a ::before on each line, so the
   line numbers cannot be selected along with the code a reader is copying. */
.gh-blob { display: flex; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.gh-gutter { display: flex; flex-direction: column; padding: 16px 0; background: var(--bg3);
  border-right: 1px solid var(--border); user-select: none; flex: 0 0 auto; }
.gh-ln { padding: 0 10px; text-align: right; color: var(--fg2); font-size: 13px; line-height: 1.5; font-family: var(--mono); }
.gh-ln:hover { color: var(--accent); text-decoration: none; }
.gh-ln.gh-line-on { color: var(--bg); background: var(--amber); font-weight: bold; }
.gh-code { margin: 0; border: none; border-radius: 0; flex: 1 1 auto; min-width: 0; }
.gh-code span.gh-line-on { display: inline-block; width: 100%; background: rgba(255, 217, 61, 0.14); }

.gh-commits { font-size: 13px; }
.gh-commits th { text-align: left; padding: 6px 14px; }
.gh-commits td { padding: 6px 14px; }
.gh-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.gh-dot.ok { background: var(--green); }
.gh-dot.fail { background: var(--red); }
.gh-tag { margin-left: 8px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 10px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; }
.gh-note { color: var(--fg2); font-size: 12px; line-height: 1.7; max-width: 80ch; margin-bottom: 16px; }

.gh-dep-list { display: flex; flex-direction: column; }
.gh-dep-row { padding: 6px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.gh-dep-row:last-child { border-bottom: none; }
.view { display: none; }
.view.active { display: block; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 12px; margin-bottom: 8px; }
.card table td { padding: 4px 0; border-bottom: none; }
.card table tr:first-child td { padding-top: 0; }
/* Clamp long values */
.clamp-wrap { position: relative; }
.clamp-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--mono); font-size: 12px; word-break: break-word; white-space: pre-wrap; }
.clamp-text.open { display: block; -webkit-line-clamp: unset; }
.clamp-toggle { color: var(--accent); cursor: pointer; font-size: 11px; user-select: none; }
/* Table filter */
.table-filter { background: var(--bg2); border: 1px solid var(--border); color: var(--fg); padding: 4px 10px; border-radius: 4px; font-family: var(--mono); font-size: 12px; width: 200px; outline: none; margin-bottom: 8px; }
.table-filter:focus { border-color: var(--accent); }
/* Sortable headers */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
/* CSS string escapes are bare hex; \u2195 is JS syntax and renders as "u2195". */
th.sortable::after { content: ' \2195'; font-size: 10px; opacity: 0.4; }
th.sort-asc::after { content: ' \2191'; opacity: 1; }
th.sort-desc::after { content: ' \2193'; opacity: 1; }
/* Total row */
tr.total-row { border-top: 2px solid var(--border); }
tr.total-row td { font-weight: bold; color: var(--accent); }
.block-ctx { color: var(--fg2); font-size: 12px; }
/* A transaction's messages, listed inside that transaction's own detail cell.
   One <tr> per transaction and never a rowspan: makeSortable reorders rows by
   children[colIdx], so a rowspan stops lining up on the first header click and
   the filter would hide half of a group. Overflow lines stay in the DOM and are
   hidden by class, so the filter box and the CSV export still see every message
   in the row whether or not the reader expanded it. */
.msg-list { display: flex; flex-direction: column; gap: 3px; }
.msg-line { display: flex; align-items: baseline; gap: 6px; }
.msg-n { color: var(--fg2); font-size: 11px; font-family: var(--mono); min-width: 1.6em; text-align: right; flex: none; }
.msg-list .msg-more { display: none; }
.msg-list.open .msg-more { display: flex; }
/* A type cell's badges. Only the gap between pairs may break: a badge and its
   ×N count are one word, and splitting them left the count stranded under an
   unrelated badge in a narrow column. */
.type-cell { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.type-pair { display: inline-flex; gap: 3px; align-items: baseline; white-space: nowrap; }
/* A call's arguments, dimmer than the function they belong to: the function is
   what the row is about and the args are how you tell it from the next one. */
.msg-args { color: var(--fg2); font-size: 12px; word-break: break-word; }
/* An address or realm path inside an argument list reads as an argument, not as
   the row's subject: same links, one step quieter than the function they are
   being passed to. */
.msg-args a { color: var(--fg2); }
.msg-args a:hover { color: var(--accent); }
/* No identicons in an argument list. They are a recognition aid worth 14px in a
   column of addresses; in a cell that can hold five of them beside numbers and
   flags they are the thing you see instead of the arguments. The address text
   and its tooltip are unchanged. */
.msg-args .identicon { display: none; }
/* Coins a message carried. A value, not context, so it does not read as the
   same weight as the block number beside it. */
.msg-send { color: var(--accent); font-size: 12px; white-space: nowrap; }
.section-sub { color: var(--fg2); font-size: 12px; margin: -4px 0 10px; max-width: 70ch; }
/* Achievements: the badge grid, the filter chips, and the strip of emoji that
   stands in for the grid inside a table row. Cards rather than a table because
   the `how` line is the payload and a table column would truncate it. */
/* The address overview's three ranked tables, side by side. They are short and
   they answer three variants of one question, so stacked they were three
   scrolls to compare. Collapses to one column under ~1000px on its own. */
.addr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 22px; margin-top: 16px; align-items: start; }
.addr-cols table { margin-top: 0; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-bottom: 18px; }
.ach { display: flex; gap: 10px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px;
       padding: 10px 11px; align-items: flex-start; }
.ach-emoji { font-size: 22px; line-height: 1.1; flex: 0 0 auto; filter: none; }
.ach-body { min-width: 0; }
.ach-name { font-weight: bold; font-size: 13px; }
.ach-what { color: var(--fg2); font-size: 11.5px; margin-top: 2px; }
.ach-how { color: var(--fg2); font-size: 11.5px; margin-top: 6px; border-left: 2px solid var(--border); padding-left: 8px; }
.ach-how code { font-size: 11px; word-break: break-all; }
.ach-meta { font-size: 11px; color: var(--fg2); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* Locked is dimmed, not hidden: the locked half is the half that teaches, and a
   grid of only what somebody already did is a trophy case. */
.ach-locked { opacity: 0.55; }
.ach-locked .ach-emoji { filter: grayscale(1); }
.ach-got { color: var(--green); font-weight: bold; }
.ach-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.ach-chip { cursor: pointer; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; color: var(--fg2);
            border: 1px solid var(--border); background: transparent; white-space: nowrap; }
.ach-chip:hover { color: var(--fg); border-color: var(--fg2); }
.ach-chip.on { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.badge-strip { font-size: 13px; letter-spacing: 1px; word-break: keep-all; }
.badge-strip span { cursor: default; }
.ach-ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 14px 0 22px; }
.ach-way { display: block; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px;
           padding: 11px 12px; text-decoration: none; }
.ach-way:hover { border-color: var(--accent); text-decoration: none; }
.ach-way b { display: block; color: var(--accent); font-size: 13px; }
.ach-way span { display: block; color: var(--fg2); font-size: 11.5px; margin-top: 3px; }
.table-filter-note { color: var(--fg2); font-size: 11px; margin: 4px 0 8px; }
.table-filter-note a { color: var(--accent); }
.addr-inferred { color: var(--fg2); font-size: 10px; vertical-align: super; cursor: help; margin-left: 1px; }
.addr-watched { color: var(--accent); font-size: 10px; vertical-align: super; cursor: help; margin-left: 1px; }
.addr-validator { font-size: 11px; margin-left: 3px; cursor: pointer; text-decoration: none; }
.watch-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--fg2); border-radius: 4px;
  padding: 3px 9px; font-family: inherit; font-size: 12px; cursor: pointer; }
.watch-btn:hover { border-color: var(--accent); color: var(--accent); }
.watch-btn.on { color: var(--accent); border-color: var(--accent); }
.watch-new { color: var(--accent); font-weight: bold; }
.shortcut-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex;
  align-items: center; justify-content: center; z-index: 1000; }
.shortcut-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  padding: 20px 24px; min-width: 340px; max-width: 90vw; }
.shortcut-row { display: flex; gap: 16px; align-items: baseline; margin: 6px 0; font-size: 13px; }
.shortcut-row kbd { font-family: var(--mono); background: var(--bg3); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 6px; font-size: 11px; white-space: nowrap; }
.shortcut-row span { color: var(--fg2); }
/* Load failures: shown where a skeleton would otherwise shimmer forever. */
.load-error { padding: 16px 4px; text-align: left; }
.load-error-head { color: var(--red); font-weight: bold; margin-bottom: 4px; }
.load-error-msg { color: var(--fg2); font-size: 12px; font-family: var(--mono); margin-bottom: 10px; word-break: break-word; }
.load-error-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.load-error-btn { background: var(--bg3); color: var(--fg); border: 1px solid var(--bg3);
  border-radius: 4px; padding: 4px 10px; font-size: 12px; font-family: inherit; cursor: pointer; }
.load-error-btn:hover { border-color: var(--fg2); }
/* Skeleton loading */
/* The docs tab's symbol outline.
   A package can declare a lot: r/gnoswap/staker has 444 symbols across 25
   types on mainnet, which is an unnavigable wall without one. Sticky, because
   the whole point is to still be there after scrolling past the third type. */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-outline { position: sticky; top: 12px; max-height: calc(100vh - 32px); overflow-y: auto;
                border-right: 1px solid var(--border); padding-right: 12px; }
.docs-outline .outline-group { color: var(--fg2); font-size: 11px; text-transform: uppercase;
                               letter-spacing: .06em; margin: 12px 0 4px; }
.docs-outline .outline-group:first-child { margin-top: 0; }
.docs-outline a { display: block; font-family: var(--mono); font-size: 12px; padding: 1px 0;
                  color: var(--fg); text-decoration: none; overflow: hidden;
                  text-overflow: ellipsis; white-space: nowrap; }
.docs-outline a:hover { color: var(--accent); }
.docs-outline a.outline-method { padding-left: 12px; color: var(--fg2); }
.docs-outline a.outline-unexported { opacity: .65; }
.docs-outline .outline-count { color: var(--fg2); }
/* One column below the breakpoint: a 220px rail beside a code block is worse
   than no rail at all on a phone. */
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-outline { display: none; }
}
.skeleton { background: var(--bg3); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; }
/* Realm screenshots.
   Every box states its own width, height and aspect-ratio. Without them lazy
   loading is worse than useless: the row has no height until the image
   arrives, so a listing jumps under the reader's cursor as fifty of them
   resolve. The skeleton background is what fills the box until then, and it is
   the same pulse every other pending thing on the site uses. */
/* Facet controls. Rows of chips rather than dropdowns: the counts are the
   point, and a dropdown hides them until it is opened. */
.facets { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.facet-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.facet-label { color: var(--fg2); font-size: 11px; text-transform: uppercase;
               letter-spacing: .06em; min-width: 72px; }
.facet { border: 1px solid var(--border); border-radius: 12px; padding: 2px 10px;
         font-size: 12px; cursor: pointer; background: none; color: var(--fg);
         font-family: inherit; }
.facet:hover { border-color: var(--accent); }
.facet.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.facet .facet-count { color: var(--fg2); margin-left: 6px; font-size: 11px; }
.facet .facet-name { white-space: nowrap; }
.facet.active .facet-count { color: var(--bg); opacity: .75; }
.facet-more { background: none; border: none; color: var(--fg2); font-size: 12px;
              cursor: pointer; font-family: inherit; text-decoration: underline; }
.shot { display: block; position: relative; overflow: hidden; border-radius: 6px;
        background: var(--bg3); border: 1px solid var(--border); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left;
            background: var(--bg3); }
.shot.loading { animation: pulse 1.5s ease-in-out infinite; }
.shot-thumb { width: 128px; height: 72px; aspect-ratio: 16 / 9; }
.shot-hero { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 0 0 16px; }
/* The hero is the overview's. Every other tab is something the reader
   navigated to deliberately, and pushing it 405 pixels down the page to show a
   picture of the same realm is the wrong trade. Verified by e2e: the dependency
   graph landed below the fold with the hero always on, and hovering a node
   stopped working. */
html[data-realm-tab]:not([data-realm-tab="info"]) #realm-header .shot-hero { display: none; }
/* The generated tile, for a path there is no picture of and never will be.
   Never a blank box: a reader who does not know what a realm is reads blank as
   "the site is broken" rather than "this one has no page". */
.shot-tile { display: flex; flex-direction: column; justify-content: center; gap: 2px;
             padding: 6px 8px; box-sizing: border-box; }
.shot-tile .tile-path { font-family: var(--mono, monospace); font-size: 11px; color: var(--fg);
                        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.shot-tile .tile-label { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-dim); }
.shot-tile .tile-plain { font-size: 10px; color: var(--fg-dim); line-height: 1.3; }
.shot-hero.shot-tile .tile-path { font-size: 20px; }
.shot-hero.shot-tile .tile-label { font-size: 12px; }
.shot-hero.shot-tile .tile-plain { font-size: 13px; }
td.shot-cell, th.shot-cell { width: 128px; padding-right: 0; }
/* The column exists in the static markup, so it has to disappear when the
   feature is off rather than leave an empty gutter on every row. */
html:not(.has-shots) .shot-cell { display: none; }
@media (prefers-reduced-motion: reduce) { .shot.loading { animation: none; } }
@media (max-width: 720px) { .shot-thumb { display: none; } td.shot-cell { display: none; } }
/* The app hub. A grid of pictures, because the question this page answers is
   "show me what is being built here" and a monospace table answers a narrower
   one. The dense table is still a click away. */
.app-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 4px; }
.app-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border);
            border-radius: 6px; overflow: hidden; }
.app-card:hover { border-color: var(--fg2); }
/* Fills the card width at 16:9 rather than the fixed 128px a listing thumb
   uses. The `thumb` capture at 2x is 320px wide and about 6 KB, which covers a
   card this size on a retina display; the `hero` capture is 39 KB and would be
   six times the page weight for no visible gain at this size. First paint here
   already waits on several hundred KB of blocking CDN script, so a grid of
   pictures has to stay cheap. */
.app-shot { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 0;
            border-bottom: 1px solid var(--border); }
.app-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.app-card-head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.app-name { font-weight: bold; font-size: 13px; }
.app-cat { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg2);
           border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; white-space: nowrap;
           text-decoration: none; }
.app-cat:hover { color: var(--fg); border-color: var(--fg2); }
/* A guessed category is drawn as a guess. Most cards have one now that it is
   inferred rather than curated, and a chip that looked identical either way
   would quietly upgrade a heuristic into somebody's assertion. */
.app-cat-guessed { border-style: dashed; }
/* Clamped, not truncated at a character count: the blurbs are several
   sentences and the first one is always the summary. Hovering is not a way to
   read the rest, so the card links through to the realm page for that. */
.app-desc { color: var(--fg2); font-size: 11.5px; line-height: 1.5; white-space: normal; word-break: normal;
            display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.app-card-off { opacity: 0.55; }
.app-card-off:hover { opacity: 1; }
.app-checked { font-size: 10px; }
.app-stats { font-size: 11px; color: var(--fg); margin-top: auto; }
.app-actions { display: flex; gap: 12px; font-size: 11px; padding-top: 2px; }
.app-launch { white-space: nowrap; }
.dim { color: var(--fg2); }
@media (max-width: 720px) { .app-grid { grid-template-columns: 1fr; } }
/* The stand-in when there is no picture: the project's initial on a colour
   derived from its name. Same box as the screenshot it replaces, so one missing
   capture never reflows the grid around it. */
.app-initial { display: flex; align-items: center; justify-content: center; }
.app-initial span { font-size: 34px; font-weight: bold; color: rgba(255,255,255,.72);
                    letter-spacing: .02em; }
/* Where a sentence came from, as one quiet character. Honesty that must not
   cost the page its looks, so it sits after the text at half opacity and says
   the rest on hover. */
.app-prov { margin-left: 5px; opacity: .45; font-size: 9px; vertical-align: 1px; cursor: help; }
.app-prev { font-size: 10.5px; color: var(--fg2); }
/* The footer: how the list is made, and how to change it. Deliberately small,
   and at the bottom: asking a visitor for a pull request before they have seen
   anything is asking a favour of someone who does not yet know what this is. */
.app-foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--border);
            display: flex; flex-direction: column; gap: 5px; }
.app-foot-line { font-size: 11px; color: var(--fg2); }
.app-foot-line summary { cursor: pointer; }
.app-skips { margin: 6px 0 0; padding-left: 18px; }
.app-skips li { margin: 2px 0; }
.skeleton-line { height: 16px; margin-bottom: 12px; }
.skeleton-line:nth-child(1) { width: 80%; }
.skeleton-line:nth-child(2) { width: 60%; }
.skeleton-line:nth-child(3) { width: 70%; }
.skeleton-line:nth-child(4) { width: 50%; }
.skeleton-line:nth-child(5) { width: 65%; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
/* Refresh indicator. A hairline under the sticky header, shown whenever any
   /api request is in flight — the honest counterpart to painting cached data
   instantly: content appears at once, and this says it is still moving. It sits
   inside the header so it cannot shift the layout when it appears. */
#refresh-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 120ms linear; }
#refresh-bar.active { opacity: 1; }
#refresh-bar::after { content: ''; position: absolute; top: 0; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, #4ecdc4, transparent); animation: refreshsweep 1.1s ease-in-out infinite; }
@keyframes refreshsweep { from { left: -40%; } to { left: 100%; } }
/* Says the view on screen was painted from cache while the real answer is on
   its way. Anchored under the header so it is always in the same place, and
   deliberately quiet: with optimistic UI this is the normal case, not a
   warning. Absolutely positioned so appearing and disappearing never reflows
   the page under a reader's cursor. */
#stale-chip { position: absolute; right: 16px; bottom: -24px; display: none; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg2); font-size: 11px; z-index: 99; }
#stale-chip.active { display: inline-flex; }
.stale-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ecdc4; animation: pulse 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #refresh-bar::after, .stale-dot, .skeleton, .skeleton-cell { animation: none; } }
.skeleton-row td { padding: 12px; }
.skeleton-cell { height: 14px; background: var(--bg3); border-radius: 3px; animation: pulse 1.5s ease-in-out infinite; }
/* Dashboards */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 16px; }
.dash-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 12px; }
.dash-card.wide { grid-column: 1 / -1; }
.dash-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dash-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-title { font-size: 13px; color: var(--fg); }
.dash-chart { width: 100%; height: 300px; }
.dash-msg { color: var(--fg2); font-size: 12px; padding: 20px 0; }
.dash-note { color: var(--fg2); font-size: 11px; margin-bottom: 10px; }
/* Detail-page charts. Narrower than a dashboard card because they sit inside a
   tab that already has a stats bar and a table above them, and the chart is the
   summary of that table rather than the page. */
.detail-chart { margin: 4px 0 18px; }
.detail-chart-box { position: relative; width: 100%; height: 220px; }
.detail-chart-note { color: var(--fg2); font-size: 11px; margin-top: 6px; }

/* The unified asset list: kind badges, provenance markers, filters.
   The marker is a superscript rather than a colour, because what it says is
   "computed differently", not "bad", and a column of red numbers reads as an
   error state. */
.asset-kind { font-size: 9px; line-height: 1; padding: 2px 5px; border-radius: 3px;
  border: 1px solid #333; color: var(--fg2); cursor: help; text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap; }
.asset-kind-native { color: var(--accent); border-color: rgba(78,205,196,.4); }
.asset-kind-grc721 { color: var(--amber); border-color: rgba(255,217,61,.35); }
.basis-mark { color: var(--amber); cursor: help; margin-left: 2px; font-size: 11px; }
.cell-sub { color: var(--fg2); font-size: 10px; margin-top: 2px; }
.asset-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 6px; }
.filter-group { display: inline-flex; gap: 4px; }
.filter-chip { background: none; border: 1px solid #333; color: var(--fg2); font: inherit;
  font-size: 11px; padding: 3px 9px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.filter-chip:hover { border-color: #555; color: var(--fg); }
.filter-chip.active { color: var(--accent); border-color: var(--accent); background: rgba(78,205,196,.08); }
.filter-input { background: #0e0e0e; border: 1px solid #333; color: var(--fg); font: inherit;
  font-size: 11px; padding: 4px 8px; border-radius: 4px; min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.filter-input:focus { outline: none; border-color: var(--accent); }

/* Price provenance. Four tiers and a row of warning chips, all of them built
   to be hovered: the badge is the summary and the title= is the argument.
   Colour carries the same ordering as the text so the two cannot disagree, and
   the text is never only colour: "decorative" says what red means for readers
   who cannot see that it is red. */
.px-tier { display: inline-block; font-size: 10px; line-height: 1; padding: 3px 6px;
  border-radius: 3px; border: 1px solid; cursor: help; white-space: nowrap; vertical-align: middle; }
.px-tier-market     { color: var(--green); border-color: rgba(81,207,102,.45); background: rgba(81,207,102,.08); }
.px-tier-indicative { color: var(--accent); border-color: rgba(78,205,196,.45); background: rgba(78,205,196,.08); }
.px-tier-thin       { color: var(--amber); border-color: rgba(255,217,61,.45); background: rgba(255,217,61,.08); }
.px-tier-decorative { color: var(--red);   border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.1); }
.px-tier-none       { color: var(--fg2);   border-color: #333; }
/* A price the tier has disowned is drawn as disowned. Striking it through would
   claim it is wrong; it is not wrong, it is unactionable, so it dims instead. */
.px-value-decorative { color: var(--fg2); }
.px-warnings { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.px-warn { font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 3px;
  cursor: help; border: 1px solid #333; color: var(--fg2); white-space: nowrap; }
.px-warn-alarm   { color: var(--red);   border-color: rgba(255,107,107,.5); }
.px-warn-caution { color: var(--amber); border-color: rgba(255,217,61,.4); }
.px-warn::before { content: "\26A0\FE0E"; margin-right: 4px; opacity: .8; }
.px-warn-info::before { content: "\2139\FE0E"; }
.px-banner { border: 1px solid #333; border-left: 3px solid var(--amber); border-radius: 4px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 12px; color: var(--fg2); line-height: 1.6; }
.px-banner b { color: var(--fg); font-weight: 600; }
.px-banner .px-fact { cursor: help; border-bottom: 1px dotted #555; }
.px-depth { border-collapse: collapse; font-size: 11px; margin-top: 6px; }
.px-depth th, .px-depth td { padding: 2px 10px 2px 0; text-align: left; color: var(--fg2); }
.px-depth td.bad { color: var(--red); }
.px-depth td.ok { color: var(--green); }
.dash-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-grp { display: inline-flex; align-items: center; gap: 6px; }
.dash-bar .label { font-size: 11px; color: var(--fg2); text-transform: uppercase; letter-spacing: 1px; }
/* A realm path can be 60+ characters, and a select sizes itself to its widest
   option, so an uncapped one spans half the card. */
.dash-select { max-width: min(320px, 100%); }
.dash-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.dash-seg button { background: var(--bg2); color: var(--fg2); border: none; border-left: 1px solid var(--border); padding: 4px 10px; cursor: pointer; font-family: var(--mono); font-size: 11px; }
.dash-seg button:first-child { border-left: none; }
.dash-seg button.on { background: var(--accent); color: var(--bg); font-weight: bold; }
/* Realm calls tab: server-side filters over the whole call history.
   The controls reuse .dash-seg so "pick a window" looks the same here as on
   the dashboards; only the pieces with no equivalent elsewhere are new. */
.usage-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 16px; }
.usage-filter-label { color: var(--fg2); font-size: 11px; }
.usage-filter-label:not(:first-child) { margin-left: 8px; }
.usage-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); border-radius: 4px; padding: 2px 6px; font-size: 11px; }
.usage-chip-label { color: var(--fg2); }
.usage-chip-x { background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; font-family: var(--mono); }
.usage-chip-x:hover { color: var(--red); }
.usage-note { color: var(--fg2); font-size: 11px; margin: 6px 0 12px; }
.usage-section { margin-top: 24px; }
/* "only" is a filter, the address beside it is a link to another page. They do
   different things and must not look like one target. */
/* Dimmed rather than hidden: an affordance nobody can see until they happen to
   hover the right row is one nobody finds, and this is the control the section
   headings point at. */
.usage-only { background: none; border: 1px solid var(--border); color: var(--fg2); border-radius: 3px; font-family: var(--mono); font-size: 10px; padding: 0 5px; margin-left: 6px; cursor: pointer; opacity: 0.45; }
tr:hover .usage-only, .usage-row-on .usage-only { opacity: 1; }
.usage-only:hover { color: var(--accent); border-color: var(--accent); }
.usage-row-on { background: rgba(78,205,196,0.08); }
/* A share bar, so 60% of a realm's traffic and 2% of it do not read alike in a
   column of bare numbers. The number stays first in the DOM so the table's
   sort and CSV export still see it. */
.usage-share { position: relative; display: inline-block; min-width: 90px; }
.usage-share-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(78,205,196,0.18); border-radius: 2px; }
.usage-share-n { position: relative; padding-left: 4px; }
.usage-failed { color: var(--red); }
/* Info tooltip: a real button so it works on keyboard and touch, not title= */
.info { position: relative; display: inline-flex; }
.info-btn { background: none; border: 1px solid var(--border); color: var(--fg2); border-radius: 50%; width: 16px; height: 16px; font-size: 10px; line-height: 1; padding: 0; cursor: help; font-family: var(--mono); }
.info-btn:hover, .info-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.info-pop { display: none; position: absolute; top: 22px; left: 0; z-index: 300; width: 300px; background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; font-size: 11px; line-height: 1.5; color: var(--fg2); }
.info:hover .info-pop, .info-btn:focus-visible + .info-pop { display: block; }
/* Raw JSON toggle */
.raw-toggle { cursor: pointer; color: var(--fg2); font-size: 12px; margin-top: 12px; user-select: none; }
.raw-toggle:hover { color: var(--accent); }
.raw-content { display: none; margin-top: 8px; }
.raw-content.open { display: block; }
/* Pager */
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; padding: 12px 0; }
.pager-btn { background: var(--bg2); border: 1px solid var(--border); color: var(--fg); padding: 6px 14px; border-radius: 4px; font-family: var(--mono); font-size: 13px; cursor: pointer; }
.pager-btn:hover { border-color: var(--accent); color: var(--accent); }
.pager-btn:disabled { opacity: 0.3; cursor: default; border-color: var(--border); color: var(--fg2); }
.pager-btn.active { border-color: var(--accent); color: var(--accent); }
.pager-info { color: var(--fg2); font-size: 12px; }
/* Realm path styling */
.rp-type { color: var(--fg2); }
.rp-ns { color: #61afef; }
.rp-name { color: var(--fg); font-weight: bold; }
/* Footer */
footer { border-top: 1px solid var(--border); padding: 16px 0; margin-top: 40px; color: var(--fg2); font-size: 12px; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
footer a { color: var(--fg2); }
footer a:hover { color: var(--accent); }
/* Network selector */
.network-select, .dash-select { background: var(--bg2); border: 1px solid var(--border); color: var(--fg); padding: 4px 8px; border-radius: 4px; font-family: var(--mono); font-size: 12px; cursor: pointer; outline: none; }
.network-select:focus { border-color: var(--accent); }
/* Network badges */
.net-badge { display: inline-block; padding: 1px 5px; border-radius: 2px; font-size: 10px; font-weight: bold; margin-left: 4px; vertical-align: middle; }
/* Colours come from netColor() at render time, so a network added to the config
   needs no CSS. The old per-id classes only covered gnoland1 and test12, which
   left sapphire and staging unstyled. */
.net-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.net-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
/* Chain health, on every page. Hidden entirely while everything is alive: a
   permanent green light is something a reader stops seeing, and the only job
   here is to be noticed on the day it is not green. */
.health-chip { display: none; margin-left: 8px; font-size: 11px; font-weight: bold; cursor: pointer; white-space: nowrap; }
.health-chip.show { display: inline-block; }
/* Live mode. The HUD lives in the sticky header, so the chain tip and the proof
   that it is still moving stay on screen on every page and at every scroll
   offset. Three parts, and each answers a different question: the dot says the
   connection is up, the height says where the chain is, and the beat fills
   between blocks so the thing is visibly alive in the seconds when no block has
   arrived. A number that only changes every 3.3s cannot do that on its own:
   frozen and working look identical. */
.live-hud { background: var(--bg2); border: 1px solid var(--border); color: var(--fg2); padding: 3px 8px; border-radius: 4px; font-family: var(--mono); font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 7px; line-height: 1.3; transition: border-color 0.2s, background 0.35s; }
.live-hud:hover { border-color: var(--accent); }
.live-hud.active { border-color: var(--green); color: var(--green); }
.live-hud.connecting { border-color: var(--accent); color: var(--accent); }
.live-hud.stalled { border-color: var(--amber); color: var(--amber); }
.live-hud.error { border-color: var(--red); color: var(--red); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg2); flex-shrink: 0; transition: box-shadow 0.35s; }
.live-hud.active .live-dot { background: var(--green); animation: livepulse 1s ease-in-out infinite; }
.live-hud.connecting .live-dot { background: var(--accent); animation: livepulse 0.5s ease-in-out infinite; }
.live-hud.stalled .live-dot { background: var(--amber); }
.live-hud.error .live-dot { background: var(--red); }
/* tabular-nums, or the whole header shifts sideways every time a digit with a
   different width scrolls past. */
.live-height { font-variant-numeric: tabular-nums; font-weight: bold; letter-spacing: 0.3px; }
.live-beat { width: 26px; height: 4px; border-radius: 2px; background: var(--bg3); overflow: hidden; flex-shrink: 0; }
.live-beat i { display: block; height: 100%; width: 0; background: currentColor; border-radius: 2px; opacity: 0.6; }
/* The block train: one bar per recent block, newest on the right, taller where
   the block carried more transactions. The same idiom as the per-validator
   spark below, and it is the part that makes the header read as something
   happening rather than something displayed. A bar slides in every block, and
   the shape of the last minute of the chain is visible from any page. Empty
   blocks stay as stubs on purpose: a chain ticking over with nothing in it is a
   fact worth seeing, not one to hide. */
/* The block strip on /blocks: the live train's idiom at page scale.
   Two channels, because a reader of this page has two questions and they are
   not the same one. Height is how busy the block was (log, so one 40-tx deploy
   block does not flatten every ordinary one to a stub); colour is who proposed
   it, which is what makes a rotation visible as a rotation and a validator
   that stopped taking its turn visible as a missing stripe. */
.bstrip { display: flex; align-items: flex-end; gap: 1px; height: 64px; width: 100%;
  padding: 6px 0 0; overflow: hidden; }
.bstrip a { flex: 1 1 0; min-width: 2px; display: block; min-height: 3px; border-radius: 1px;
  background: currentColor; opacity: .55; }
.bstrip a:hover { opacity: 1; outline: 1px solid var(--fg); outline-offset: 1px; }
.bstrip a.has-txs { opacity: .9; }
/* A block that took more than twice the median to arrive. The chain stalling
   for nine seconds is the single most interesting thing this strip can show,
   and it is invisible in a picture whose only axes are txs and proposer. */
.bstrip a.slow { box-shadow: inset 0 0 0 1px var(--amber); }
.bstrip-axis { display: flex; justify-content: space-between; color: var(--fg2);
  font-size: 11px; padding-top: 4px; }
.bstrip-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; font-size: 12px; }
.bstrip-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.bstrip-legend i { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 9px; }
.bstrip-legend .bl-n { color: var(--fg2); }
.live-train { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; flex-shrink: 0; }
.live-train i { display: block; width: 3px; min-height: 3px; border-radius: 1px; background: currentColor; opacity: 0.3; }
.live-train i.txs { opacity: 0.85; }
.live-train i.fresh { animation: livepush 0.3s ease-out; }
@keyframes livepush { from { transform: translateX(4px) scaleY(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
/* The arrival flash. Short on purpose: at mainnet block time a longer one is
   still fading when the next block lands, and a chip that never returns to rest
   reads as a warning rather than a heartbeat. */
.live-hud.tick { background: rgba(81, 207, 102, 0.16); }
.live-hud.tick .live-dot { box-shadow: 0 0 0 4px rgba(81, 207, 102, 0.22); }
.live-height.roll { animation: liveroll 0.3s ease-out; }
@keyframes liveroll { from { transform: translateY(-5px); opacity: 0.25; } to { transform: none; opacity: 1; } }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-new { animation: livefade 0.5s ease-out; }
@keyframes livefade { from { background: rgba(78, 205, 196, 0.2); } to { background: transparent; } }
/* Reduced motion, and it has to come after the rules above rather than next to
   the other one near the top: these selectors have the same specificity as the
   ones they override, so source order is the only thing deciding, and from up
   there `animation: none` silently lost to the rule that follows it. The beat
   is a continuous sweep and nothing but motion, so it goes entirely; the train
   is data and only loses its slide-in. The height, the dot colour and the
   tooltip carry the rest, and the stall check is on a timer rather than a
   frame loop so the diagnosis survives too. */
@media (prefers-reduced-motion: reduce) {
  .live-beat { display: none; }
  .live-hud .live-dot, .live-height.roll, .live-train i.fresh { animation: none; }
  .live-hud.tick { background: var(--bg2); }
}
/* Per-validator recent-liveness sparkline: one bar per recent block, filled
   where that validator proposed it. */
.spark { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.spark i { width: 3px; height: 14px; border-radius: 1px; background: var(--bg3); display: block; }
.spark i.hit { background: var(--green); }
/* Copy-to-clipboard affordance next to a full hash, address or path. Sized to
   sit inline without changing the line height of the row it lives in. */
.copy-btn {
  background: none; border: none; color: var(--fg2); cursor: pointer;
  font-family: var(--mono); font-size: 12px; line-height: 1;
  padding: 2px 4px; margin-left: 6px; border-radius: 3px; vertical-align: baseline;
}
.copy-btn:hover { color: var(--accent); background: var(--bg3); }
.copy-btn.copied { color: var(--green); }
/* The confirmation replaces the icon, so reserve the width both states need and
   stop the row from reflowing on every click. */
.copy-btn { min-width: 20px; display: inline-block; text-align: center; }
/* Identicon: a deterministic image per address, generated in-page.
   Baseline-aligned and sized to the text so a row's height does not change,
   and slightly rounded so it reads as a mark rather than a stray pixel block. */
.identicon {
  display: inline-block; vertical-align: -2px; margin-right: 5px;
  line-height: 0; border-radius: 2px; overflow: hidden;
}
.identicon svg { display: block; }
/* Exported-function pills on a realm's info tab. */
.fnpill {
  display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0;
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  cursor: pointer; background: var(--bg2);
}
.fnpill:hover { border-color: var(--accent); background: var(--bg3); }
.fnpill.uncalled { color: var(--fg2); }
.fnpill .fnfail { margin-left: 5px; color: var(--red); font-size: 11px; }
/* Embed mode: ?embed=1 strips the chrome so a host app can iframe one piece of
   content instead of a whole page-in-a-page.
   Class on <html> rather than <body> so it applies before first paint and the
   header never flashes in an iframe. */
/* Block map cells. Square by padding-bottom rather than by aspect-ratio so
   the grid keeps its shape in the older browsers the rest of this file still
   works in, and a hover that only brightens (no size change) so 1536 cells
   cannot reflow the page under the cursor. */
.storage-cell { transition: opacity 0.1s, filter 0.1s; }
.storage-cell:hover { filter: brightness(1.45); }
.storage-cell-free:hover { filter: none; background: var(--border) !important; }
/* The click-to-focus dim is a class, not an inline style, so the hover rules
   below can override it. Inline opacity could only be beaten with !important,
   and then the hover could never dim anything back. */
.storage-cell.is-dim { opacity: 0.15; }
/* Cross-highlight: hovering a block, a legend chip or a table row lights every
   other drawing of the same group and pushes the rest back. The map is the
   reason this is done with two classes on a container rather than per-element
   styles — 1536 cells, and only the container's class changes per hover. */
#storage-content.hl-on .storage-cell[data-skey] { opacity: 0.12; }
#storage-content.hl-on .storage-cell[data-skey].hl-match { opacity: 1; filter: brightness(1.4); }
#storage-content.hl-on .storage-name { opacity: 0.4; }
#storage-content.hl-on .storage-name.hl-match { opacity: 1; }
.storage-name.hl-match { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
#storage-content.hl-on tbody tr.hl-match > td { background: rgba(78, 205, 196, 0.12); }
/* The readout is what makes a 6px cell legible: it names what is under the
   cursor immediately, where a title tooltip takes a second and covers the map.
   Fixed height so the page does not jump as it fills and empties. */
.storage-readout { display: flex; align-items: center; gap: 8px; min-height: 20px; margin-top: 8px; font-size: 12px; color: var(--fg2); }
.storage-readout .k { display: inline-flex; align-items: center; gap: 5px; color: var(--fg); }
.storage-readout .sw { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 10px; }
/* A share as a bar as well as a number: the eye reads the column shape before
   it reads any of the percentages. */
.storage-bar { display: inline-block; vertical-align: middle; width: 54px; height: 6px; margin-left: 7px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.storage-bar > i { display: block; height: 100%; background: var(--accent); }

html.embed header, html.embed footer, html.embed #sanity-subbar,
html.embed #rename-notice, html.embed .rail { display: none !important; }
/* The rename notice is chrome too, and the one piece of it with a dismiss
   button. On a wall display nobody is there to press it, so it would sit
   across the top of the screen for as long as the notice lives. */
/* The rail is chrome too, and an iframe that kept 172px of it would be
   showing a page-in-a-page, which is the thing embed mode exists to avoid. */
html.embed body { padding-left: 0; }
html.embed body { background: transparent; }
html.embed .container { padding-top: 0; padding-bottom: 0; max-width: none; }
/* See the head script: /widget wears embed mode, and on its own it has no host
   page to inherit a background from. */
html.widget-standalone body { background: var(--bg); }

/* /cockpit: the roll-up, read at a desk.
   A verdict, then what is wrong, then the numbers behind both. The order is
   the point and is why this is not a grid of tiles: nine counters above the
   thing that is actually broken is how a status page gets read as decoration. */
.ckpt-verdict { display: flex; align-items: center; gap: 10px; padding: 10px 0 14px; }
.ckpt-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; }
.ckpt-headline { font-size: 21px; font-weight: bold; }
.ckpt-asof { color: var(--fg2); font-size: 12px; margin-left: auto; }
.ckpt-finding { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); }
.ckpt-sev { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; flex: 0 0 46px; }
.ckpt-ftext { min-width: 0; }
.ckpt-ftitle { font-weight: bold; }
.ckpt-fdetail { color: var(--fg2); font-size: 12px; }
.ckpt-clear { color: var(--fg2); font-size: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.ckpt-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; padding: 14px 0 4px; border-top: 1px solid var(--border); }
#cockpit-findings { margin-bottom: 28px; }

/* /widget: one screen, recognised rather than read.
   Sized in viewport units throughout, because the two devices this has to work
   on are a phone held at arm's length and a television seen from across a
   room, and the only thing those agree on is how much of the screen a glyph
   fills. clamp() keeps both ends sane: the floor is a readable phone, the
   ceiling stops a 4K panel drawing a number two feet tall.
   Nothing here animates. This is the one page in the file that can be left
   running for weeks on a panel that remembers what it displayed. */
#view-widget main { padding: 0; }
.wg { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 3vh; padding: 4vh 0; }
.wg-verdict { display: flex; align-items: center; gap: 0.45em; font-size: clamp(26px, 6vw, 84px); font-weight: bold; line-height: 1.1; }
.wg-dot { width: 0.5em; height: 0.5em; border-radius: 50%; flex: 0 0 auto; }
.wg-wrong { display: flex; flex-direction: column; gap: 0.4em; font-size: clamp(15px, 2.5vw, 34px); }
.wg-wrong > div { display: flex; align-items: baseline; gap: 0.5em; }
.wg-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2.5vh 3vw; }
.wg-num { display: flex; flex-direction: column; min-width: 0; }
.wg-num b { font-size: clamp(24px, 4.4vw, 64px); line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.wg-num span { font-size: clamp(10px, 1.1vw, 17px); color: var(--fg2); text-transform: uppercase; letter-spacing: 0.12em; }
.wg-foot { display: flex; flex-wrap: wrap; gap: 1.4em; font-size: clamp(10px, 1.1vw, 17px); color: var(--fg2); }
/* A reference from one gloss to another headword. Marked, not linked: the row
   it points at is on the same screen, and the hover highlight is what connects
   them. */
.gloss-ref { color: var(--accent); border-bottom: 1px dotted var(--accent); cursor: help; }
/* Highlight on hover (addresses, tx hashes, event types, etc) */
[data-hl].hl-active { outline: 2px solid #4ecdc4; outline-offset: 1px; background: rgba(78, 205, 196, 0.15); border-radius: 2px; }
/* The same highlight on a map bubble. outline and background are no-ops on an
   SVG shape, so it is drawn as a stroke instead. */
circle[data-hl].hl-active { stroke: #4ecdc4; stroke-width: 3; stroke-opacity: 1; stroke-dasharray: none; }
@media (max-width: 768px) { .stats-bar { gap: 12px; } .stat .value { font-size: 16px; } .search-box input { width: 160px; } }
/* Below this the labels cost more than they are worth: the rail would be a
   fifth of a phone screen, permanently. Collapsing by media query rather than
   by script keeps it right on first paint, and the stored preference only
   applies where there is room to honour it. */
@media (max-width: 900px) {
  body { padding-left: var(--rail-w-collapsed); }
  .rail { width: var(--rail-w-collapsed); }
  .rail .rail-label { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  .rail nav a, .rail-toggle { justify-content: center; padding: 6px 0; }
  .rail nav .nav-kids { display: none; }
  .rail nav a.in-section { color: var(--accent); background: var(--bg3); border-left-color: var(--accent); }
  .rail-top { justify-content: center; padding: 12px 0 10px; }
  .rail-foot { display: none; }
}
