/* <valt-dock>. Geometry from the board: 9 inset, tabs 6 apart, active tab 20 pad · 24 icon · 8 gap · label · 20 pad. */
valt-dock { position: fixed; left: 50%; bottom: var(--dock-bottom); transform: translateX(-50%); z-index: 7; display: block; font-family: var(--font); }

valt-dock .dock { position: relative; display: flex; align-items: center; gap: 6px; padding: 9px; border-radius: var(--r-pill);
  background: var(--dock-chrome); border: 1px solid var(--dock-line);
  -webkit-backdrop-filter: blur(var(--dock-blur)) saturate(130%); backdrop-filter: blur(var(--dock-blur)) saturate(130%);
  box-shadow: var(--dock-shadow), inset 0 0 0 2px rgba(255, 255, 255, .04), inset 0 1px 0 1px rgba(255, 255, 255, .1); }
:root[data-theme="day"] valt-dock .dock { box-shadow: var(--dock-shadow), inset 0 1px 0 1px rgba(255, 255, 255, .3); }

valt-dock .tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: var(--tap); min-width: var(--tap);
  padding: 0; border-radius: var(--r-pill); text-decoration: none; color: var(--text-2);
  font: 600 13px/20px var(--font); letter-spacing: -.02em; white-space: nowrap;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none;
  transition: background var(--t-feedback) var(--ease), color var(--t-feedback) var(--ease); }
valt-dock .tab span { display: none; }
valt-dock .tab:hover { color: var(--text); }
valt-dock .tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
valt-dock .tab[aria-current="page"] { padding: 0 20px; background: var(--dock-cap); color: var(--dock-cap-ink); box-shadow: var(--dock-cap-glow); touch-action: none; }
valt-dock .tab[aria-current="page"] span { display: block; }
valt-dock .tab svg { flex: none; }

/* The VPN screen's two map controls (dock.js adopt): inside the VPN capsule. While they
 * are lent (data-shelf="open"), the capsule widens by the two
 * controls (2 x 44 + 2 x 6) and they sit at its trailing end, 6 in: right is the pill's 9 inset, the
 * Data tab's 44, the 6 gap and those 6. Etched into the capsule: a 36 ring inside the 44 target in the
 * capsule's own ink, so a disc never touches the capsule's edge. The open control fills focus teal.
 * The dock never moves; the controls fade in and out with the VPN tab. data-shelf is unset until they
 * have been lent once, so nothing plays at load. The iOS 26 shell draws the same layout in Liquid Glass. */
valt-dock[data-shelf="open"]:not([data-stand-down]) .tab[data-section="network"][aria-current="page"] { padding-right: 120px; }
valt-dock .tier { position: absolute; top: 9px; right: 65px; height: var(--tap); display: flex; align-items: center; }
valt-dock:not([data-shelf="open"]) .tier { visibility: hidden; transition: visibility 0s linear var(--t-move); }
valt-dock[data-shelf="open"] .tier { visibility: visible; transition: visibility 0s linear 0s; }
valt-dock[data-shelf="open"] .tier > * { opacity: 1; transition: opacity var(--t-move) var(--travel); }
valt-dock:not([data-shelf="open"]) .tier > * { opacity: 0; transition: opacity var(--t-move) var(--travel); }
valt-dock valt-dual-trigger .trig,
valt-dock valt-dual-trigger .trig:hover,
valt-dock valt-dual-trigger .trig[aria-expanded="true"] { position: relative; background: transparent; box-shadow: none; color: var(--dock-cap-ink); }
valt-dock valt-dual-trigger .trig::before { content: ''; position: absolute; inset: 4px; border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .09), inset 0 -1px 0 rgba(255, 255, 255, .95);
  transition: background var(--t-feedback) var(--ease); }
:root[data-theme="day"] valt-dock valt-dual-trigger .trig::before { box-shadow: inset 0 1px 0 rgba(0, 0, 0, .9), inset 0 -1px 0 rgba(255, 255, 255, .06); }
valt-dock valt-dual-trigger .trig svg { position: relative; }
:root valt-dock valt-dual-trigger .trig[aria-expanded="true"]::before { background: var(--focus); box-shadow: none; }
valt-dock valt-dual-trigger .trig[aria-expanded="true"] { color: var(--focus-ink); }
/* Standing down (dock.js standDown): lent, but out of the way while the rating card is up. */
valt-dock[data-stand-down] .tier { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--t-move) var(--travel), visibility 0s linear var(--t-move); }
valt-dock[data-shelf="open"]:not([data-stand-down]) .tier { transition: opacity var(--t-move) var(--travel), visibility 0s linear 0s; }
@media (prefers-reduced-motion: reduce) {
  valt-dock .tier, valt-dock .tier > * { transition: none; }
  valt-dock[data-stand-down] .tier, valt-dock[data-shelf="open"]:not([data-stand-down]) .tier { transition: none; }
}

