/* <valt-node-drawer>. Same glass as the hero: two floating panels, one material. */
valt-node-drawer { display: block; font-family: var(--font); color: var(--text);
  transition: transform var(--t-move) var(--ease), opacity var(--t-move) var(--ease), visibility 0s linear 0s; }
/* visibility, not opacity alone: slid away it still held nine focusable rows, so list view put
   eighteen node rows in the tab order, nine of them invisible. The delay lets the slide finish. */
valt-node-drawer[closed] { transform: translateX(-100%); opacity: 0; pointer-events: none; visibility: hidden;
  transition: transform var(--t-move) var(--ease), opacity var(--t-move) var(--ease), visibility 0s linear var(--t-move); }

valt-node-drawer .drawer { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass-panel); border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--r-card) var(--r-card) 0;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%); backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  box-shadow: var(--shadow-drawer); }
valt-node-drawer .head { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px 9px; border-bottom: 1px solid var(--border); flex: none;
  font: 600 11px/12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
valt-node-drawer .live { display: flex; align-items: center; gap: 5px; color: var(--node); }
valt-node-drawer .live b { width: 5px; height: 5px; border-radius: var(--r-pill); background: currentColor; }
/* Offline (node-drawer.js): the dot and the words drop from node blue, the live colour, to the head's own grey. */
valt-node-drawer .live[data-offline] { color: var(--text-2); }
valt-node-drawer .rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }

/* City over country: two lines set the city at 16 and fit every name in the catalog at the drawer's width. */
valt-node-drawer .row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 60px; padding: 10px 14px; border: 0; background: transparent;
  text-align: left; cursor: pointer; color: inherit; font-family: inherit; position: relative; border-bottom: 1px solid var(--border);
  -webkit-appearance: none; transition: background var(--t-feedback) var(--ease); }
valt-node-drawer .row:last-child { border-bottom: 0; }
/* Hover only where a pointer can hover. iOS emulates :hover on touch and leaves it on the last
 * row touched, so a pull that started on a row left that row lit like a second selection. */
@media (hover: hover) { valt-node-drawer .row:hover { background: var(--glass-cap); } }
valt-node-drawer .row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The selected row is a teal fade. Focus teal, the selection colour, washed over the glass: at night it is strongest behind the flag and clear by the row's end;
   by day it runs the other way, clear behind the flag and strongest at the edge toward the map, and
   the city is inked in a teal mixed with the text, since near-black on the wash read dead. */
valt-node-drawer .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-drawer .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); }
valt-node-drawer .flag { width: 32px; height: 32px; border-radius: var(--r-pill); flex: none; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
valt-node-drawer .flag svg { display: block; width: 100%; height: 100%; }
valt-node-drawer .id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
valt-node-drawer .id b { display: block; font: 600 16px/20px var(--font); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
valt-node-drawer .id small { display: block; font: 500 13px/16px var(--font); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The detent (node-drawer.js watchTicks): the hairline that has just crossed the top of the rows,
   under the NODES head, lights for an instant as the tick leaves, so the list is seen to click as
   well as felt. The light sits on the row's own hairline and runs off it from the name side; no
   travel, only the glow: full for a beat, then dying on the settle curve, 420ms in all. Reduced
   motion keeps it at half strength: it moves nothing, and it is the tick's only sign without haptics. */
valt-node-drawer .rows { --detent: color-mix(in srgb, var(--text) 42%, transparent); }
valt-node-drawer .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) 47px, transparent 92%); }
valt-node-drawer .row:last-child::after { display: none; }
valt-node-drawer .row[data-detent="a"]::after { animation: node-drawer-detent-a 420ms var(--ease); }
valt-node-drawer .row[data-detent="b"]::after { animation: node-drawer-detent-b 420ms var(--ease); }
@keyframes node-drawer-detent-a { 0%, 15% { opacity: 1; } to { opacity: 0; } }
@keyframes node-drawer-detent-b { 0%, 15% { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { valt-node-drawer .rows { --detent: color-mix(in srgb, var(--text) 21%, transparent); } }
/* The return chip (node-drawer.js): the way back to the node the tunnel is on once it has scrolled
   out of the list. Signal, because it is the verified tunnel restated as a control, and because
   glass put a white pill on a white panel in day mode. Hidden it is also visibility:hidden, so it
   leaves the tab order; the delay lets the fade finish first. */
valt-node-drawer .return { position: absolute; left: 50%; bottom: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 24px); 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: translateX(-50%) translateY(6px);
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease), visibility 0s linear var(--t-feedback); }
valt-node-drawer .return[shown] { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%);
  transition: opacity var(--t-feedback) var(--ease), transform var(--t-feedback) var(--ease), visibility 0s linear 0s; }
valt-node-drawer .return:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* 32 tall is the size this reads right at over a 44 row; the kit's 44 tap target is taken outward
   from it, so the pill stays small and the thumb still gets its square. */
valt-node-drawer .return::after { content: ''; position: absolute; inset: -6px -8px; }
valt-node-drawer .return b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The row arrows are a step under --text-2; this one rides the pill's own ink, or it would be a
   grey glyph on green. */
valt-node-drawer .return .arrow { color: inherit; opacity: .8; }

/* The return chip's arrow glyph (node-drawer.js syncReturn). */
valt-node-drawer .arrow { display: inline-flex; flex: none; color: var(--text-2); opacity: .7; }
valt-node-drawer .arrow svg { display: block; }
/* No city left under the filters (node-drawer.js noMatch): the fact, then the way back. */
valt-node-drawer .none { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px;
  font: 500 13px/17px var(--font); letter-spacing: -.01em; color: var(--text-2); }
valt-node-drawer .none p { margin: 0; }
valt-node-drawer .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-drawer .none .reset:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-chip); }

