/* <valt-node-list>. Lands on the canvas; the drawer's rows at list scale (32 flags). */
/* position: relative so the return chip has something to hang off when nothing else positions the
   host; the screen's own rule (network.css) makes it absolute and inset, which does the same job. */
valt-node-list { display: block; position: relative; background: var(--canvas); color: var(--text); font-family: var(--font);
  transition: opacity var(--t-feedback) var(--ease), visibility 0s linear 0s; }
/* visibility, not just opacity: an invisible list of nine rows used to stay focusable and stay in
   the accessibility tree, so a screen reader heard every city twice. The delay lets the fade finish. */
valt-node-list:not([open]) { opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity var(--t-feedback) var(--ease), visibility 0s linear var(--t-feedback); }
valt-node-list .list { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--content-top) 0 calc(var(--content-bottom) + 48px + 12px); box-sizing: border-box; }
/* On a wide window the list is still the whole screen, but a 32 flag and a 14 city do not carry a
   1000 px row: the rows keep to a readable column, centred. The phone never sees it. */
valt-node-list { --list-col: 520px; }
valt-node-list .rows { max-width: var(--list-col); margin: 0 auto; }

valt-node-list .row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px var(--gutter); border: 0; background: transparent;
  cursor: pointer; text-align: left; color: inherit; font-family: inherit; position: relative; border-bottom: 1px solid var(--border);
  -webkit-appearance: none; touch-action: manipulation; transition: background var(--t-feedback) var(--ease); }
/* Hover only where a pointer can hover (see node-drawer.css). The press is the same step, so a
   finger on a row is answered before the card opens. */
@media (hover: hover) { valt-node-list .row:hover { background: var(--surface); } }
valt-node-list .row:active { background: var(--surface); }
valt-node-list .row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The card's own row stays in its place (U24) and wears the drawer's selected teal fade (node-drawer.css), so tapping
   around never moves a city. */
valt-node-list .row[aria-current="true"] {
  background: linear-gradient(90deg, color-mix(in srgb, var(--focus) 30%, transparent) 0, color-mix(in srgb, var(--focus) 10%, transparent) 55%, transparent); }
:root[data-theme="day"] valt-node-list .row[aria-current="true"] { color: color-mix(in srgb, var(--focus) 50%, var(--text));
  background: linear-gradient(270deg, color-mix(in srgb, var(--focus) 46%, transparent) 0, color-mix(in srgb, var(--focus) 16%, transparent) 55%, transparent); }