/* Capsule looks to try (dev overlay, Capsule row; html[data-cap]). "now" is the shipped white/black
 * capsule (tokens.css). The others are six more directions, night then day, set as
 * local properties here and never in tokens.css. The shell's glass dock draws the same seven (NativeDock.swift CapLook). */
html[data-cap]:not([data-cap="now"]) valt-dock .tab[aria-current="page"] { background: var(--cap-bg); color: var(--cap-ink);
  box-shadow: inset 0 0 0 1px var(--cap-ring, transparent), inset 0 -2px 0 var(--cap-base, transparent), inset 0 1px 0 var(--cap-top, transparent); }
html[data-cap]:not([data-cap="now"]) valt-dock .tab[aria-current="page"] svg { color: var(--cap-icon, var(--cap-ink)); }
html[data-cap]:not([data-cap="now"]):not([data-dock-layout="rail"]):not([data-dock-layout="above"]) valt-dock valt-dual-trigger .trig:not([aria-expanded="true"]) { color: var(--cap-ink); }
html[data-cap]:not([data-cap="now"]):not([data-dock-layout="rail"]):not([data-dock-layout="above"]) valt-dock valt-dual-trigger .trig::before { box-shadow: inset 0 0 0 1px var(--cap-ctrl); }
:root[data-cap]:not([data-cap="now"]) valt-dock valt-dual-trigger .trig[aria-expanded="true"]::before { box-shadow: none; }
html[data-cap="frosted"] valt-dock { --cap-bg: rgba(255, 255, 255, .16); --cap-ink: #FAFAFA; --cap-ring: rgba(255, 255, 255, .14); --cap-ctrl: rgba(255, 255, 255, .18); }
html[data-cap="graphite"] valt-dock { --cap-bg: #2A2A30; --cap-ink: #FAFAFA; --cap-top: rgba(255, 255, 255, .08); --cap-ctrl: rgba(255, 255, 255, .12); }
html[data-cap="signal"] valt-dock { --cap-bg: rgba(139, 195, 74, .14); --cap-ink: #B5DB8A; --cap-ring: rgba(139, 195, 74, .35); --cap-ctrl: rgba(139, 195, 74, .35); }
html[data-cap="deep"] valt-dock { --cap-bg: #2E3F1C; --cap-ink: #E3F1D2; --cap-ctrl: rgba(227, 241, 210, .2); }
html[data-cap="outline"] valt-dock { --cap-bg: transparent; --cap-ink: #FAFAFA; --cap-ring: rgba(255, 255, 255, .3); --cap-ctrl: rgba(255, 255, 255, .18); }
html[data-cap="underlit"] valt-dock { --cap-bg: #2A2A30; --cap-ink: #FAFAFA; --cap-icon: #8BC34A; --cap-base: #8BC34A; --cap-ctrl: rgba(255, 255, 255, .12); }
:root[data-theme="day"][data-cap="frosted"] valt-dock { --cap-bg: rgba(10, 10, 12, .07); --cap-ink: #0A0A0C; --cap-ring: rgba(10, 10, 12, .1); --cap-ctrl: rgba(10, 10, 12, .14); }
:root[data-theme="day"][data-cap="graphite"] valt-dock { --cap-bg: #E4E2DB; --cap-ink: #0A0A0C; --cap-top: rgba(255, 255, 255, .8); --cap-ctrl: rgba(10, 10, 12, .12); }
:root[data-theme="day"][data-cap="signal"] valt-dock { --cap-bg: rgba(139, 195, 74, .18); --cap-ink: #3B6D11; --cap-ring: rgba(99, 153, 34, .45); --cap-ctrl: rgba(99, 153, 34, .45); }
:root[data-theme="day"][data-cap="deep"] valt-dock { --cap-bg: #4A6B25; --cap-ink: #F2F8EA; --cap-ctrl: rgba(242, 248, 234, .3); }
:root[data-theme="day"][data-cap="outline"] valt-dock { --cap-bg: transparent; --cap-ink: #0A0A0C; --cap-ring: rgba(10, 10, 12, .3); --cap-ctrl: rgba(10, 10, 12, .16); }
:root[data-theme="day"][data-cap="underlit"] valt-dock { --cap-bg: #E4E2DB; --cap-ink: #0A0A0C; --cap-icon: #5C8A2A; --cap-base: #8BC34A; --cap-ctrl: rgba(10, 10, 12, .12); }

/* The held capsule (dock.js armPill). .pill sits behind the tabs, unseen until a
 * hold: then the current tab drops its own background and the pill, dressed exactly like it, takes its
 * place and lifts. Lifted it is glass: a 1.04 scale and the glass cap tint with a 1px glass line inside,
 * both faded in on ::after, so only transform and opacity move. dock.js moves the pill with translateX;
 * let go, it springs to the nearer tab (a slight overshoot) while the lift settles. Reduced motion: the
 * glass shows at once without the scale, and the snap is a jump. Same specificity as the capsule looks
 * above, so this block has to stay after them. */
valt-dock .pill { position: absolute; top: 9px; left: 0; height: var(--tap); visibility: hidden; pointer-events: none; }
valt-dock[data-drag] .pill { visibility: visible; }
valt-dock[data-drag="snap"] .pill { transition: transform 320ms cubic-bezier(.34, 1.36, .64, 1); }
valt-dock .pill::before, valt-dock .pill::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-pill);
  transition: transform 160ms var(--ease), opacity 160ms var(--ease); }
valt-dock .pill::before { background: var(--dock-cap); box-shadow: var(--dock-cap-glow); }
html[data-cap]:not([data-cap="now"]) valt-dock .pill::before { background: var(--cap-bg);
  box-shadow: inset 0 0 0 1px var(--cap-ring, transparent), inset 0 -2px 0 var(--cap-base, transparent), inset 0 1px 0 var(--cap-top, transparent); }
valt-dock .pill::after { opacity: 0; background: var(--glass-cap); box-shadow: inset 0 0 0 1px var(--glass-control-line); }
/* By day the glass cap tint is ink, which greys the capsule instead of lifting it: a white wash instead. */
:root[data-theme="day"] valt-dock .pill::after { background: rgba(255, 255, 255, .5); }
valt-dock[data-drag="lift"] .pill::before, valt-dock[data-drag="lift"] .pill::after { transform: scale(1.04); }
valt-dock[data-drag="lift"] .pill::after { opacity: 1; }
valt-dock[data-drag] .tab[aria-current="page"],
html[data-cap] valt-dock[data-drag] .tab[aria-current="page"] { background: transparent; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  valt-dock .pill, valt-dock[data-drag] .pill, valt-dock .pill::before, valt-dock .pill::after { transition: none; }
  valt-dock[data-drag] .pill::before, valt-dock[data-drag] .pill::after { transform: none; }
}

/* Dock layouts on trial (dev overlay, Dock layout row; html[data-dock-layout]). "inline" is the layout above and
 * ships. The other two put the map controls outside the capsule, which stays at its resting width.
 * Both are overrides of the inline rules, so the shipped dock needs nothing from this block. */
:root[data-dock-layout="rail"] valt-dock[data-shelf="open"] .tab[data-section="network"][aria-current="page"],
:root[data-dock-layout="above"] valt-dock[data-shelf="open"] .tab[data-section="network"][aria-current="page"] { padding-right: 20px; }
:root[data-dock-layout="rail"] valt-dock valt-dual-trigger .trig::before,
:root[data-dock-layout="above"] valt-dock valt-dual-trigger .trig::before { content: none; }

/* Edge rail: a vertical pill of the dock's own material on the map's edge. Its
 * foot stands --rail-lift above the screen's bottom edge (default: level with the column's foot,
 * --content-bottom + 21) on the side html[data-rail-side] names (right unless moved). The dock is
 * centred, so 50% of it plus or less half the viewport is a screen edge. Bare icons in the text ink,
 * the open one filled teal. Press and hold to pick it up and drag it (dock.js); it snaps to the nearer
 * side and main.js remembers where (store.railSpot). */
:root[data-dock-layout="rail"] valt-dock .tier { top: auto; right: auto; bottom: calc(var(--rail-lift, calc(var(--content-bottom) + 21px)) - var(--dock-bottom)); left: calc(50% + 50vw - var(--gutter)); height: auto;
  transform: translateX(-100%); flex-direction: column; gap: 2px; padding: 4px; border-radius: var(--r-pill);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  background: var(--dock-chrome); border: 1px solid var(--dock-line); box-shadow: var(--dock-shadow);
  -webkit-backdrop-filter: blur(var(--dock-blur)) saturate(130%); backdrop-filter: blur(var(--dock-blur)) saturate(130%); }
:root[data-dock-layout="rail"][data-rail-side="left"] valt-dock .tier { left: calc(50% - 50vw + var(--gutter)); transform: none; }
:root[data-dock-layout="rail"] valt-dock .tier.lifted { scale: 1.06; box-shadow: var(--dock-shadow), 0 18px 40px -12px rgba(0, 0, 0, .55); transition: scale var(--t-feedback) var(--ease); }
:root[data-dock-layout="rail"] valt-dock valt-dual-trigger { flex-direction: column; gap: 2px; }
/* In a bottom corner the rail lies down: the two controls side by side (dock.js dropRail). */
:root[data-dock-layout="rail"][data-rail-row] valt-dock .tier,
:root[data-dock-layout="rail"][data-rail-row] valt-dock valt-dual-trigger { flex-direction: row; }
:root[data-dock-layout="rail"] valt-dock valt-dual-trigger .trig { color: var(--text); background: transparent; box-shadow: none; }
:root[data-dock-layout="rail"] valt-dock valt-dual-trigger .trig[aria-expanded="true"] { color: var(--focus-ink); background: var(--focus); }

/* Above: the pill grows upward to 112 and takes a 40 radius; its
 * top row holds the two controls as discs in the active capsule's own colour and ink (whichever capsule
 * look is on, the shipped one by default), the tabs below. No strip behind them.
 * --dock-h follows, so the column above the dock gives way. */
html[data-dock-layout="above"]:has(valt-dock[data-shelf="open"]:not([data-stand-down])) { --dock-h: 112px; }
:root[data-dock-layout="above"] valt-dock[data-shelf="open"]:not([data-stand-down]) .dock { padding-top: 59px; border-radius: 40px; }
:root[data-dock-layout="above"] valt-dock .tier { top: 9px; left: 9px; right: 9px; height: var(--tap); justify-content: center; gap: 6px; }
:root[data-dock-layout="above"] valt-dock valt-dual-trigger .trig { color: var(--cap-ink, var(--dock-cap-ink)); background: var(--cap-bg, var(--dock-cap));
  box-shadow: inset 0 0 0 1px var(--cap-ring, transparent), inset 0 -2px 0 var(--cap-base, transparent); }
:root[data-dock-layout="above"]:not([data-cap]) valt-dock valt-dual-trigger .trig:not([aria-expanded="true"]),
:root[data-dock-layout="above"][data-cap="now"] valt-dock valt-dual-trigger .trig:not([aria-expanded="true"]) { box-shadow: var(--dock-cap-glow); }
:root[data-dock-layout="above"] valt-dock valt-dual-trigger .trig[aria-expanded="true"] { color: var(--focus-ink); background: var(--focus); box-shadow: none; }

/* Desktop (app.css): the sidebar carries the tabs, so the capsule goes and only the lent map controls stay.
 * display: contents drops the capsule's box, so the edge rail is placed from the dock element's own box,
 * which sits exactly where the capsule's did. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  valt-dock .dock { display: contents; }
  valt-dock .tab { display: none; }
}

/* Tucked (dock.js tuck): while the server list goes down the capsule slides off the bottom
 * edge, the way the list's search slides away, and it comes back on any scroll up. In the rail layout the map
 * controls stay where they are: the rail moves back up by the very amount the dock moves down, read from one animated
 * property, so the two can never drift a frame apart. Never while the keyboard's focus is in the dock (dock.js data-kbd-focus). */
@property --dock-tuck { syntax: '<length>'; inherits: true; initial-value: 0px; }
valt-dock { translate: 0 var(--dock-tuck); transition: --dock-tuck var(--t-move) var(--ease); }
valt-dock[data-tucked]:not([data-kbd-focus]):not([data-rail-drag]) { --dock-tuck: calc(var(--dock-bottom) + 96px); }
/* A rail lifted while tucked (dock.js armRail): the dock is back at once, in the same frame as the rail's counter-move. */
valt-dock[data-rail-drag] { transition: none; }
:root[data-dock-layout="rail"] valt-dock .tier { translate: 0 calc(-1 * var(--dock-tuck)); }
@media (prefers-reduced-motion: reduce) { valt-dock { transition: none; } }

/* The shell draws the dock natively (dock.js mirror): this one stays in the page as the source of
 * what it shows, unseen and untouchable. visibility is not enough: the tier sets its own. */
html[data-native-dock] valt-dock { opacity: 0; pointer-events: none; }
html[data-native-dock] valt-dock * { visibility: hidden !important; }