/* All cities (node-drawer.js allRow): a node row's size and rhythm under the favourites. The line above it is
   the divider, a step stronger than the rows' hairlines and drawn over the last favourite's; the list glyph
   takes the flag's slot, so the words start where the cities do; the chevron turns over while it is open. */
valt-node-drawer .row.all { margin-top: -1px; border-top: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
valt-node-drawer .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-drawer .row.all svg { display: block; }
valt-node-drawer .row.all .n { flex: none; font: 500 12px/1 var(--font); font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; }
valt-node-drawer .row.all .go { display: inline-flex; flex: none; color: var(--text-2); opacity: .7; transition: transform var(--t-feedback) var(--ease); }
valt-node-drawer .row.all[aria-expanded="true"] .go { transform: rotate(180deg); }

/* Region filter and search (node-drawer.js), for both lists: the list view loads this
   sheet for them (node-list.js SHARED). Chips are the sheet's pill at the drawer's scale; a lit one is the
   selection's teal, with an x that says a second tap takes it off. The bar is the sheet's search, out on the list. */
:is(valt-node-drawer, valt-node-list) { --filters-x: 14px; }
valt-node-list { --filters-x: var(--gutter); }
:is(valt-node-drawer, valt-node-list) .regions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px var(--filters-x); flex: none; }
:is(valt-node-drawer, valt-node-list) .regions::-webkit-scrollbar { display: none; }
:is(valt-node-drawer, valt-node-list) .regions[hidden], :is(valt-node-drawer, valt-node-list) .find[hidden] { display: none; }
valt-node-list .regions { max-width: var(--list-col); margin: 0 auto; box-sizing: border-box; padding-bottom: 10px; }
/* More chips than fit: the cut edge fades, so the strip reads as one that scrolls rather than as a chip sliced by
   mistake (watchFilters sets data-start / data-end as it scrolls). */
:is(valt-node-drawer, valt-node-list) .regions { --fade-l: 0px; --fade-r: 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); }
:is(valt-node-drawer, valt-node-list) .regions:not([data-start]) { --fade-l: 24px; }
:is(valt-node-drawer, valt-node-list) .regions[data-end] { --fade-r: 0px; }
:is(valt-node-drawer, valt-node-list) .chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; -webkit-appearance: none;
  font: 600 13px/1 var(--font); letter-spacing: -.01em; touch-action: manipulation;
  transition: background var(--t-feedback) var(--ease), border-color var(--t-feedback) var(--ease); }
/* 32 is how the pill reads over a 60 row; the tap target is the kit's 44, taken outward (from inside the 1px border). */
:is(valt-node-drawer, valt-node-list) .chip::before { content: ''; position: absolute; inset: -7px -3px; }
:is(valt-node-drawer, valt-node-list) .chip em { font: 500 12px/1 var(--font); font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; }
:is(valt-node-drawer, valt-node-list) .chip[aria-pressed="true"] { padding-right: 8px;
  background: color-mix(in srgb, var(--focus) 22%, transparent); border-color: color-mix(in srgb, var(--focus) 55%, transparent); }
:root[data-theme="day"] :is(valt-node-drawer, valt-node-list) .chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--focus) 30%, transparent); color: color-mix(in srgb, var(--focus) 50%, var(--text)); }
:is(valt-node-drawer, valt-node-list) .chip .x { display: inline-flex; width: 18px; height: 18px; margin-left: 2px; align-items: center; justify-content: center;
  border-radius: var(--r-pill); background: color-mix(in srgb, var(--focus) 30%, transparent); }
:is(valt-node-drawer, valt-node-list) .chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:is(valt-node-drawer, valt-node-list) .find { display: flex; align-items: center; gap: 8px; height: 44px; margin: 0 var(--filters-x) 10px; padding: 0 4px 0 12px; flex: none;
  border-radius: var(--r-pill); background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
valt-node-list .find { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--list-col) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; box-sizing: border-box; }
:is(valt-node-drawer, valt-node-list) .find:focus-within { box-shadow: inset 0 0 0 1.5px var(--focus); }
:is(valt-node-drawer, valt-node-list) .find .lens { display: inline-flex; flex: none; }
:is(valt-node-drawer, valt-node-list) :is(.chip, .find) svg { display: block; }
:is(valt-node-drawer, valt-node-list) .find input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; -webkit-appearance: none; appearance: none;
  font: 500 15px/1 var(--font); letter-spacing: -.01em; color: var(--text); caret-color: var(--focus); }
:is(valt-node-drawer, valt-node-list) .find input::placeholder { color: var(--text-2); opacity: 1; }
:is(valt-node-drawer, valt-node-list) .find input::-webkit-search-cancel-button { display: none; }
:is(valt-node-drawer, valt-node-list) .find .fx { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; margin-right: 4px; align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); cursor: pointer; -webkit-appearance: none; }
:is(valt-node-drawer, valt-node-list) .find .fx::before { content: ''; position: absolute; inset: -10px; }
:is(valt-node-drawer, valt-node-list) .find .fx[hidden] { display: none; }
:is(valt-node-drawer, valt-node-list) .find .fx:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
valt-node-drawer .find:not([hidden]) + .rows { border-top: 1px solid var(--border); }

/* The phone (U22, hero.css has the rule), the list view only: the chips 30 tall (the ::before grows to keep the 44 tap;
   it counts from inside the 1px border), the row and the search closer to what they sit between. */
@media (max-width: 447.98px) {
  valt-node-list .regions { padding: 6px var(--gutter) 6px; }
  valt-node-list .chip { height: 30px; }
  valt-node-list .chip::before { inset: -8px -3px; }
  valt-node-list .find { margin-bottom: 6px; }
}
