/* Foxhole: dark glass over a slow aurora, lit by the connection's colors.
   --a1 and --a2 follow the phase (body[data-phase]) and glide between colors as it changes. */

/* Persian's letters and digits only (Vazirmatn, OFL: fonts/Vazirmatn-OFL.txt); Latin keeps the system font. */
@font-face {
  font-family: Vazirmatn;
  src: url("fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

/* Russian (Golos Text, OFL: fonts/GolosText-OFL.txt). Cyrillic for "Русский" in any language, Latin only in a Russian window
   (the --font below), so its words and the names among them are one typeface. */
@font-face {
  font-family: Golos;
  src: url("fonts/GolosText-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Latin";
  src: url("fonts/GolosText-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --a1 { syntax: "<color>"; inherits: true; initial-value: #8b5cff; }
@property --a2 { syntax: "<color>"; inherits: true; initial-value: #45b6ff; }

:root {
  --x: 1; --end: 90deg; /* the way text runs: right to left in Persian (below) */
  color-scheme: dark;
  --bg: #07060c;
  --ink: #f6f3fb;
  --ink-2: rgba(246, 243, 251, 0.7);
  --ink-3: rgba(246, 243, 251, 0.46);
  --ink-4: rgba(246, 243, 251, 0.22);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --fox: #ff7a1a;
  --fox-2: #ff3d6e;
  --mint: #2ef2b0;
  --sky: #45b6ff;
  --violet: #8b5cff;
  --amber: #ffc247;
  --rose: #ff5a76;
  --on-ink: #fff; /* text on the lit mode switch */
  --r-lg: 28px;
  --r-md: 18px;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.2);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: Vazirmatn, Golos, var(--system-font);
  --system-font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Inter, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

body[data-phase="off"] { --a1: #8b5cff; --a2: #45b6ff; }
body[data-phase="busy"] { --a1: #ffc247; --a2: #ff7a1a; --on-ink: #1d1200; }
body[data-phase="on"] { --a1: #2ef2b0; --a2: #45b6ff; --on-ink: #03150f; }
body[data-phase="global"] { --a1: #ff8a2a; --a2: #ff3d6e; }
/* relay mode (the user's own Apps Script, not Firefox VPN): purple */
body[data-relay][data-phase="on"] { --a1: #b76bff; --a2: #ff6bd6; --on-ink: #1a0326; }
body[data-relay][data-phase="global"] { --a1: #d35cff; --a2: #7c5cff; }
/* connected, but the internet's gone (app.js data-lost): amber, the dial's ticks sweeping slowly as it waits, no ripples */
body[data-lost][data-phase] { --a1: #ffc247; --a2: #ff9f1a; --on-ink: #1d1200; }
body[data-lost] .ripple { animation: none; }
body[data-lost] .halo { opacity: 0.45; animation-duration: 3.2s; }
body[data-lost] .ticks line { --T: 2.6s; animation: tick var(--T) linear infinite; animation-delay: calc(var(--i) * var(--T) / 72 - var(--T)); }
/* the account hasn't turned on Firefox's VPN (app.js renderEntitled): everything in dark red */
body[data-unentitled][data-phase] { --a1: #c0182f; --a2: #7a0f1f; --on-ink: #fff;
  --fox: #c0182f; --fox-2: #8e1024; --mint: #e0384f; --sky: #a3142a; --violet: #8e1024; --amber: #d9364a; --rose: #e0384f; --bg: #0c0507; }
body[data-unentitled] .bg { background: radial-gradient(1100px 760px at 18% -12%, #2e0a12 0%, transparent 62%), radial-gradient(900px 700px at 112% 112%, #24070d 0%, transparent 60%), var(--bg); }
body[data-unentitled] .b3 { background: radial-gradient(circle, #8e1024, transparent 64%); }
body[data-unentitled] #g-ring stop { stop-color: #e0384f; }
body[data-unentitled] .zzz { display: none; }
body[data-unentitled][data-phase="off"] .orb {
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 28%, transparent 52%),
    radial-gradient(circle at 50% 125%, rgba(192, 24, 47, 0.45), transparent 62%), linear-gradient(150deg, #3a1219, #12060a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -26px 46px -14px rgba(0, 0, 0, 0.6), 0 30px 70px -26px rgba(192, 24, 47, 0.55); }
body[data-unentitled] .modal .box { background: linear-gradient(160deg, rgba(58, 18, 26, 0.92), rgba(22, 7, 11, 0.95)); }
body[data-unentitled] :is(.tier.free, .tier.on) { color: #ff8a99; background: rgba(224, 56, 79, 0.1); box-shadow: inset 0 0 0 1px rgba(224, 56, 79, 0.28); }
body[data-unentitled] .tip em { color: #ff8a99; }
body[data-unentitled] .gauge .bar { filter: drop-shadow(0 0 4px rgba(224, 56, 79, 0.6)); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  display: flex;
  flex-direction: column;
  transition: --a1 1.4s var(--out), --a2 1.4s var(--out);
}
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
input { user-select: text; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid color-mix(in oklab, var(--a1) 70%, #fff); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--a1) 45%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.2); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── The backdrop: aurora blobs, a dot grid, rising embers, grain ─────────────────────────── */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 760px at 18% -12%, #1b1131 0%, transparent 62%),
    radial-gradient(900px 700px at 112% 112%, #0f1730 0%, transparent 60%),
    var(--bg);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.b1 { width: 58vmax; height: 58vmax; top: -24vmax; left: -14vmax; opacity: 0.42;
  background: radial-gradient(circle, var(--a1), transparent 64%); animation: drift1 28s ease-in-out infinite alternate; }
.b2 { width: 56vmax; height: 56vmax; bottom: -28vmax; right: -16vmax; opacity: 0.38;
  background: radial-gradient(circle, var(--a2), transparent 64%); animation: drift2 34s ease-in-out infinite alternate; }
.b3 { width: 36vmax; height: 36vmax; top: 26%; left: 30%; opacity: 0.2;
  background: radial-gradient(circle, #7a3cff, transparent 64%); animation: drift3 42s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(16vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-14vmax, -12vmax) scale(1.1); } }
@keyframes drift3 { 50% { transform: translate(-10vmax, 8vmax) scale(1.25); } to { transform: translate(12vmax, -6vmax) scale(0.9); } }
.dots { position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 32% 42%, #000 15%, transparent 72%);
}
.noise { position: absolute; inset: 0; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.embers i { position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: color-mix(in oklab, var(--a1) 75%, #fff);
  box-shadow: 0 0 10px 2px color-mix(in oklab, var(--a1) 65%, transparent);
  animation: ember var(--t) linear var(--d) infinite;
}
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: var(--o); }
  75% { opacity: calc(var(--o) * 0.5); }
  100% { transform: translate(var(--dx), -102vh); opacity: 0; }
}
[data-phase="off"] .embers { opacity: 0.45; }
/* The window out of focus holds still (app.js body.idle): whatever only decorates stops where it is and goes on from
   there once the window's come back to, as each frame of it is the whole window drawn again, the blurred backdrop and
   the glass over it too, 60 times a second, for nobody. What says something's under way (the comet, a spinner, a
   look) goes on, without the dial's sweep. Not with Reduce Motion, where none of these runs. */
:root:not([data-motion="still"]) body.idle :is(.blob, .embers i, .ticks, .ticks line, .zzz i, .brand .logo, .halo, .ripple, .row.active .state-dot i, .tip .i, .lock-orb, .fox-hero),
:root:not([data-motion="still"]) body.idle :is(.orb, .row.active .flag, .row.active .state-dot, .pill.update)::before,
:root:not([data-motion="still"]) body.idle :is(.row.active .state-dot, .pill.update)::after { animation-play-state: paused; }

/* ── Glass ────────────────────────────────────────────────────────────────────────────────── */

.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border-radius: var(--r-lg);
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
/* a lit edge: white at the top left, the phase's color at the bottom right */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 28%, transparent 66%, color-mix(in oklab, var(--a1) 50%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* a soft light that follows the pointer */
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, 0.06), transparent 42%);
}
.spot:hover::after { opacity: 1; }

.rise { animation: rise 1s var(--out) both; animation-delay: calc(var(--d, 0) * 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(8px); } }

/* ── Title bar ────────────────────────────────────────────────────────────────────────────── */

.titlebar {
  flex: none; height: 68px; display: flex; align-items: center; gap: 10px;
  padding: 0 24px 0 28px; -webkit-app-region: drag;
}
body.mac .titlebar { padding-left: 96px; }
.titlebar button, .titlebar .chip { -webkit-app-region: no-drag; }
/* its items keep their size, unsqueezed: where they don't all fit, the least needed give way whole (app.js fitBar) */
.titlebar > * { flex-shrink: 0; }
.titlebar.tight :is(.word, .ver), .titlebar.tighter .chip.data .txt, .titlebar.tightest .brand { display: none; }
.titlebar.tighter .chip.data { padding: 0 4px; } /* the ring alone: a button's width */
.grow { flex: 1; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 30px; height: 30px; filter: drop-shadow(0 4px 14px rgba(255, 122, 26, 0.55)); animation: bob 6s ease-in-out infinite; }
/* the logo and the wordmark, one button: only where the version's hidden (app.js renderVerTip), a click on either says
   it; else they're the bar's, to drag the window by. Pressed, the two shrink as one. */
.brand-btn { display: flex; align-items: center; gap: inherit; padding: 0; border: 0; border-radius: 10px; background: none;
  color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: scale 0.45s var(--spring); }
.brand-btn:disabled { cursor: default; -webkit-app-region: drag; }
.brand-btn:active:not(:disabled) { scale: 0.95; transition-duration: 0.12s; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-3deg); } }
.brand .word { font-size: 19px; font-weight: 750; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #ffd2b0 55%, #ff9f6b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ver { font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }

.chip, .icon-btn, .pill {
  height: 40px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.3s, box-shadow 0.3s, transform 0.35s var(--spring);
}
.icon-btn { width: 40px; justify-content: center; color: var(--ink-2); }
.chip:hover, .icon-btn:hover { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line-2); transform: translateY(-1px); color: var(--ink); }
.chip { padding: 0 14px 0 6px; }
.chip.data { padding-inline-start: 4px; }
.chip.data:hover { transform: none; }
.chip .gauge { width: 32px; height: 32px; }
.gauge circle { fill: none; stroke-width: 3.4; }
.gauge .track { stroke: rgba(255, 255, 255, 0.08); }
.gauge .bar { stroke: url(#g-ring); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25;
  transition: stroke-dashoffset 1.4s var(--out); filter: drop-shadow(0 0 4px rgba(46, 242, 176, 0.6)); }
.chip .txt { display: flex; flex-direction: column; line-height: 1.15; }
.chip .k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.chip .v { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.avatar { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--fox), var(--fox-2)); box-shadow: 0 6px 16px -6px var(--fox-2), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.avatar.big { width: 42px; height: 42px; border-radius: 14px; font-size: 17px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; } /* the account's own picture (app.js avatar) */
.account .name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pill.update { position: relative; padding: 0 14px; color: #fff; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(135deg, var(--fox), var(--fox-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: swap 0.9s var(--out) both; } /* fades in, then glows softly: */
/* its glow at rest and at its widest, each drawn once and one faded into the other (as the connected row's dot, below:
   a shadow that itself grows is drawn again by the page each frame, here for as long as there's an update) */
.pill.update::before, .pill.update::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: pulse 2.6s ease-in-out 0.9s infinite; }
.pill.update::before { box-shadow: 0 8px 26px -8px var(--fox-2); }
.pill.update::after { box-shadow: 0 8px 34px -4px var(--fox-2); opacity: 0; animation-name: pulse-wide; }
/* downloading: the button fills from the left as it goes */
.pill.update.busy { cursor: default; animation: none;
  background: linear-gradient(var(--end), rgba(255, 255, 255, 0.3) var(--p), transparent var(--p)), linear-gradient(135deg, var(--fox), var(--fox-2)); }
.pill.update.busy::before, .pill.update.busy::after { animation: none; }
.pill.update span { font-variant-numeric: tabular-nums; }
@keyframes glowPulse { 50% { box-shadow: 0 8px 34px -4px var(--fox-2), inset 0 1px 0 rgba(255, 255, 255, 0.3); } }

/* ── Layout ───────────────────────────────────────────────────────────────────────────────── */

.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(330px, 34vw, 388px); gap: 20px; padding: 0 24px 24px; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 24px 26px 22px; min-height: 0; }

/* ── The orb ──────────────────────────────────────────────────────────────────────────────── */

/* room above for the toast, below for the dial's ticks */
.orb-wrap { --orb: 200px; position: relative; width: var(--orb); height: var(--orb); margin: 50px 0 40px; flex: none;
  transform: perspective(900px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform 0.6s var(--out); }
.halo { position: absolute; inset: -42%; border-radius: 50%; opacity: 0.55; pointer-events: none;
  background: radial-gradient(circle, color-mix(in oklab, var(--a1) 75%, transparent) 0%, color-mix(in oklab, var(--a2) 35%, transparent) 36%, transparent 64%);
  filter: blur(24px); animation: breathe 5s ease-in-out infinite; }
[data-phase="off"] .halo { opacity: 0.26; }
[data-phase="busy"] .halo { opacity: 0.75; animation-duration: 1.4s; }
[data-phase="global"] .halo { opacity: 0.85; }
@keyframes breathe { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.07); } }

.ripple { position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none;
  border: 1.5px solid color-mix(in oklab, var(--a1) 85%, transparent);
  box-shadow: 0 0 22px -4px var(--a1), inset 0 0 22px -6px var(--a1); }
[data-phase="on"] .ripple, [data-phase="global"] .ripple { animation: ripple 4.5s var(--out) infinite; }
.ripple:nth-of-type(3) { animation-delay: 1.5s !important; }
.ripple:nth-of-type(4) { animation-delay: 3s !important; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.05); opacity: 0; } }

.ticks { position: absolute; inset: -44px; width: calc(100% + 88px); height: calc(100% + 88px); pointer-events: none; animation: spin 120s linear infinite reverse; }
.ticks line { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; opacity: 0.12; }
.ticks line.major { stroke-width: 2.4; opacity: 0.2; }
[data-phase="busy"] .ticks line { --T: 1.1s; animation: tick var(--T) linear infinite; animation-delay: calc(var(--i) * var(--T) / 72 - var(--T)); }
/* the radar (the dial turning, a light sweeping its ticks): only while busy, as the comet (.ring); else the dial stands still */
body:not([data-phase="busy"]) .ticks { animation: none; }
@keyframes tick { 0% { opacity: 1; stroke: var(--a1); } 35%, 100% { opacity: 0.14; stroke: var(--ink); } }

.ring { position: absolute; inset: -13px; border-radius: 50%; pointer-events: none; animation: spin 0.95s linear infinite; }
.ring i { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0turn, transparent 0turn 0.52turn, color-mix(in oklab, var(--a2) 75%, transparent) 0.8turn, var(--a1) 0.985turn, transparent 1turn);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.ring.glow { filter: blur(7px); opacity: 0.95; }
.ring.glow i { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
/* the comet: only while busy (connecting, switching, restoring); connected or off, the orb stands without it */
body:not([data-phase="busy"]) .ring { display: none; }
@keyframes spin { to { transform: rotate(1turn); } }

.orb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; /* a button's width doesn't follow inset */ border: 0; padding: 0; overflow: hidden; color: #fff;
  display: grid; place-items: center; isolation: isolate;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 26%, transparent 50%),
    radial-gradient(circle at 50% 125%, color-mix(in oklab, var(--a2) 80%, transparent), transparent 62%),
    linear-gradient(150deg, color-mix(in oklab, var(--a1) 88%, #140d22), color-mix(in oklab, var(--a2) 72%, #07060c));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 -26px 46px -14px rgba(0, 0, 0, 0.55),
    inset 0 16px 30px -12px rgba(255, 255, 255, 0.22),
    0 34px 80px -20px color-mix(in oklab, var(--a1) 80%, transparent),
    0 0 110px -14px color-mix(in oklab, var(--a2) 60%, transparent);
  transition: transform 0.55s var(--spring), box-shadow 0.8s, filter 0.5s; }
/* a slow swirl of light inside the glass */
.orb::before { content: ""; position: absolute; inset: -35%; z-index: -1; opacity: 0.7; filter: blur(16px); animation: spin 9s linear infinite;
  background: conic-gradient(from 0deg, transparent, color-mix(in oklab, var(--a1) 70%, transparent), transparent 32%, color-mix(in oklab, #fff 40%, transparent) 48%, transparent 60%, color-mix(in oklab, var(--a2) 70%, transparent), transparent); }
[data-phase="off"] .orb {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04) 28%, transparent 52%),
    radial-gradient(circle at 50% 125%, rgba(139, 92, 255, 0.45), transparent 62%),
    linear-gradient(150deg, #2a2140, #0f0c19);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 -26px 46px -14px rgba(0, 0, 0, 0.6), inset 0 16px 30px -12px rgba(255, 255, 255, 0.12),
    0 30px 70px -26px rgba(139, 92, 255, 0.55); }
[data-phase="off"] .orb::before { opacity: 0.35; animation-duration: 18s; }
.orb:hover { transform: translateY(-3px) scale(1.035); filter: brightness(1.08); }
.orb:active { transform: scale(0.95); transition-duration: 0.12s; }
.orb:disabled { cursor: progress; }
.orb:disabled:hover { transform: none; filter: none; }
.power { width: 64px; height: 64px; fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round;
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--a1) 90%, #fff)) drop-shadow(0 0 22px color-mix(in oklab, var(--a1) 70%, transparent));
  transition: transform 0.6s var(--spring), filter 0.6s; }
[data-phase="off"] .power { stroke: rgba(255, 255, 255, 0.78); filter: drop-shadow(0 0 8px rgba(160, 120, 255, 0.7)); }
[data-phase="busy"] .power { animation: throb 1.1s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(0.9); opacity: 0.7; } }
.orb-label { position: absolute; bottom: 36px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
/* The fox (fox3d.js), in 3D over the orb with its ears out over the rim; the orb turns to dark glass behind it */
.fox3d { position: absolute; left: -25%; top: -29%; width: 150%; height: 150%; pointer-events: none; display: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 24px color-mix(in oklab, var(--a1) 42%, transparent));
  transition: transform 0.55s var(--spring), filter 0.8s; }
.has-fox .fox3d { display: block; }
.orb:hover ~ .fox3d { transform: translateY(-3px) scale(1.035); }
.orb:active ~ .fox3d { transform: scale(0.95); transition-duration: 0.12s; }
.has-fox .power { display: none; }
.has-fox .orb-label { bottom: 13px; }
.orb-wrap.has-fox .orb {
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03) 28%, transparent 52%),
    radial-gradient(circle at 50% 118%, color-mix(in oklab, var(--a1) 60%, transparent), transparent 64%),
    linear-gradient(160deg, #261c3b, #0c0915); }
/* asleep: z's drifting up from beside its ear */
.zzz { position: absolute; right: -4%; top: 8%; width: 44px; height: 64px; pointer-events: none; display: none; }
.has-fox .zzz { display: block; }
.zzz i { position: absolute; left: 0; bottom: 0; font: 800 15px/1 var(--font); font-style: normal; opacity: 0;
  color: color-mix(in oklab, var(--a1) 40%, #fff); text-shadow: 0 0 12px var(--a1); }
[data-phase="off"] .zzz i { animation: zzz 4.2s ease-in-out infinite; }
.zzz i:nth-child(2) { font-size: 19px; animation-delay: 1.4s; }
.zzz i:nth-child(3) { font-size: 24px; animation-delay: 2.8s; }
@keyframes zzz {
  0% { transform: translate(0, 0) rotate(-12deg) scale(0.5); opacity: 0; }
  15% { opacity: 0.9; }
  70% { opacity: 0.6; }
  100% { transform: translate(30px, -54px) rotate(10deg) scale(1.1); opacity: 0; }
}
.shock { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; border: 2px solid var(--a1);
  box-shadow: 0 0 30px var(--a1); animation: shock 0.9s var(--out) forwards; }
@keyframes shock { from { transform: scale(0.96); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }

/* ── Status, mode switch ──────────────────────────────────────────────────────────────────── */

.status { text-align: center; min-height: 70px; }
.status h1 { font-size: 31px; font-weight: 780; letter-spacing: -0.03em; line-height: 1.15;
  background: linear-gradient(92deg, #fff 8%, color-mix(in oklab, var(--a1) 75%, #fff) 58%, color-mix(in oklab, var(--a2) 80%, #fff));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px color-mix(in oklab, var(--a1) 38%, transparent)); }
/* A browser without color-mix drops whole rules with it: the heading in plain ink, the orb in its two colors */
@supports not (color: color-mix(in oklab, red, blue)) {
  .status h1 { background: none; color: var(--ink); filter: none; }
  .orb { background: linear-gradient(150deg, var(--a1), var(--a2)); }
}
.status p { margin-top: 8px; font-size: 14px; color: var(--ink-2); max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap { animation: swap 0.7s var(--out); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); filter: blur(10px); } }

.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 6px rgba(0, 0, 0, 0.35); }
.seg button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; background: none; padding: 10px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--ink-3); transition: color 0.35s; }
.seg button:hover { color: var(--ink); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 8px 26px -6px color-mix(in oklab, var(--a1) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.6s var(--spring), background 0.6s; }
.seg[data-v="1"] .thumb { transform: translateX(calc(100% * var(--x))); }
.seg[data-v="0"] button:nth-of-type(1), .seg[data-v="1"] button:nth-of-type(2) { color: var(--on-ink); }
.seg.disabled { opacity: 0.6; pointer-events: none; }
.seg.three .thumb { width: calc((100% - 8px) / 3); }
.seg.three[data-v="2"] .thumb { transform: translateX(calc(200% * var(--x))); }
.seg.three[data-v="-1"] .thumb { opacity: 0; }
.seg[data-v="2"] button:nth-of-type(3), .seg.small[data-v="2"] button:nth-of-type(3) { color: #08100d; }
#net-rule { margin-top: 10px; }
.mode { margin-top: 14px; }
.mode .i { width: 17px; height: 17px; }
[data-phase="off"] .mode .thumb { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
[data-phase="off"] .mode button:nth-of-type(1) { color: var(--ink); }
.seg.small button { padding: 7px 16px; font-size: 12.5px; }
.seg.small .thumb { background: linear-gradient(135deg, var(--mint), var(--sky)); box-shadow: 0 6px 18px -6px var(--mint), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.seg.small[data-v="1"] .thumb { background: linear-gradient(135deg, var(--amber), var(--fox)); box-shadow: 0 6px 18px -6px var(--fox), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.seg.small[data-v="0"] button:nth-of-type(1), .seg.small[data-v="1"] button:nth-of-type(2) { color: #08100d; }

/* ── Cards ────────────────────────────────────────────────────────────────────────────────── */

.cards { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; padding-top: 16px; }
.card { position: relative; display: flex; align-items: center; gap: 13px; min-width: 0; padding: 12px 14px; border: 0; border-radius: var(--r-md); text-align: start;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.45s var(--spring), box-shadow 0.35s, background 0.35s; }
.card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -22px color-mix(in oklab, var(--a1) 60%, transparent); }
.card .ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  color: color-mix(in oklab, var(--a1) 55%, #fff);
  background: linear-gradient(135deg, color-mix(in oklab, var(--a1) 30%, transparent), color-mix(in oklab, var(--a2) 14%, transparent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px -12px var(--a1); transition: color 1s, box-shadow 1s; }
.card .ico .i { width: 19px; height: 19px; }
.card .body { min-width: 0; flex: 1; }
.k { font-size: 10.5px; font-weight: 650; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .v { margin-top: 3px; font-size: 15px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.card .s { margin-top: 1px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s .link { padding-block: 0; } /* Show the name: within the line, which is cut */
.card .v.warn { color: var(--amber); }
.card .v.dim { color: var(--ink-3); }
.card.link .chev { color: var(--ink-3); transition: transform 0.4s var(--spring), color 0.3s; }
.card.link:hover .chev { transform: translateX(calc(3px * var(--x))); color: var(--ink); }
/* Foxhole on your phone, offered once (app.js renderPhone): the whole row under the others, in the fox's colors */
.card.promo { grid-column: 1 / -1; padding-block: 10px; background: linear-gradient(135deg, rgba(255, 122, 26, 0.12), rgba(255, 61, 110, 0.06)); box-shadow: inset 0 0 0 1px rgba(255, 140, 80, 0.2); }
.card.promo[hidden] { display: none; }
.card.promo:hover { transform: none; }
.card.promo .ico { color: #ffd0a8; background: linear-gradient(135deg, rgba(255, 122, 26, 0.34), rgba(255, 61, 110, 0.16)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px -12px var(--fox); }
.card.promo .k { color: #ffb27a; }
.card.promo .btn { height: 36px; padding: 0 16px; font-size: 13px; }
/* a window 1000 px or wider has no room for it under the orb (a 740 px one cuts it off): at the bottom of the Locations,
   whose list makes room, in place of the tip; its words on lines of their own, its button under them */
@media (min-width: 1000px) {
  #c-phone { display: none; }
  .locations:has(#l-phone:not([hidden])) .tip { display: none; }
}
@media (max-width: 999px) { #l-phone { display: none; } }
#l-phone { flex: none; flex-wrap: wrap; row-gap: 10px; margin: 6px 4px 0; padding: 14px; }
#l-phone .body { flex-basis: calc(100% - 53px); padding-inline-end: 26px; } /* the icon's 40 and its gap: the button wraps */
#l-phone :is(.v, .s) { white-space: normal; }
#l-phone .btn { margin-inline-start: 53px; }
#l-phone .mini { position: absolute; top: 10px; inset-inline-end: 10px; }
.mini { flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.25s, color 0.25s, transform 0.3s var(--spring); }
.mini:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); transform: scale(1.06); }
.mini .i { width: 16px; height: 16px; }
.mini.done { color: var(--mint); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.4), 0 0 16px -4px var(--mint); }
.skel { display: inline-block; width: 8.5em; height: 0.95em; border-radius: 6px; vertical-align: -2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.05) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite; }
.skel.short { width: 5em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Toast ────────────────────────────────────────────────────────────────────────────────── */

/* its button (.toast-go) beside the text when all of it fits on a line next to it, else under it at the end (Home.kt Toast) */
.toast { --tone: var(--sky); position: absolute; top: 18px; left: 50%; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; row-gap: 8px;
  width: max-content; max-width: calc(100% - 48px); padding: 9px 16px 9px 13px; border-radius: 16px; font-size: 13px; font-weight: 550;
  background: rgba(16, 12, 26, 0.75); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 30px -14px var(--tone);
  opacity: 0; transform: translate(-50%, -14px) scale(0.96); pointer-events: none; cursor: pointer;
  transition: transform 0.55s var(--spring), opacity 0.35s; }
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.toast .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in oklab, var(--tone) 22%, transparent), 0 0 12px var(--tone); }
.toast span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: calc(100% - 18px); } /* by its dot, always */
.toast[data-tone="ok"] { --tone: var(--mint); }
.toast[data-tone="warn"] { --tone: var(--amber); }
.toast[data-tone="error"] { --tone: var(--rose); }
/* what the message offers (controller.js #message's act): connect where it works, or the relay */
.toast-go { flex: none; margin-inline-start: auto; padding: 6px 12px; border: 0; border-radius: 11px; font: inherit; font-size: 12px; font-weight: 700;
  color: #08100d; background: linear-gradient(135deg, var(--mint), var(--sky)); cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 16px -8px var(--mint), inset 0 1px 0 rgba(255, 255, 255, 0.4); transition: transform 0.2s var(--spring), filter 0.2s; }
.toast-go:hover { filter: brightness(1.08); transform: translateY(-1px); }
.toast-go:active { transform: scale(0.97); }
.toast-go.relay { color: #fff; background: linear-gradient(135deg, #d9a0ff, #9b4dff 55%, #ff5ad8); box-shadow: 0 6px 16px -8px #9b4dff, inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.toast-go[hidden] { display: none; }

/* ── The Update button's popover (app.js renderUpdateTip) ─────────────────────────────────────────────────────

   Radix's Popover: under the button, centered on it and kept 12 px inside the window; its arrow (an SVG, 20 by 9, a
   rounded tip, its sides curving into the edge) on the button's middle, clear of the corners (--ax: from the box's
   left). Solid, so where the arrow meets the box doesn't show: the arrow's bottom covers the box's border there, its
   sides carry it on. It comes in from the arrow (slideUpAndFade: 400 ms on --out), and goes quicker. The brand's
   (#ver-tip, app.js renderVerTip) is the same box, under the logo and the wordmark, with the version in it. */
.popover { --ax: 50%; --edge: color-mix(in oklab, var(--fox) 40%, #120e1d); position: fixed; z-index: 35; top: 0; left: 0;
  display: flex; align-items: center; gap: 2px; max-width: min(320px, calc(100vw - 24px)); padding: 4px;
  border: 1px solid var(--edge); border-radius: 16px; background: #120e1d;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 30px -14px color-mix(in oklab, var(--fox-2) 70%, transparent);
  transform-origin: var(--ax) 0; opacity: 0; visibility: hidden; transform: translateY(4px) scale(0.96);
  transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s; }
.popover.on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.4s var(--out), transform 0.4s var(--out), visibility 0s; }
.popover-arrow { position: absolute; top: -9px; left: calc(var(--ax) - 10px); width: 20px; height: 9px; overflow: visible; pointer-events: none; }
.popover-arrow .fill { fill: #120e1d; }
.popover-arrow .edge { fill: none; stroke: var(--edge); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.popover-go { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 5px 6px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: background 0.2s; }
.popover-go:hover { background: rgba(255, 255, 255, 0.05); }
.popover-go .ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #fff;
  background: linear-gradient(135deg, var(--fox), var(--fox-2)); box-shadow: 0 6px 16px -6px var(--fox-2), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.popover-go .ico .i { width: 17px; height: 17px; }
.popover .words { min-width: 0; }
.popover b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.popover .words span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 650;
  line-height: 1.3; color: #ffb27a; font-variant-numeric: tabular-nums; }
.popover .mini { width: 36px; height: 36px; color: var(--ink-3); background: none; box-shadow: none; }
.popover .mini:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.popover .mini .i { width: 15px; height: 15px; }
.popover > .words { padding: 5px 10px; }
#ver-tip .words span { color: var(--ink-2); }

/* ── Locations ────────────────────────────────────────────────────────────────────────────── */

.locations { display: flex; flex-direction: column; min-height: 0; padding: 22px 14px 14px; }
.loc-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 10px; }
.loc-head h2 { font-size: 18px; font-weight: 750; letter-spacing: -0.015em; }
#loc-count { font-size: 12px; color: var(--ink-3); }
#loc-count.none { color: #ff8a99; } /* no location answers on this network */
/* the count, and the look's button beside it (servercheck.ts): which locations answer here, its icon turning while it looks */
.loc-here { display: inline-flex; align-items: center; gap: 6px; }
#loc-check { width: 26px; height: 26px; border-radius: 9px; color: var(--ink-3); background: none; box-shadow: none; }
#loc-check .i { width: 14px; height: 14px; transform-origin: 50% 50%; }
#loc-check:hover:not(:disabled) { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
#loc-check:disabled { cursor: default; transform: none; }
#loc-check.checking .i { animation: spin 1s linear infinite; }
#loc-check[hidden] { display: none; }
#c-loc, .loc-head .close { display: none; } /* a narrow window's: the Locations as a sheet (@media max-width 760px) */
.search { position: relative; display: block; margin: 14px 4px 8px; }
.search .i { position: absolute; inset-inline-start: 13px; top: 50%; translate: 0 -50%; color: var(--ink-3); width: 17px; height: 17px; pointer-events: none; }
input:not([type="checkbox"]) { width: 100%; height: 42px; padding: 0 14px; border: 0; border-radius: 14px; outline: none;
  background: rgba(0, 0, 0, 0.26); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 14px;
  transition: box-shadow 0.3s, background 0.3s; }
input::placeholder { color: var(--ink-4); }
input:focus { background: rgba(0, 0, 0, 0.34); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--a1) 60%, transparent), 0 0 0 4px color-mix(in oklab, var(--a1) 14%, transparent), 0 0 26px -8px var(--a1); }
.search input { padding-inline-start: 40px; } /* the icon's side: the right in Persian */
/* how the list's sorted (index.html #loc-sort): one thumb colour whichever's picked, as wide as the search */
#loc-sort { display: grid; margin: 0 4px 6px; }
#loc-sort button { padding: 6px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#loc-sort[data-v] .thumb { background: linear-gradient(135deg, var(--mint), var(--sky)); box-shadow: 0 6px 18px -6px var(--mint), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 4px 10px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 18px), transparent); }
.row { position: relative; width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 14px; align-items: center; gap: 12px;
  margin-bottom: 3px; padding: 9px 12px 9px 10px; border: 0; border-radius: 16px; background: transparent; text-align: start;
  transition: background 0.3s, box-shadow 0.35s, transform 0.4s var(--spring); }
.row:hover { background: rgba(255, 255, 255, 0.05); transform: translateX(calc(3px * var(--x))); }
.row:active { transform: scale(0.985); }
.row.active { background: linear-gradient(var(--end), color-mix(in oklab, var(--a1) 17%, transparent), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--a1) 40%, transparent), 0 14px 34px -18px var(--a1); }
.row.active::before { content: ""; position: absolute; inset-inline-start: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--a1), var(--a2)); box-shadow: 0 0 12px var(--a1); }
.row.off { opacity: 0.42; }
/* its server doesn't answer on this network (servercheck.ts): dimmed, still there to try */
.row.blocked { opacity: 0.5; }
.row.blocked:hover { opacity: 0.85; }
.list .sep { height: 1px; margin: 8px 14px 10px; background: linear-gradient(90deg, transparent, rgba(201, 150, 255, 0.32) 22%, rgba(201, 150, 255, 0.32) 78%, transparent); }
.row.rise { animation-delay: calc(var(--i) * 28ms + 160ms); animation-duration: 0.8s; }
.flag { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none; background: #1c1628;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 8px 18px -8px rgba(0, 0, 0, 0.95); transition: box-shadow 0.4s; }
.flag img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.04); filter: saturate(1.18) contrast(1.05); transition: transform 0.6s var(--out); }
/* a glass bead: light from the top left, shade underneath, a bright rim */
.flag:has(img)::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: radial-gradient(90% 60% at 32% 10%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.1) 46%, transparent 62%),
    radial-gradient(120% 70% at 50% 118%, rgba(0, 0, 0, 0.5), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.3), inset 0 -3px 6px rgba(0, 0, 0, 0.4); }
/* a shine sweeping across the connected country every few seconds */
.flag:has(img)::before { content: ""; position: absolute; inset: -25%; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.8) 50%, transparent 62%); transform: translateX(-120%); }
.row:hover .flag img { transform: scale(1.14); }
.row.active .flag { box-shadow: 0 0 0 2px var(--a1), 0 0 20px -2px var(--a1), 0 8px 18px -8px rgba(0, 0, 0, 0.95); }
.row.active .flag::before { animation: flag-shine 4s var(--out) infinite; }
@keyframes flag-shine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
/* a small one in a line of text */
.flag-i { width: 1.2em; height: 1.2em; margin-inline-end: 0.45em; vertical-align: -0.24em; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.55); }
.flag.relay { color: #fff; background: linear-gradient(135deg, #d9a0ff, #9b4dff 55%, #ff5ad8); }
.flag.relay .i { width: 20px; height: 20px; stroke-width: 2.2; }
/* "Fastest here": the bolt, in the Fastest sort's colors (#loc-sort's thumb) */
.flag.fastest { color: #08100d; background: linear-gradient(135deg, var(--mint), var(--sky)); }
.flag.fastest .i { width: 19px; height: 19px; stroke-width: 2.1; fill: currentColor; fill-opacity: 0.18; }
.flag.code { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink-2); background: linear-gradient(135deg, #2e2545, #171222); }
.row .nm { font-size: 14px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .cd { margin-top: 1px; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }
/* after the code: how quickly it answers here, or that it doesn't */
.row .here { letter-spacing: 0.02em; unicode-bidi: isolate; } /* "NL · 124 ms" in a right-to-left line too */
.row .here::before { content: "·"; margin: 0 5px; color: var(--ink-4); }
.here.no { color: #ff8a99; }
.here.wait { color: var(--ink-4); }
/* "Fastest here"'s pick, after its flag; then how quickly it answers, and when that was heard */
.row .to { letter-spacing: 0.02em; }
.row .to .flag-i { width: 1.1em; height: 1.1em; margin-inline-end: 0.35em; vertical-align: -0.2em; }
/* none of Firefox VPN's locations answers here: the relay, which goes through Google (app.js renderList) */
.loc-note { display: flex; align-items: center; gap: 12px; margin: 2px 4px 8px; padding: 11px 12px 11px 14px; border-radius: 16px; font-size: 12px; color: var(--ink-3);
  background: linear-gradient(135deg, rgba(255, 90, 120, 0.1), rgba(155, 77, 255, 0.1)); box-shadow: inset 0 0 0 1px rgba(255, 138, 153, 0.22); }
.loc-note b { display: block; margin-bottom: 2px; font-size: 13px; color: #ffb3bd; }
.loc-note div { flex: 1; min-width: 0; line-height: 1.45; }
.loc-note .btn { flex: none; height: 32px; padding: 0 12px; font-size: 12px; }
#c-loc .s.no { color: #ff8a99; }
.tiers { display: flex; align-items: center; gap: 4px; }
.tier { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; }
.tier.free, .tier.on { color: #79ffcf; background: rgba(46, 242, 176, 0.1); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.24); }
.tier.relay { color: #e6c2ff; background: rgba(183, 107, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(183, 107, 255, 0.3); }
.tier.paid { padding: 4px 2px; color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tier.new { position: absolute; top: -7px; inset-inline-end: 14px; padding: 3px 7px; font-size: 9px; color: #ffb27a; background: #2a1810; box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.32); } /* the cards' (badges.ts: Shield's New, Split tunneling's Updated): top right, top left in Persian */
.label .tier.new { position: static; margin-inline-start: 8px; } /* Settings' (Foxhole on your phone): after its name */
.loc-head h2 .tier.new { position: static; margin-inline-start: 8px; vertical-align: 3px; } /* the Locations' (a wide window has no card for them) */
.tier.new[hidden] { display: none; }
.tier.off { color: var(--ink-3); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); }
.tier.none { color: var(--ink-3); letter-spacing: 0.04em; text-transform: none; font-weight: 600; font-size: 11.5px; }
.state-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); justify-self: center; }
/* its glow breathes, as a shadow that grew did (a ring from 4 px at 22% out to 7 px at 8%, a glow from 14 px to 20):
   the ring a disc that grows and fades, the glow at rest and at its widest each drawn once and one faded into the
   other. The page draws a shadow that grows again each frame, and this runs for as long as the VPN's connected */
.row.active .state-dot { background: var(--a1); }
.row.active .state-dot i { position: absolute; inset: -4px; border-radius: 50%; background: color-mix(in oklab, var(--a1) 22%, transparent); animation: pulse-ring 2.2s ease-in-out infinite; }
.row.active .state-dot::before, .row.active .state-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: pulse 2.2s ease-in-out infinite; }
.row.active .state-dot::before { box-shadow: 0 0 14px var(--a1); }
.row.active .state-dot::after { box-shadow: 0 0 20px var(--a1); opacity: 0; animation-name: pulse-wide; }
.row.connecting .state-dot { width: 14px; height: 14px; background: none; border: 2px solid color-mix(in oklab, var(--a1) 25%, transparent); border-top-color: var(--a1); animation: spin 0.8s linear infinite; }
.row.connecting .state-dot i, .row.connecting .state-dot::before, .row.connecting .state-dot::after { animation: none; } /* connecting again to the one connected: the glow at rest */
@keyframes pulse-ring { 50% { transform: scale(1.353); opacity: 0.364; } } /* 17 px across to 23, 22% to 8% */
@keyframes pulse { 50% { opacity: 0; } }
@keyframes pulse-wide { 50% { opacity: 1; } }
.row.skeleton { pointer-events: none; }
.row.skeleton .flag { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-3); }
.empty b { display: block; margin-bottom: 4px; color: var(--ink-2); }
.empty .btn { margin-top: 14px; }
.tip { display: flex; gap: 12px; margin: 6px 4px 0; padding: 13px 14px; border-radius: 18px; font-size: 12px; line-height: 1.5; color: var(--ink-3);
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.1), rgba(255, 61, 110, 0.06)); box-shadow: inset 0 0 0 1px rgba(255, 140, 80, 0.16); }
.tip .i { color: #ffb37a; margin-top: 1px; filter: drop-shadow(0 0 6px rgba(255, 140, 60, 0.8)); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: 0.55; transform: scale(0.88) rotate(12deg); } }
.tip b { color: var(--ink-2); }
.tip em { font-style: normal; color: #79ffcf; font-weight: 650; }

/* ── Buttons, switches, forms ─────────────────────────────────────────────────────────────── */

.btn { position: relative; overflow: hidden; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 17px; border: 0; border-radius: 14px; font-size: 13.5px; font-weight: 650; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.35s var(--spring), background 0.25s, box-shadow 0.3s; }
.btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--fox), var(--fox-2));
  box-shadow: 0 12px 30px -12px var(--fox-2), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.primary:hover { box-shadow: 0 14px 38px -10px var(--fox-2), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
/* a glint across, on hover */
.btn.primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%); }
.btn.primary:hover::after { transform: translateX(130%); transition: transform 0.9s var(--out); }
.btn.done { color: #03150f; background: linear-gradient(135deg, var(--mint), var(--sky)); box-shadow: 0 10px 28px -12px var(--mint); }
.btn .spin, .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.switch { position: relative; flex: none; width: 50px; height: 30px; border: 0; border-radius: 999px; padding: 0;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px var(--line-2); transition: background 0.4s, box-shadow 0.4s; }
.switch::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); transition: transform 0.5s var(--spring); }
.switch.on { background: linear-gradient(135deg, var(--mint), var(--sky)); box-shadow: 0 0 22px -4px var(--mint); }
.switch.on::after { transform: translateX(calc(20px * var(--x))); }

/* ── Sheets (right side panels) ───────────────────────────────────────────────────────────── */

.scrim { position: fixed; inset: 0; z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--out);
  background: radial-gradient(circle at 70% 50%, rgba(7, 6, 12, 0.35), rgba(7, 6, 12, 0.6)); -webkit-backdrop-filter: blur(7px) saturate(115%); backdrop-filter: blur(7px) saturate(115%); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 50; top: 14px; right: 14px; bottom: 14px; width: min(520px, calc(100% - 28px));
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(160deg, rgba(34, 27, 50, 0.86), rgba(16, 13, 26, 0.9)); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
  box-shadow: -30px 0 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateX(calc(100% + 40px)) scale(0.98); opacity: 0; visibility: hidden;
  transition: transform 0.65s var(--out), opacity 0.45s, visibility 0s 0.65s; }
.sheet.wide { width: min(760px, calc(100% - 28px)); }
.sheet.on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.sheet > header { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.sheet > header > div { flex: 1; min-width: 0; }
.sheet h2 { font-size: 19px; font-weight: 760; letter-spacing: -0.015em; }
.sheet header p { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.badge { width: 44px; height: 44px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 12px 30px -12px var(--a1), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.badge .i { width: 21px; height: 21px; }
.scroll { flex: 1; overflow-y: auto; padding: 8px 22px 24px; }
.sheet.on .group { animation: rise 0.8s var(--out) both; }
.sheet.on .group:nth-child(2) { animation-delay: 60ms; }
.sheet.on .group:nth-child(3) { animation-delay: 120ms; }
.sheet.on .group:nth-child(4) { animation-delay: 180ms; }
.sheet.on .group:nth-child(5) { animation-delay: 240ms; }
.sheet.on .group:nth-child(6) { animation-delay: 300ms; }
.group { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.group:last-child { border-bottom: 0; }
#share-group, #port-form:has(+ #login-form:not([hidden])) { border-bottom: 0; padding-bottom: 0; } /* sharing, the proxy's port and (sharing on) its login are one section */
.label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 680; }
.label .i { color: var(--ink-3); }
.label .count { margin-inline-start: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.hint b { color: var(--ink-2); }
.hint strong { color: var(--ink); }
.fine { margin-top: 16px; font-size: 12px; color: var(--ink-3); line-height: 1.55; }
/* an action inside a line of text (Show the name, Try again, Restart now, Trust it): a grey pill, so it reads as a button and not as more text */
:is(span, button:not(.card)).link { padding: 1px 9px; margin: 0 1px; border: 0; border-radius: 999px; font: inherit; font-weight: 650; color: var(--ink-2); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); transition: color 0.2s, background 0.2s, box-shadow 0.2s; }
:is(span, button:not(.card)).link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
:is(span, button:not(.card)).link:active { background: rgba(255, 255, 255, 0.16); }
/* a dialog's way out under its buttons (Cancel, Close, Connect anyway): the same pill, bigger */
:is(span, button).link.fine { align-self: center; padding: 6px 14px; }
/* the sign-in screens' other languages (app.js langLink): each one set apart, so they go in the page's order, right to
   left in Persian, as the phone's (Markup.kt FSI), not as one left-to-right run */
.lang-link .link { unicode-bidi: isolate; }
.note { font-size: 12.5px; font-weight: 600; min-height: 0; }
.note:empty { display: none; }
.note[data-tone="error"] { color: var(--rose); }
.note[data-tone="warn"] { color: var(--amber); }
.note[data-tone="ok"] { color: var(--mint); }
.row-line { display: flex; align-items: center; gap: 16px; }
.row-line > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.input-row { display: flex; gap: 10px; }
.input-row > input, .pw-wrap { flex: 1; min-width: 0; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-wrap .mini { position: absolute; right: 5px; top: 5px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chips .k { width: 100%; margin-bottom: 2px; }
.chip-btn { height: 28px; padding: 0 11px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.25s, color 0.25s, transform 0.3s var(--spring); }
.chip-btn:has(.app-ico) { display: inline-flex; align-items: center; gap: 6px; padding-inline-start: 6px; }
.app-ico { width: 18px; height: 18px; flex: none; object-fit: contain; }
.chip-btn.more { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); background: rgba(255, 255, 255, 0.09); }
.chip-btn.more .i { width: 15px; height: 15px; }
/* The app picker: a search over every app, left-aligned, as tall as the window allows */
.modal .box.picker { width: min(460px, calc(100% - 32px)); height: min(640px, calc(100dvh - 48px)); /* the viewport's: a % would follow the list's length */ padding: 22px 18px 16px; gap: 10px; text-align: left; }
.picker header { display: flex; align-items: flex-start; gap: 12px; padding: 0 4px; }
.picker header > div { flex: 1; min-width: 0; }
.picker header p { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.picker .search { margin: 4px 0 2px; }
.modal .picker input { height: 44px; text-align: left; font-size: 15px; letter-spacing: normal; }
.picker input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.app-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 2px 6px; overscroll-behavior: contain; }
.app-row { display: flex; align-items: center; gap: 12px; flex: none; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 14px; text-align: start; font: inherit; color: var(--ink); background: none; cursor: pointer; transition: background 0.2s; }
.app-row:hover, .app-row:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.app-row:focus-visible { box-shadow: inset 0 0 0 2px var(--fox); }
.app-row .app-ico { width: 30px; height: 30px; }
.app-row .app-ico.none { display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: rgba(255, 255, 255, 0.08); }
.app-row .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; overflow: hidden; }
.app-row .nm span, .app-row .nm small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-row .nm small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.app-row mark { color: var(--fox); background: none; }
.app-row .go { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity 0.2s; }
.app-row:is(:hover, :focus-visible) .go { opacity: 1; }
.app-list .empty { margin: auto 0; padding: 24px 12px; font-size: 13px; }
.app-list .empty .btn { margin-top: 14px; }
.picker .hint { padding: 0 4px; font-size: 12px; }
@media (hover: none) { .app-row .go { opacity: 1; } } /* a finger: no hover to show where it goes */
/* A short window: the list gets the room, not the count and the hint */
@media (max-height: 480px) {
  .modal .box.picker { height: calc(100dvh - 12px); padding: 10px 12px 8px; gap: 6px; }
  .picker header { align-items: center; }
  .picker h2 { font-size: 17px; }
  .picker header p, .picker #apps-hint:not([data-tone="error"]) { display: none; }
  .picker header .icon-btn { width: 34px; height: 34px; }
  .modal .picker input { height: 38px; }
  .app-row { min-height: 42px; padding: 5px 10px; }
}
.rule .m.app .app-ico { margin-inline-end: 8px; vertical-align: -4px; }
.chip-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); transform: translateY(-1px); }
/* Smart: a country's sites direct (none, Iran's or Russia's), and save data with Iran's */
.smart { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 194, 71, 0.1), rgba(255, 122, 26, 0.06)); box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.2), 0 16px 40px -26px var(--amber); }
.smart .row-line { gap: 14px; }
.smart .row-line > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-3); }
.smart b { color: var(--ink); font-size: 13.5px; }
.smart .dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--amber); background: rgba(255, 194, 71, 0.12); }
.smart .lead { flex: none; display: grid; }
.smart .lead > * { animation: pop 0.5s var(--spring); }
.smart [data-tone="warn"] { color: var(--amber); }
/* the picker under its words, the box's whole width, its options shared out alike; none's thumb a quiet grey, a
   country's the box's amber */
.smart .seg { display: grid; align-self: stretch; margin-top: -4px; }
#smart[data-v="0"] .thumb { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
#smart[data-v="0"] button:nth-of-type(1) { color: var(--ink); }
/* save data with Russia's: greyed, its words still readable */
.smart .row-line.off .dot { color: var(--ink-3); background: rgba(255, 255, 255, 0.06); }
.smart .row-line.off b { color: var(--ink-2); }
#smart[data-v="2"] .thumb { background: linear-gradient(135deg, var(--amber), var(--fox)); box-shadow: 0 6px 18px -6px var(--fox), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
/* Shield: block lists, laid out as Windscribe's R.O.B.E.R.T. */
.shield-info { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.shield-info .i { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--mint); }
.shield-lists { display: flex; flex-direction: column; border-radius: 18px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--line); }
.shield-row { gap: 14px; padding: 11px 14px; }
.shield-row + .shield-row { border-top: 1px solid var(--line); }
.shield-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-3); }
.shield-row b { color: var(--ink); font-size: 13.5px; font-weight: 650; }
.shield-row .dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); background: rgba(255, 255, 255, 0.06); transition: color 0.3s, background 0.3s; }
.shield-row.on .dot { color: var(--mint); background: rgba(46, 242, 176, 0.12); }
.shield-row [data-tone="on"] { color: var(--mint); }
.shield-row [data-tone="warn"] { color: var(--amber); }
.shield-row button.link { width: max-content; }
#shield-youtube { margin-bottom: 10px; }
#shield-custom summary { cursor: pointer; list-style: none; }
#shield-custom summary::-webkit-details-marker { display: none; }
#shield-custom summary .chev { margin-inline-start: auto; color: var(--ink-3); transition: transform 0.3s var(--out); } /* RTL flips it as every chevron */
#shield-custom[open] summary .chev { transform: rotate(90deg); }
#shield-custom form { display: flex; flex-direction: column; gap: 8px; }
.via.block { color: #ff9aaa; background: rgba(255, 90, 118, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 90, 118, 0.32), 0 0 16px -8px var(--rose); }
.via.allow { color: #79ffcf; background: rgba(46, 242, 176, 0.12); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.3), 0 0 16px -8px var(--mint); }
/* Blocked or sanctioned? The typed site's check */
.check { --tone: var(--ink-2); display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; animation: pop 0.6s var(--spring);
  background: color-mix(in srgb, var(--tone) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent); }
.check[hidden] { display: none; }
.check[data-v="blocked"] { --tone: var(--rose); }
.check[data-v="sanctioned"], .check[data-v="partly"] { --tone: var(--amber); }
.check[data-v="open"] { --tone: var(--mint); }
.check > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink-3); }
.check b { color: var(--tone); font-size: 14px; }
.check .site { margin-inline-start: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.check .ways { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.check .dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.check .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }
@media (max-width: 520px) {
  #split-check-btn { padding: 0 12px; }
  #split-check-btn span { display: none; }
  .check { flex-wrap: wrap; align-items: flex-start; }
  .check > div { flex-basis: calc(100% - 50px); }
  .check .site { display: block; margin: 2px 0 0; overflow-wrap: anywhere; }
  .check .btn { margin-inline-start: 50px; }
}
.rules { display: flex; flex-direction: column; gap: 6px; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 32px; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.3s, opacity 0.3s, transform 0.35s var(--out); }
.rule:hover { background: rgba(255, 255, 255, 0.06); }
.rule.fresh { animation: pop 0.7s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.96); } }
.rule.leaving { opacity: 0; transform: translateX(calc(30px * var(--x))) scale(0.96); }
.rule .m { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule .m.app { font-family: inherit; font-weight: 600; }
.rule .tag { margin-inline-end: 7px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); background: rgba(255, 255, 255, 0.08); }
.rule .hits { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.via { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform 0.3s var(--spring), box-shadow 0.3s; }
.via:hover { transform: scale(1.06); }
.via.vpn { color: #79ffcf; background: rgba(46, 242, 176, 0.12); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.3), 0 0 16px -8px var(--mint); }
.via.direct { color: #ffd27a; background: rgba(255, 194, 71, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.32), 0 0 16px -8px var(--amber); }
.rules .empty { margin-top: 10px; padding: 22px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }

.wizard-btn { align-self: flex-start; }
.share-box { display: flex; flex-direction: column; gap: 8px; }
.share-box:empty { display: none; }
.addr { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(46, 242, 176, 0.1), rgba(69, 182, 255, 0.06)); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.24); }
.addr .mono { flex: 1; font-size: 14px; font-weight: 600; color: #b8ffe6; }
.cmd { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px var(--line); }
.cmd .mono { flex: 1; overflow-x: auto; white-space: nowrap; color: var(--ink-2); }
.warn-line { font-size: 12.5px; color: var(--amber); }
#dns-box .steps { padding: 0; margin: 0; }
#dns-box .steps li > div { flex: 1; min-width: 0; }
#dns-box .steps .addr, #dns-box .steps .warn-line, #dns-box .steps .btn { margin-top: 8px; }
.account-line, .about { flex-direction: row !important; align-items: center; gap: 14px !important; }
.account-line .grow, .about .grow { display: flex; flex-direction: column; gap: 2px; }
.account-line span, .about span { font-size: 12.5px; color: var(--ink-3); }
/* Mozilla accounts (Settings, and the onboarding's and low-data dialog's lists): tapped, a row is the one in use */
.accounts { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: start; }
.acct-row { display: flex; padding: 8px 8px 8px 10px; border-radius: 14px; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.acct-row:hover { background: rgba(255, 255, 255, 0.05); }
.acct-row.current { background: rgba(255, 122, 26, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.32); cursor: default; }
.acct-row .grow { flex: 1; min-width: 0; }
.acct-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-row .icon-btn { height: 36px; width: 36px; }
.acct-row .gauge { width: 28px; height: 28px; flex: none; align-self: center; margin: 0 4px; overflow: visible; }
/* The ways to sign in (choices()): Foxhole's own first */
.choices { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: 16px; text-align: start; color: var(--ink); font: inherit; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform 0.2s, background 0.2s; }
.choice:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.choice.primary { background: linear-gradient(135deg, rgba(255, 122, 26, 0.2), rgba(255, 61, 110, 0.14)); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.45); }
.choice > .i { width: 22px; height: 22px; flex: none; color: var(--fox); }
.choice > span { display: flex; flex-direction: column; gap: 3px; }
.choice b { font-size: 14.5px; font-weight: 700; }
.choice span span { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.tg-card { --a1: #2aabee; --a2: #229ed9; } /* Telegram's blue, whichever the phase */
.tg-card .ico { border-radius: 50%; background: none; box-shadow: 0 10px 24px -12px var(--a1); } /* the logo is the tile */
.tg-card .ico .i { width: 40px; height: 40px; }
.about .logo { width: 40px; height: 40px; filter: drop-shadow(0 6px 16px rgba(255, 122, 26, 0.5)); }

.logs { flex: 1; overflow: auto; padding: 14px 22px 22px; font-family: var(--mono); font-size: 12px; line-height: 1.7; user-select: text; }
.logs .ln { white-space: pre-wrap; word-break: break-word; color: var(--ink-2); animation: fadeIn 0.4s var(--out); }
.logs .ln time { color: var(--ink-4); margin-right: 10px; }
.logs .ln.hit { margin: 2px -8px; padding: 2px 8px; border-radius: 8px; outline: none; color: var(--ink);
  background: color-mix(in oklab, var(--rose) 18%, transparent); box-shadow: inset 2px 0 0 var(--rose); }
.logs .empty { margin-top: 40px; font-family: var(--font); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }

/* ── Password popup ───────────────────────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
#notice-modal, #wifi-modal, #take-modal, #wizard, #tvwait-modal { z-index: 80; } /* above the sign-in screens (.overlay): an account signed in to again from there, a relay imported or set up before signing in */
.modal .box { width: min(420px, calc(100% - 40px)); padding: 30px 28px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(160deg, rgba(38, 30, 56, 0.9), rgba(17, 14, 28, 0.94)); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
  opacity: 0; transform: translateY(24px) scale(0.92); transition: transform 0.6s var(--spring), opacity 0.35s; }
.modal.on { pointer-events: auto; }
.modal.on .box { opacity: 1; transform: none; }
.modal h2 { font-size: 20px; font-weight: 760; }
.modal p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.modal input { text-align: center; font-size: 18px; letter-spacing: 0.2em; height: 48px; }
.modal input:placeholder-shown { font-size: 15px; letter-spacing: normal; }
.modal .actions { display: flex; gap: 10px; margin-top: 4px; }
.modal .howto { width: min(240px, 70%); align-self: center; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
#unentitled-modal p b { color: var(--ink); }
.modal .actions .btn { flex: 1; }
/* the buttons wrap where they don't fit side by side, the primary (the relay's) on top */
:is(#blocked-modal, #relay-modal, #count-modal) .actions { flex-wrap: wrap-reverse; }
:is(#blocked-modal, #relay-modal, #count-modal) .actions .btn { flex: 1 1 auto; }
/* The relay's setup: a wide modal over Settings, a step at a time */
.wizard, .modal.backdrop { background: rgba(7, 6, 12, 0.55); opacity: 0; transition: opacity 0.35s; }
.wizard.on, .modal.backdrop.on { opacity: 1; }
.wizard .box { width: min(880px, calc(100% - 40px)); max-height: calc(100% - 40px); padding: 0; text-align: start; gap: 0; overflow: hidden; }
.wizard header { display: flex; align-items: center; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.wizard header > div { flex: 1; min-width: 0; }
.wizard header p { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.wz-stepper { display: flex; gap: 8px; margin: 0; padding: 14px 22px 0; }
.wz-stepper li { flex: 1; list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 650; color: var(--ink-3);
  background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); transition: color 0.3s, background 0.3s, box-shadow 0.3s; }
.wz-stepper span { flex: none; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: rgba(255, 255, 255, 0.07); }
.wz-stepper span .i { width: 13px; height: 13px; stroke-width: 2.6; }
.wz-stepper .on { color: var(--ink); background: rgba(255, 122, 26, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.4); }
.wz-stepper .on span { color: #fff; background: linear-gradient(135deg, var(--fox), var(--fox-2)); }
.wz-stepper .done { color: var(--mint); }
.wz-stepper .done span { color: #03150f; background: var(--mint); }
.wz-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px 6px; animation: fadeIn 0.4s var(--out); }
.wz-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.wz-top:not(:has(.wz-shot)) { grid-template-columns: 1fr; }
.wz-body h3 { margin: 0 0 10px; font-size: 16px; font-weight: 740; }
.wz-body .steps { margin: 0; padding: 0; }
.wz-body .buttons { justify-content: flex-start; margin: 0; }
.wz-shot { margin: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 34px -18px rgba(0, 0, 0, 0.9); }
.wz-shot img { display: block; width: 100%; }
.wz-shot figcaption { padding: 6px 10px; font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-align: center; }
.wz-shot.zoom figcaption { display: none; }
/* a step of several clicks: the line the screenshot shows stands out, the ones done fade */
.wz-body .steps.clicks li { cursor: pointer; padding: 6px 8px; margin: -6px -8px; border-radius: 12px; transition: background 0.2s, color 0.2s; }
.wz-body .steps.clicks li.on { color: var(--ink); background: rgba(255, 122, 26, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.35); }
.wz-body .steps.clicks li.done { opacity: 0.55; }
/* clicked: the screenshot over the whole popup, clicked again: back */
.wz-shot.zoom { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 18px; border-radius: inherit; cursor: zoom-out; background: rgba(7, 6, 12, 0.94); }
.wz-shot.zoom img { width: auto; max-width: 100%; max-height: 100%; border-radius: 12px; }
.wizard input { text-align: left; font-size: 13px; letter-spacing: normal; height: 42px; }
.wizard input.mono { font-family: var(--mono); }
.mini.big { width: 42px; height: 42px; border-radius: 14px; }
.wizard .code { position: relative; }
/* scrolls both ways, a line never wraps: what's copied is the button's, not a selection */
.wizard .code pre { margin: 0; max-height: 280px; overflow: auto; padding: 12px 0; border-radius: 14px; font: 11.5px/1.6 var(--mono); color: #e9e4f5;
  background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px var(--line); counter-reset: ln; user-select: text; }
.wizard .code .ln { display: block; padding-right: 16px; white-space: pre; }
.wizard .code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.2em; margin-right: 14px; padding-right: 10px; text-align: right;
  color: var(--ink-4); border-right: 1px solid var(--line); user-select: none; }
.wizard .code .btn { position: absolute; top: 8px; right: 14px; height: 32px; padding: 0 12px; font-size: 12px; background: rgba(30, 24, 44, 0.9); }
.wizard .code .c { color: #8a8299; font-style: italic; } .wizard .code .s { color: #b5f5a6; } .wizard .code .kw { color: #d68cff; }
.wizard .code .fn { color: #7fd7ff; } .wizard .code .n, .wizard .code .re { color: #ffb86b; }
.wizard .code mark { color: #1d1200; background: var(--amber); border-radius: 4px; padding: 0 2px; }
.wizard .note { padding: 0 22px; min-height: 0; }
.wizard .actions { justify-content: space-between; padding: 14px 22px 20px; margin: 0; }
.wizard .actions .btn { flex: none; min-width: 120px; }
#manual-modal .box { width: min(480px, calc(100% - 40px)); }
#notes-modal .box { width: min(480px, calc(100% - 40px)); }
.notes { max-height: min(340px, 50dvh); overflow-y: auto; text-align: left; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; padding-right: 6px; }
.notes > * { margin: 0; }
.notes-tg { margin: 12px 0 0; text-align: center; }
.notes > * + * { margin-top: 6px; }
.notes h3 { font-size: 13px; font-weight: 700; color: var(--ink); }
.notes > * + h3 { margin-top: 14px; }
.notes h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.notes > * + h4 { margin-top: 10px; }
.notes p, .notes .li { padding-left: calc(var(--d, 0) * 1.1em); }
.notes .li { display: flex; gap: 0.45em; }
.notes .li .m { flex: none; min-width: 0.65em; color: var(--ink-3); }
.notes b { color: var(--ink); }
.notes code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); }
.notes pre { white-space: pre-wrap; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.notes pre code { padding: 0; background: none; }

/* ── Foxhole's news (app.js showPost, drawPosts; news.ts): a post's dialog, and Settings → News ─────────────────────
   A post reads in its own language's direction (its dir, set with it), whichever the window's is. Its words take the
   room the window has: the title and the buttons stay, the words between them scroll. */
#post-modal .box { width: min(540px, calc(100% - 40px)); max-height: calc(100dvh - 40px); padding-top: 24px; gap: 12px; }
.modal p.kicker { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; color: #ffb27a; }
.kicker .i { width: 15px; height: 15px; }
.kicker #post-date { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--ink-3); }
.kicker #post-date::before { content: "·"; margin-inline-end: 7px; }
#post-title { line-height: 1.3; overflow-wrap: anywhere; }
.notes.post { flex: 0 1 auto; min-height: 60px; max-height: none; padding: 2px 0; padding-inline-end: 6px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#post-body[dir="ltr"] { direction: ltr; text-align: left; }
#post-body[dir="rtl"] { direction: rtl; text-align: right; }
.notes.post > * + * { margin-top: 10px; }
.notes.post > .li + .li { margin-top: 4px; }
.notes.post :is(p, .li) { padding-left: 0; padding-inline-start: calc(var(--d, 0) * 1.1em); }
.notes.post :is(p, .li, h4) { white-space: pre-line; } /* a line's end written in the words (markdown.ts: two spaces, or a \) ends the line here too */
.notes.post h4 { font-size: 15px; }
.notes.post > * + h4 { margin-top: 16px; }
.notes.post .link { white-space: normal; }
/* a picture, at its own shape from the start (the feed has its size): the words don't jump as it comes */
.pic { position: relative; display: block; width: min(100%, calc(var(--w) * 1px), calc(340px * var(--w) / var(--h))); aspect-ratio: var(--w) / var(--h); margin-inline: auto; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  color: inherit; font: inherit; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.pic img, .video img { display: block; width: 100%; height: 100%; object-fit: cover; animation: still-in 0.35s ease-out both; }
:is(.pic, .video .play).wait { background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 100%) 0 0 / 200% 100%; animation: shimmer 1.6s linear infinite; }
.pic.none { display: grid; place-items: center; aspect-ratio: auto; min-height: 56px; padding: 12px 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; } /* it didn't come: what it shows, in words */
button.pic { cursor: pointer; transition: box-shadow 0.25s; }
button.pic:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 34px -18px var(--fox); }
/* a video: its poster and a play button, till that's pressed; then YouTube's or Aparat's own player in their place */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b0912; box-shadow: inset 0 0 0 1px var(--line); }
.video .play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; font: inherit;
  background: radial-gradient(120% 90% at 50% 40%, rgba(255, 122, 26, 0.22), rgba(255, 61, 110, 0.08) 45%, transparent 75%), #0b0912; }
.video .play img { position: absolute; inset: 0; }
.video .play::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7, 6, 12, 0.05), rgba(7, 6, 12, 0.45)); transition: opacity 0.3s; }
.video .play:hover::before { opacity: 0.6; }
.video .knob { position: relative; z-index: 2; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--fox), var(--fox-2));
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4); transition: transform 0.4s var(--spring); }
.video .play:hover .knob { transform: scale(1.08); }
.video .knob .i { width: 26px; height: 26px; margin-left: 3px; stroke: none; }
.video .site { position: absolute; z-index: 2; top: 10px; inset-inline-start: 10px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: rgba(7, 6, 12, 0.62); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.notes.post .video-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-top: 6px; padding: 0; font-size: 12.5px; color: var(--ink-3); }
.notes.post .video-cap .link { margin-inline-start: auto; }
.video-cap .link .i { width: 13px; height: 13px; margin-inline-end: 5px; vertical-align: -2px; }
.notes.post .video-note { margin-top: 4px; padding: 0; font-size: 12px; color: var(--ink-3); }
#post-modal .actions { flex-wrap: wrap-reverse; }
#post-modal .actions .btn { flex: 1 1 auto; height: auto; min-height: 42px; padding-block: 8px; white-space: normal; overflow-wrap: anywhere; }
/* Settings' card, in the fox's colors whichever the phase; the list */
.news-card { --a1: #ff7a1a; --a2: #ff3d6e; width: 100%; cursor: pointer; }
.posts { display: flex; flex-direction: column; gap: 8px; }
.post-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px 13px 16px; border: 0; border-radius: 16px; text-align: start; color: var(--ink); font: inherit; cursor: pointer;
  background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s, box-shadow 0.2s; }
.post-row:hover { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line-2); }
.post-row.fresh { background: rgba(255, 122, 26, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.3); }
.post-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.post-row .when { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.post-row .when .tier.new { position: static; }
.post-row b { font-size: 14.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.post-row .ex { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }
.post-row .chev { flex: none; color: var(--ink-3); transition: transform 0.4s var(--spring), color 0.3s; }
.post-row:hover .chev { transform: translateX(calc(3px * var(--x))); color: var(--ink); }
#manual-modal code { overflow-wrap: anywhere; }
.lock-orb { width: 66px; height: 66px; margin: 0 auto 2px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--fox) 55%, var(--fox-2));
  box-shadow: 0 18px 44px -12px var(--fox), inset 0 1px 0 rgba(255, 255, 255, 0.45); animation: glowPulse 2.6s ease-in-out infinite; }
.lock-orb .i { width: 28px; height: 28px; stroke-width: 2; }
.lock-orb.relay { background: linear-gradient(135deg, #e6b3ff, #b76bff 55%, #ff6bd6); box-shadow: 0 18px 44px -12px #b76bff, inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.cert-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
#cert-state.ok { color: #79ffcf; }
#cert-state.warn { color: var(--amber); }
/* Settings' relay part (VPN relay, its certificate): one card in a deep purple, the magic in Foxhole */
.relay-zone { margin: 14px -8px; padding: 0 18px; border-radius: 22px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 107, 214, 0.16), transparent 58%),
    radial-gradient(100% 70% at 0% 100%, rgba(124, 92, 255, 0.24), transparent 62%),
    linear-gradient(160deg, #2b1158, #1b0b3a 52%, #12072a);
  box-shadow: inset 0 0 0 1px rgba(201, 150, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 22px 50px -26px rgba(155, 77, 255, 0.7); }
.relay-zone .group { border-bottom: 0; }
.relay-zone .group + .group { border-top: 1px solid rgba(201, 150, 255, 0.16); }
.relay-zone .label .i { color: #d9a0ff; filter: drop-shadow(0 0 6px rgba(183, 107, 255, 0.85)); }
.sheet.on .relay-zone { animation: rise 0.8s var(--out) 180ms both; } /* rises as one */
.sheet.on .relay-zone .group { animation: none; }
/* the relay's own buttons, and the data ring counting its requests */
#trust-modal.relay .btn.primary, #relay-modal .btn.primary, #cert-group .btn.primary, .relay-send .btn.primary, #blocked-modal .btn.primary, #notice-modal.relay .btn.primary { background: linear-gradient(135deg, #b76bff, #ff6bd6); }
#trust-modal.relay .btn.primary:hover, #relay-modal .btn.primary:hover, #blocked-modal .btn.primary:hover, #notice-modal.relay .btn.primary:hover { box-shadow: 0 14px 38px -10px #b76bff, inset 0 1px 0 rgba(255, 255, 255, 0.35); }
/* Mozilla blocked or refusing the country: the relay's way through, in its purple; and a relay come from another device */
#blocked-modal .lock-orb, #notice-modal.relay .lock-orb { background: linear-gradient(135deg, #e6b3ff, #b76bff 55%, #ff6bd6); box-shadow: 0 18px 44px -12px #b76bff, inset 0 1px 0 rgba(255, 255, 255, 0.45); }
#blocked-modal .steps li::before { background: linear-gradient(135deg, #b76bff, #ff6bd6); box-shadow: 0 6px 16px -6px #b76bff; }
#relay-more { margin-top: 2px; }
body[data-relay] #g-ring stop:first-child { stop-color: #b76bff; }
body[data-relay] #g-ring stop:last-child { stop-color: #ff6bd6; }
/* Connect with no internet: an amber Wi-Fi struck through, the wait beside its spinner, the way past a wrong look */
#offline-modal .lock-orb { background: linear-gradient(135deg, #ffe08a, var(--amber) 48%, #ff9f1a); box-shadow: 0 18px 44px -12px var(--amber), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
#offline-modal .waiting { align-self: center; justify-content: center; margin: 0; text-align: start; }
#offline-modal .waiting .spin { flex: none; border-top-color: var(--amber); }
#offline-anyway { margin-top: 0; }
/* A relay's test (app.js renderRelayTest): its steps, each ✓, ! or ✕ once done, a spinner while under way */
.relay-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 2px 0; text-align: start; }
.relay-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.relay-steps li[data-tone="wait"] { color: var(--ink-3); }
.relay-steps .mark { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; }
.relay-steps li[data-tone="ok"] .mark { background: color-mix(in oklab, var(--mint) 22%, transparent); color: var(--mint); }
.relay-steps li[data-tone="ok"] .mark::before { content: "✓"; }
.relay-steps li[data-tone="warn"] .mark { background: color-mix(in oklab, var(--amber) 22%, transparent); color: var(--amber); }
.relay-steps li[data-tone="warn"] .mark::before { content: "!"; }
.relay-steps li[data-tone="error"] .mark { background: color-mix(in oklab, var(--rose) 22%, transparent); color: var(--rose); }
.relay-steps li[data-tone="error"] .mark::before { content: "✕"; }
.relay-steps li[data-tone="busy"] .mark { width: 14px; height: 14px; margin: 3px 2px 0; border: 2px solid var(--line-2); border-top-color: #b76bff; animation: spin 0.8s linear infinite; }
.relay-steps li[data-tone="wait"] .mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
#relay-check-state .relay-steps { margin: 8px 0 6px; }
#relay-check-state .relay-steps li { font-size: 12.5px; }
#relaytest-modal .relay-steps { align-self: stretch; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
#relaytest-modal[data-tone="ok"] .lock-orb { box-shadow: 0 18px 44px -12px var(--mint), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
#relaytest-modal[data-tone="warn"] .lock-orb { background: linear-gradient(135deg, #ffe08a, var(--amber) 48%, #ff9f1a); }
#relaytest-modal[data-tone="error"] .lock-orb { background: linear-gradient(135deg, #ff8a9b, var(--rose) 48%, #d9364a); }
#relaytest-modal[data-tone="busy"] .lock-orb .i { animation: relay-pulse 1.6s ease-in-out infinite; }
@keyframes relay-pulse { 50% { opacity: 0.45; transform: scale(0.9); } }
#relaytest-modal .actions { flex-wrap: wrap; }
#relaytest-from:empty, #relaytest-text:empty { display: none; }
.shake { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }

/* ── Full-window overlays: signing in, restoring ──────────────────────────────────────────── */

.overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 70px 24px 24px;
  background: radial-gradient(900px 600px at 50% 30%, rgba(255, 122, 26, 0.1), transparent 70%), rgba(7, 6, 12, 0.8);
  -webkit-backdrop-filter: blur(26px) saturate(140%); backdrop-filter: blur(26px) saturate(140%); opacity: 0; visibility: hidden; transition: opacity 0.6s var(--out), visibility 0s 0.6s; }
.overlay.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.overlay.on.wait { transition: opacity 0.6s var(--out) 1.2s, visibility 0s 1.2s; }
.overlay::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 52px; -webkit-app-region: drag; }
.overlay .box { width: min(600px, 100%); max-height: 100%; overflow-y: auto; padding: 38px 40px 34px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.overlay.on .box > * { animation: rise 0.9s var(--out) both; }
.overlay.on .box > :nth-child(2) { animation-delay: 70ms; }
.overlay.on .box > :nth-child(3) { animation-delay: 140ms; }
.overlay.on .box > :nth-child(4) { animation-delay: 210ms; }
.overlay.on .box > :nth-child(5) { animation-delay: 280ms; }
.overlay.on .box > :nth-child(n + 6) { animation-delay: 350ms; }
.overlay h2 { font-size: 26px; font-weight: 780; letter-spacing: -0.025em;
  background: linear-gradient(92deg, #fff 20%, #ffc79e 60%, #ff8b6b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.overlay p { font-size: 14px; color: var(--ink-2); line-height: 1.6; max-width: 480px; }
.overlay p.warn { color: var(--amber); }
.overlay .fine { margin: 0; }
.fox-hero { width: 104px; height: 104px; filter: drop-shadow(0 10px 34px rgba(255, 122, 26, 0.6)) drop-shadow(0 0 60px rgba(255, 61, 110, 0.35)); animation: float 4.5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px) rotate(-2deg); } }
.fox-spin { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.fox-spin .orbit { position: absolute; inset: 0; border-radius: 50%; animation: spin 1.6s linear infinite;
  background: conic-gradient(from 0turn, transparent 0 0.6turn, rgba(255, 194, 71, 0.6) 0.85turn, #ff8a2a 0.99turn, transparent 1turn);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); filter: drop-shadow(0 0 8px #ff8a2a); }
.fox-spin .fox-hero { width: 86px; height: 86px; }
.ok-line { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 650; color: #9dffd9;
  background: rgba(46, 242, 176, 0.1); box-shadow: inset 0 0 0 1px rgba(46, 242, 176, 0.26), 0 0 24px -10px var(--mint); }
.err-box { width: 100%; padding: 12px 14px; border-radius: 14px; text-align: start; font-size: 12.5px; line-height: 1.5; color: #ffb3c0; white-space: pre-line;
  background: rgba(255, 90, 118, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 90, 118, 0.25); }
.steps { width: 100%; display: flex; flex-direction: column; gap: 10px; margin: 4px 0; text-align: start; counter-reset: step; }
.steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.steps li::before { counter-increment: step; content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--fox), var(--fox-2)); box-shadow: 0 6px 16px -6px var(--fox-2); }
.steps b, .steps kbd { color: var(--ink); }
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1); }
.overlay .box.wide { width: min(980px, 100%); }
.cols { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.snippet { position: relative; width: 100%; text-align: left; }
/* wrapped, not scrolled sideways: a soft wrap adds no newline to what's selected and copied */
.snippet pre { margin: 0; padding: 14px 16px; border-radius: 16px; font: 11.5px/1.6 var(--mono); color: #e9e4f5; white-space: pre-wrap; overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px var(--line); user-select: text; }
.snippet .btn { position: absolute; top: 8px; right: 8px; height: 32px; padding: 0 12px; font-size: 12px; }
.snippet .s { color: #b5f5a6; } .snippet .kw { color: #e5a6ff; } .snippet .fn { color: #7fd7ff; } .snippet .op { color: #ffb86b; }
.waiting { display: inline-flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.waiting .spin { border-color: rgba(255, 255, 255, 0.14); border-top-color: var(--fox); }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* A short window (a 1366×768 laptop, the taskbar taken off): a smaller orb, so the cards still fit; a narrow one (below)
   has a row of cards more */
@media (max-height: 730px), (min-width: 761px) and (max-width: 999px) and (max-height: 880px) {
  .orb-wrap { --orb: 168px; margin: 40px 0 30px; }
  .hero { padding: 20px 24px 18px; }
  .mode { margin-top: 10px; }
  .cards { gap: 10px; padding-top: 12px; }
  .card { padding: 10px 14px; }
  .tip { font-size: 11.5px; padding: 11px 12px; }
  .power { width: 54px; height: 54px; }
  .orb-label { bottom: 28px; font-size: 9.5px; }
  .has-fox .orb-label { bottom: 9px; }
  .status { min-height: 60px; }
  .status h1 { font-size: 27px; }
}

/* A narrow window (a tiling window manager's half a screen and less, or one made so): up to 1100 px, the Locations a
   little narrower, so the cards keep their room. */
@media (min-width: 761px) and (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) clamp(300px, calc(74vw - 440px), 388px); } /* 34vw again at 1100 */
}
/* 761 to 999 px (two columns would cut the Proxy card's address): one column, the cards two by two under the orb. Tall,
   the Locations below, in two columns; short, a sheet from the side that the Location card opens (as a narrower one's). Shorter
   than all of it: the column scrolls. */
@media (min-width: 761px) and (max-width: 999px) {
  .ver { display: none; }
  .account .name { max-width: 150px; }
  .titlebar:has(#update:not([hidden])) .account .name { display: none; } /* room for the Update button */
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(min-content, 1fr); overflow-y: auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 999px) and (min-height: 1000px) {
  .stage { grid-template-rows: auto minmax(260px, 1fr); }
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; align-content: start; }
  .list > :not(.row) { grid-column: 1 / -1; }
}
@media (min-width: 761px) and (max-width: 999px) and (max-height: 999px) {
  #c-loc { display: flex; grid-column: 1 / -1; }
  #c-loc .flag { width: 40px; height: 40px; }
  .locations { position: fixed; z-index: 50; top: 14px; right: 14px; bottom: 14px; width: min(420px, calc(100% - 28px)); animation: none;
    background: linear-gradient(160deg, rgba(34, 27, 50, 0.86), rgba(16, 13, 26, 0.9)); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
    box-shadow: -30px 0 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translateX(calc(100% + 40px)) scale(0.98); opacity: 0; visibility: hidden; transition: transform 0.65s var(--out), opacity 0.45s, visibility 0s 0.65s; }
  .locations.on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  [dir="rtl"] .locations { right: auto; left: 14px; transform: translateX(calc(-100% - 40px)) scale(0.98);
    box-shadow: 30px 0 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
  [dir="rtl"] .locations.on { transform: none; }
  .loc-head { align-items: center; gap: 10px; }
  .loc-here { margin-inline-start: auto; }
  .loc-head .close { display: inline-flex; }
}
/* and with the smaller orb (above), a little less room around it: the three rows of cards fit in a 740 px window */
@media (min-width: 761px) and (max-width: 999px) and (max-height: 880px) {
  .hero { padding: 16px 24px 14px; }
  .orb-wrap { margin: 34px 0 26px; }
}
/* Two columns too short for the orb and its cards: they scroll, the Locations beside them as tall */
@media (min-width: 1000px) and (max-height: 660px) {
  .stage { grid-template-rows: minmax(min-content, 1fr); overflow-y: auto; }
}

/* A narrow window (main.js's minWidth is narrower), or a short one by touch: one column that scrolls, panels from the bottom. */
@media (max-width: 760px), (max-height: 600px) and (pointer: coarse) {
  html, body { height: auto; min-height: 100%; }
  body { display: block; overflow: hidden auto; }
  /* the title bar stays on top, glass once the page is under it (::after; without scroll timelines, from the start), and
     what's scrolled to (a control focused) stops below it */
  body::after { content: ""; position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 60px;
    background: rgba(7, 6, 12, 0.72); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
  @supports (animation-timeline: scroll()) {
    body::after { animation: glassIn linear both; animation-timeline: scroll(root); animation-range: 0 40px; }
  }
  @keyframes glassIn { from { opacity: 0; } }
  .titlebar { position: sticky; top: 0; z-index: 31; height: 60px; gap: 6px; padding: 0 12px 0 16px; }
  html { scroll-padding-top: 60px; }
  .brand { gap: 8px; }
  .brand .logo { width: 28px; height: 28px; }
  .brand .word { font-size: 18px; }
  .ver, .chip .k, .account .name, .pill.update span { display: none; }
  .chip, .icon-btn, .pill { height: 38px; gap: 6px; border-radius: 13px; }
  .icon-btn, .pill.update { width: 38px; padding: 0; justify-content: center; }
  .chip.account { padding: 0 5px; }
  .chip.data { padding: 0 11px 0 3px; }
  .chip .gauge { width: 30px; height: 30px; }
  .stage { display: flex; flex-direction: column; gap: 14px; padding: 0 12px 14px; }
  .hero { padding: 18px 14px 14px; }
  .orb-wrap { --orb: 176px; margin: 46px 0 36px; }
  .power { width: 56px; height: 56px; }
  .orb-label { bottom: 30px; font-size: 10px; }
  .has-fox .orb-label { bottom: 10px; }
  .status { min-height: 0; max-width: 100%; }
  .status h1 { font-size: 27px; }
  .status p { max-width: calc(100vw - 52px); }
  .seg button { padding: 10px 18px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 18px; }
  /* the Locations: a sheet the Location card opens, not a long list at the bottom */
  #c-loc { display: flex; }
  #c-loc .flag { width: 40px; height: 40px; }
  .locations { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(100% - 12px);
    padding: 18px 8px 10px; border-radius: 26px 26px 0 0; animation: none;
    background: linear-gradient(160deg, rgba(34, 27, 50, 0.86), rgba(16, 13, 26, 0.9)); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
    transform: translateY(calc(100% + 40px)); opacity: 0; visibility: hidden; transition: transform 0.65s var(--out), opacity 0.45s, visibility 0s 0.65s; }
  .locations.on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .loc-head { align-items: center; gap: 10px; }
  .loc-here { margin-inline-start: auto; }
  .loc-head .close { display: inline-flex; }
  .toast { top: 12px; max-width: calc(100% - 24px); }
  .sheet, .sheet.wide { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% - 12px);
    padding: 0; border-radius: 26px 26px 0 0; transform: translateY(calc(100% + 40px)); }
  .sheet.on { transform: none; } /* after .sheet.wide above, or the Logs (wide) would stay below the screen */
  .sheet > header { gap: 12px; padding: 18px 16px 14px; }
  .sheet header p { font-size: 12px; }
  .badge { width: 40px; height: 40px; border-radius: 14px; }
  .scroll { padding: 4px 16px 20px; }
  .logs { padding: 12px 16px 18px; }
  .relay-zone { margin: 14px -6px; padding: 0 14px; }
  .wizard .box { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .wizard header { padding: 16px 16px 12px; }
  .wz-stepper { gap: 6px; padding: 12px 16px 0; }
  .wz-stepper li { justify-content: center; padding: 6px; font-size: 0; } /* the numbers alone */
  .wz-top { grid-template-columns: minmax(0, 1fr); }
  .wz-body { padding: 14px 16px 6px; }
  .wizard .actions { padding: 12px 16px 16px; }
  .overlay { padding: 16px 12px 12px; }
  .overlay .box { padding: 30px 20px 26px; }
  .overlay h2 { font-size: 23px; }
}
/* wide enough (a narrow window, not the narrowest): the cards two by two, the Location's across */
@media (min-width: 560px) and (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #c-loc { grid-column: 1 / -1; }
}
/* a finger: no hover look that stays after a tap */
@media (hover: none) {
  :is(.row, .card, .btn, .chip, .icon-btn, .mini, .chip-btn, .via, .orb):hover:not(:active), .orb:hover:not(:active) ~ .fox3d, .card.link:hover .chev { transform: none; }
  .orb:hover { filter: none; }
}

/* ── Reduce Motion (Settings; app.js renderMotion, motion.ts): <html data-motion="still"> ───────────────────────────
   Nothing moves about (each animation at its end at once, nothing slides, zooms, lifts, breathes or pulses), nothing
   follows the pointer, nothing's blurred, glowing (a filter's pass on the GPU) or drawn in 3D (fox3d.js stops; the
   power icon's back), no particles or drifting light; the glass, with nothing blurred behind it, solid enough to read.
   But it isn't stiff: what changes fades (0.2 s, in place: a panel, a dialog, a toast, the status, a hover's colors,
   the phase's colors a little slower), a switch's knob and a choice's thumb go over (short, no bounce), and what says
   it's working keeps turning: the comet round the orb while connecting, and the spinners. Before the core first says
   (the very first start), as the system asks. */
:root[data-motion="still"] *, :root[data-motion="still"] ::before, :root[data-motion="still"] ::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  transition-property: opacity, background-color, border-color, box-shadow !important;
  transition-duration: 0.2s !important; transition-timing-function: ease-out !important; transition-delay: 0s !important;
  scroll-behavior: auto !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; }
/* what's inherited fades only where it did, not again in each child (Chrome starts each its own, a step behind; a
   panel's insides would stay visible, and in the way, after it's gone) */
:root[data-motion="still"] :is(.seg button, .card .ico, .card.link .chev, .mini, :is(span, button:not(.card)).link, .chip-btn, .shield-row .dot, .wz-stepper li, .wz-body .steps.clicks li) {
  transition-property: color, opacity, background-color, border-color, box-shadow !important; }
:root[data-motion="still"] :is(.sheet, .locations, .popover, .overlay) { transition-property: opacity, visibility, background-color, border-color, box-shadow !important; }
:root[data-motion="still"] body { transition: --a1 0.5s ease, --a2 0.5s ease !important; }
:root[data-motion="still"] .switch::after, :root[data-motion="still"] .seg .thumb { transition-property: transform !important; }
/* coming and going in place, as a fade: not sliding in from the side, or up and grown */
:root[data-motion="still"] :is(.sheet, .locations, .popover, .modal .box, .rule.leaving) { transform: none; }
:root[data-motion="still"] .overlay.on.wait { transition-delay: 1.2s !important; } /* still only once it's taken a while */
@keyframes still-in { from { opacity: 0; } }
:root[data-motion="still"] :is(.rise, .swap, .check, .rule.fresh, .logs .ln, .wz-body, .smart .lead > *, .pill.update:not(.busy)) { animation: still-in 0.2s ease-out both !important; }
/* turning, as ever (but not where it can't be seen: the offline dialog's and Restoring's, there all along) */
:root[data-motion="still"] .ring { animation: spin 0.95s linear infinite !important; }
:root[data-motion="still"] .spin, :root[data-motion="still"] :is(.row.connecting .state-dot, .relay-steps li[data-tone="busy"] .mark) { animation: spin 0.8s linear infinite !important; }
:root[data-motion="still"] #loc-check.checking .i { animation: spin 1s linear infinite !important; }
:root[data-motion="still"] .fox-spin .orbit { animation: spin 1.6s linear infinite !important; }
:root[data-motion="still"] :is(.blob, .embers, .noise, .ring.glow, .shock, .fox3d, .zzz), :root[data-motion="still"] .orb::before, :root[data-motion="still"] .spot::after { display: none !important; }
:root[data-motion="still"] .orb-wrap { transform: none; }
:root[data-motion="still"] :is(.row, .card, .btn, .chip, .icon-btn, .mini, .chip-btn, .via, .orb, .toast-go):hover, :root[data-motion="still"] :is(.card.link, .post-row):hover .chev, :root[data-motion="still"] .video .play:hover .knob { transform: none; }
:root[data-motion="still"] .toast { background: rgba(16, 12, 26, 0.96); transform: translate(-50%, 0); }
:root[data-motion="still"] .overlay { background: radial-gradient(900px 600px at 50% 30%, rgba(255, 122, 26, 0.1), transparent 70%), rgb(7, 6, 12); }
:root[data-motion="still"] .modal .box { background: linear-gradient(160deg, rgb(38, 30, 56), rgb(17, 14, 28)); }
:root[data-motion="still"] .sheet { background: linear-gradient(160deg, rgb(34, 27, 50), rgb(16, 13, 26)); }
:root[data-motion="still"] .scrim { background: rgba(7, 6, 12, 0.7); }
@media (min-width: 761px) and (max-width: 999px) and (max-height: 999px), (max-width: 760px), (max-height: 600px) and (pointer: coarse) {
  :root[data-motion="still"] .locations { background: linear-gradient(160deg, rgb(34, 27, 50), rgb(16, 13, 26)); } /* a sheet there */
  :root[data-motion="still"] body::after { background: rgba(7, 6, 12, 0.96); }
}
/* What's closed doesn't move: a dialog, a sheet or a screen that isn't up is still laid out, only clear, and what turns
   or glows in it for ever was drawn each frame all the same: by the page itself where it's a shadow that glows (each
   dialog's badge, 18 of them: over half of a processor's core, with nothing to see). Only what goes on for ever: what
   plays once has played by the time it's opened, as before. With Reduce Motion too, over the spinners it keeps turning. */
:is(.modal, .overlay, .sheet):not(.on) :is(.lock-orb, .lock-orb .i, .fox-hero, .orbit, .spin, .mark, .skel, .wait) { animation: none !important; }
:root[data-motion="still"] :is(.modal, .overlay, .sheet):not(.on) :is(.spin, .orbit, .relay-steps li[data-tone="busy"] .mark) { animation: none !important; }
@media (min-width: 761px) and (max-width: 999px) and (max-height: 999px), (max-width: 760px), (max-height: 600px) and (pointer: coarse) {
  /* the Locations, a sheet there */
  .locations:not(.on) :is(.state-dot, .state-dot i, .tip .i, .skel, #loc-check .i), .locations:not(.on) :is(.flag, .state-dot)::before, .locations:not(.on) .state-dot::after { animation: none !important; }
  :root[data-motion="still"] .locations:not(.on) :is(.row.connecting .state-dot, #loc-check.checking .i) { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion]) *, :root:not([data-motion]) ::before, :root:not([data-motion]) ::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ── A sign-in from another device (app.js tvPanel), and signing a TV or phone in from here ─────────────────────── */

.tvpair { width: 100%; display: flex; align-items: center; gap: 30px; text-align: start; }
/* Data: the month's VPN data by site */
.data-left { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.data-left small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
#data-pace[data-tone="warn"] { color: var(--amber); }
.site-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 64px 112px 32px; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.site-row .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
.site-row .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.site-row .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(var(--end), var(--mint), var(--sky)); }
.site-row .n { text-align: end; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.site-row .tag-direct { font-size: 12px; color: var(--amber); padding: 0 6px; }
.site-row .btn { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.site-row { min-height: 46px; }
.site-row > :nth-child(n+4) { justify-self: end; } /* a button or a tag: the bars line up either way */
.site-row .icon-btn { width: 32px; height: 32px; }
.site-row.is-hidden > :not(.icon-btn) { opacity: 0.45; }
@media (max-width: 520px) { .site-row { grid-template-columns: minmax(0, 1fr) 40px 56px 100px 32px; gap: 8px; padding-inline-start: 12px; } }
.tg-share { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.tg-share > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.tg-share b { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; }
.tg-qr { flex: none; width: 112px; height: 112px; border-radius: 12px; }
.tv-qr { flex: none; width: 236px; height: 236px; border-radius: 16px; box-shadow: 0 14px 50px -10px rgba(255, 122, 26, 0.45); }
.tv-how { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tv-how .steps { padding: 0; margin: 0; }
.tv-code { font: 800 40px/1 var(--mono); letter-spacing: 0.14em; color: #fff; padding-inline-start: 38px; text-shadow: 0 0 24px rgba(255, 122, 26, 0.6); }
.tv-net { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); text-align: start;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.tv-net b { color: var(--ink); }
.tv-net > .i { flex: none; width: 18px; height: 18px; color: var(--fox); }
.tv-net.warn { color: var(--amber); }
.tv-nets { display: flex; flex-direction: column; gap: 8px; }
#tvwait-modal .box { width: min(760px, calc(100% - 40px)); }
/* Foxhole on your phone (app.js drawPhone): laid out as the sign-in's QR code, with the app's download here under its steps */
#phone-modal .box { width: min(760px, calc(100% - 40px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
#phone-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#phone-body > p { margin: 0; }
#phone-modal .hint { text-align: start; }
#phone-modal .mono { direction: ltr; unicode-bidi: isolate; } /* an address, a command: as typed, in Persian too */
.tv-net.ok > .i { color: var(--mint); }
.tv-net > .spin { flex: none; border-color: rgba(255, 255, 255, 0.14); border-top-color: var(--fox); }
.phone-hint { display: flex; align-items: flex-start; gap: 8px; }
.phone-hint > .i { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--fox); }
/* a relay sent from here: in the relay's purple */
.relay-send .tv-net > .i { color: #d9a0ff; }
.relay-send .lock-orb { background: linear-gradient(135deg, #e6b3ff, #b76bff 55%, #ff6bd6); box-shadow: 0 18px 44px -12px #b76bff, inset 0 1px 0 rgba(255, 255, 255, 0.45); }
#tvsend-relay.on { background: linear-gradient(135deg, #b76bff, #ff6bd6); }
#tvsend-relay-wrap { text-align: start; }
#tvsend-relay-wrap .label .i { color: #d9a0ff; }
.relay-note { color: #e6c2ff; }
.tv-acct { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-3); text-align: start; }
.tv-acct[hidden] { display: none; }
.tv-acct select { height: 42px; padding: 0 12px; border: 0; border-radius: 14px; font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--line-2); }
.tv-cam { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #000; }
.tv-cam[hidden] { display: none; }
.tv-cam video { width: 100%; height: 100%; object-fit: cover; }
.tv-cam i { position: absolute; inset: 18%; border-radius: 14px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 999px rgba(0, 0, 0, 0.35); }
.tv-code-form { display: flex; gap: 10px; }
.tv-code-form input { flex: 1; font-family: var(--mono); text-transform: uppercase; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.row-btns .btn { flex: 1; }
@media (max-width: 640px) {
  .tvpair { flex-direction: column; gap: 18px; }
  .tv-code { padding-inline-start: 0; text-align: center; }
}

/* ── Share Foxhole (share.ts): its QR code, what it shares, and importing a link ─────────────────────────────────── */
#give-modal .box, #take-modal .box { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
.give-qr { flex: none; align-self: center; width: min(280px, 100%); aspect-ratio: 1; border-radius: 16px; box-shadow: 0 14px 50px -10px rgba(255, 122, 26, 0.45); }
.give-what { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; text-align: start; }
.give-what:empty { display: none; }
.give-what li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.give-what li > .i { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--mint); }
.give-what li.warn { color: var(--amber); }
.give-what li.warn > .i { color: var(--amber); }
#give-modal .row-line, #give-modal .hint { text-align: start; }
#give-modal .addr .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#take-link { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border: 0; border-radius: 14px; font: 12px/1.45 var(--mono); color: var(--ink);
  background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--line-2); word-break: break-all; }
#take-link:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fox); }

html[lang="ru"] { --font: Vazirmatn, Golos, "Golos Latin", var(--system-font); } /* Vazirmatn: "فارسی" in Settings → Language */

/* ── Persian: right to left (app.js sets dir="rtl") ───────────────────────────────────────── */

[dir="rtl"] { --x: -1; --end: 270deg; }
/* spaced letters break up Persian's joined ones: only codes keep their spacing */
[dir="rtl"] *:not(input, code, kbd, .mono, .tv-code) { letter-spacing: normal; }
[dir="rtl"] input::placeholder { letter-spacing: normal; }
/* Latin runs (addresses, codes, commands, names) read left to right inside the Persian */
[dir="rtl"] :is(.mono, code, kbd, b, .check .site) { unicode-bidi: isolate; }
[dir="rtl"] :is(.mono, code, kbd, .check .site) { direction: ltr; }
[dir="rtl"] :is(pre, .logs, .notes, .snippet, .wizard .code) { direction: ltr; text-align: left; }
[dir="rtl"] #c-proxy .v { direction: ltr; text-align: right; }
/* the rules (Split tunneling's sites and apps, Shield's sites) and the Data sheet's sites, laid out as in English: most
   of their names are Latin */
[dir="rtl"] :is(.rule, .site-row) { direction: ltr; --x: 1; --end: 90deg; }
[dir="rtl"] .rule .hits { direction: rtl; } /* "12 مورد": its number first, read right to left */
[dir="rtl"] .rule .tag { unicode-bidi: isolate; } /* "برنامه" left of the app's name, a Persian name too */
/* what's typed is Latin (a port, a key, a link, a code), the search's may be Persian; a placeholder is in Persian */
[dir="rtl"] :is(input:not([dir]), textarea) { direction: ltr; }
[dir="rtl"] input:placeholder-shown { direction: rtl; }
[dir="rtl"] .search input { padding-left: 14px; padding-right: 40px; }
[dir="rtl"] svg:has(> use:is([href="#i-chevron"], [href="#i-news"])) { scale: -1 1; } /* the megaphone speaks the way the words run */
/* the sheets come in from the left; in a narrow window (below), up from the bottom as before */
[dir="rtl"] .sheet { right: auto; left: 14px; transform: translateX(calc(-100% - 40px)) scale(0.98);
  box-shadow: 30px 0 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
[dir="rtl"] .sheet.on { transform: none; }
@media (max-width: 760px), (max-height: 600px) and (pointer: coarse) {
  [dir="rtl"] .sheet, [dir="rtl"] .sheet.wide { left: 0; right: 0; transform: translateY(calc(100% + 40px)); }
  [dir="rtl"] .sheet.on { transform: none; }
}