/* Row parts are named through .row: the open card is a hero with a .flag and an .id of its own. */
valt-node-list .row .flag { width: 32px; height: 32px; border-radius: var(--r-pill); flex: none; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
valt-node-list .row .flag svg { display: block; width: 100%; height: 100%; }
valt-node-list .row .id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* City over country, as in the drawer. */
valt-node-list .row .id b { display: block; font: 600 16px/20px var(--font); letter-spacing: -.015em; }
valt-node-list .row .id small { display: block; font: 500 13px/16px var(--font); color: var(--text-2); }
/* The detent, as in the drawer (node-drawer.css): the hairline that has just crossed the list's top
   edge, under the status bar band, lights for an instant as the tick leaves. Its light peaks where
   the city begins (16 gutter, 32 flag, 12 gap) and runs off to the right. */
valt-node-list .rows { --detent: color-mix(in srgb, var(--text) 42%, transparent); }
valt-node-list .row::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--detent) 60px, transparent 92%); }
valt-node-list .row[data-detent="a"]::after { animation: node-list-detent-a 420ms var(--ease); }
valt-node-list .row[data-detent="b"]::after { animation: node-list-detent-b 420ms var(--ease); }
@keyframes node-list-detent-a { 0%, 15% { opacity: 1; } to { opacity: 0; } }
@keyframes node-list-detent-b { 0%, 15% { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { valt-node-list .rows { --detent: color-mix(in srgb, var(--text) 21%, transparent); } }
/* The open card: the selected city is the connection hero itself (hero.js and hero.css), the
   card the globe view shows. The card is the selection mark, no teal rail. The screen gives every hero a
   gutter (network.css); in the list the wrapper does, so the list keeps its own measure. It is pinned at the top, above the chips (.pin), on the canvas, so the rows pass under it unseen. */
valt-node-list .card { max-width: var(--list-col); margin: 0 auto; padding: 6px var(--gutter); box-sizing: border-box; }
valt-node-list .card valt-hero { margin: 0; }
/* The glass's blur is dropped in the list: behind the card is only the list's own canvas, so it would
   blur one flat colour, and a blurring layer inside a scroller is work iOS redoes on every frame of a
   scroll. isolation keeps the stacking context the blur made, which the connected wash needs (hero.css,
   ::before at z -1). Same look, since blurring a flat colour changes nothing. */
valt-node-list .card valt-hero .hero { -webkit-backdrop-filter: none; backdrop-filter: none; isolation: isolate; }

/* The return chip (node-drawer.js), here over a full-height list. It sits outside the scroller, at
   the left of the same row the view and sort triggers occupy (bottom right, 48 tall, 106 wide with
   the gap), centred against them: the way back on one side, the way to look around on the other.
   Never centred on the screen, which is where the trigger pair is. Signal, as in the drawer
   (node-drawer.css): the tunnel that is up, restated as a control. */
valt-node-list .return { position: absolute; left: max(var(--gutter), calc((100% - var(--list-col)) / 2 + var(--gutter))); bottom: calc(var(--content-bottom) + 8px); z-index: 1;
  display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - var(--gutter) * 2 - 118px); height: 32px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: var(--signal);
  box-shadow: var(--shadow-control); color: var(--signal-ink); font: 600 12px/1 var(--font); letter-spacing: -.01em;
  cursor: pointer; -webkit-appearance: none;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease), visibility 0s linear var(--t-feedback); }
valt-node-list .return[shown] { opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease), visibility 0s linear 0s; }
valt-node-list .return:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* 44 tap target taken outward from a 32 pill, as in the drawer. */
valt-node-list .return::after { content: ''; position: absolute; inset: -6px -8px; }
valt-node-list .return b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
valt-node-list .return .arrow { color: inherit; opacity: .8; }

/* The return chip's arrow glyph (node-drawer.js syncReturn). */
valt-node-list .arrow { display: inline-flex; flex: none; color: var(--text-2); opacity: .7; }
valt-node-list .arrow svg { display: block; }
/* No city left under the filters (node-drawer.js noMatch): the fact, then the way back. */
valt-node-list .none { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px var(--gutter);
  font: 500 13px/17px var(--font); letter-spacing: -.01em; color: var(--text-2); }
valt-node-list .none p { margin: 0; }
valt-node-list .none .reset { flex: none; min-width: var(--tap); height: var(--tap); padding: 0 0 0 8px; border: 0; background: transparent; cursor: pointer; -webkit-appearance: none;
  font: 600 13px/1 var(--font); letter-spacing: -.01em; color: color-mix(in srgb, var(--focus) 82%, var(--text)); }
valt-node-list .none .reset:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-chip); }

/* All cities (node-drawer.js allRow), the drawer's row at list scale: the divider above it, the list glyph in
   the 32 flag slot, the count, and the chevron that turns over while it is open. */
valt-node-list .row.all { margin-top: -1px; border-top: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
valt-node-list .row.all .glyph { display: flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center;
  border-radius: var(--r-pill); box-shadow: 0 0 0 1px var(--border); color: var(--text-2); }
valt-node-list .row.all svg { display: block; }
valt-node-list .row.all .n { flex: none; font: 500 13px/1 var(--font); font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; }
valt-node-list .row.all .go { display: inline-flex; flex: none; color: var(--text-2); opacity: .7; transition: transform var(--t-feedback) var(--ease); }
valt-node-list .row.all[aria-expanded="true"] .go { transform: rotate(180deg); }

/* The pinned top (node-list.js #watchSeek): the selected server's card and the region chips, then the
   search. The band (only Offline, saved list) carries the menu button's clearance as its
   own top padding (and gives the same back as a negative margin, so nothing moves at rest), so no row ever shows above
   it or beside the menu button. The card and the chips pin flush under it; the search pins under them and slides up
   behind the chips while the list is going down. A sticky inset counts from inside the scroller's padding
   (--content-top), hence the subtractions. */
valt-node-list .band { position: sticky; top: calc(-1 * var(--content-top) - var(--lift)); z-index: 3; background: var(--canvas);
  padding-top: calc(var(--safe-top) + 64px); margin-top: calc(-1 * (var(--safe-top) + 64px)); transition: top var(--t-move) var(--ease); }
/* Chrome tucked (menu.js sets :root[data-chrome-tucked] while its chip is really away; the menu button and the dock
   slide away as the list goes down): the clearance the band kept for the menu button has nothing to clear, so the pinned top
   rises to the status bar by exactly that clearance. A sticky inset moves only what is pinned, so the rows under it keep
   their place and the freed height shows more of them; on the way back up the top settles down again with the button. */
valt-node-list { --lift: 0px; }
:root[data-chrome-tucked] valt-node-list { --lift: 56px; }   /* the band's 64 clearance less the 8 the status bar keeps */
/* Offline, saved list: the drawer's head line (node-drawer.css .head, .live[data-offline]), shown only with no network. */
valt-node-list .band .live { display: flex; align-items: center; gap: 5px; max-width: var(--list-col); margin: 0 auto; padding: 0 var(--gutter) 4px; box-sizing: border-box;
  font: 600 11px/12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
valt-node-list .band .live[hidden] { display: none; }
valt-node-list .band .live b { width: 5px; height: 5px; border-radius: var(--r-pill); background: currentColor; }
valt-node-list .pin { position: sticky; top: calc(var(--band-h, 0px) - var(--content-top) - var(--lift)); z-index: 2; background: var(--canvas);
  box-shadow: 0 1px 0 transparent; transition: box-shadow var(--t-move) var(--ease), top var(--t-move) var(--ease); }
valt-node-list .seek { position: sticky; top: calc(var(--band-h, 0px) + var(--pin-h, 0px) - var(--content-top) - var(--lift)); z-index: 1; background: var(--canvas);
  border-bottom: 1px solid var(--border); transition: transform var(--t-move) var(--ease), top var(--t-move) var(--ease); }
valt-node-list[data-seek-away] .seek { transform: translateY(-100%); }
/* With the search away the chips' block draws the line the search drew. */
valt-node-list[data-seek-away] .pin { box-shadow: 0 1px 0 var(--border); }
@media (prefers-reduced-motion: reduce) { valt-node-list .band, valt-node-list .seek, valt-node-list .pin { transition: none; } }
/* What the pinned top covers, from the scroller's top edge: the return chip and returnHome (node-drawer.js) read it,
   and so does the browser when focus moves to a row, so nothing lands under the card. */
valt-node-list .list { scroll-padding-top: calc(var(--band-h, 0px) + var(--pin-h, 0px) + var(--seek-h, 0px)); }
valt-node-list[data-seek-away] .list { scroll-padding-top: calc(var(--band-h, 0px) + var(--pin-h, 0px) - var(--lift)); }

/* Glass list (U11c, network.js glassy): the canvas runs solid behind the cities and thins to a tinted,
   lightly frosted glass on the right, where the globe shows the picked server behind the rows. */
valt-node-list[data-glass] { background: transparent; }
valt-node-list[data-glass]::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--canvas) 0, var(--canvas) 36%, color-mix(in srgb, var(--canvas) 55%, transparent) 58%, color-mix(in srgb, var(--canvas) 14%, transparent) 100%);
  -webkit-backdrop-filter: blur(1px) saturate(125%); backdrop-filter: blur(1px) saturate(125%); }
valt-node-list[data-glass] .list { position: relative; z-index: 1; }

/* The phone (U22, hero.css has the rule): the card's wrapper gives 2 instead of 6 above and below. */
@media (max-width: 447.98px) { valt-node-list .card { padding: 2px var(--gutter); } }
