/* Design tokens of lk.zapret.moe (redesign of 22.10.2026).
   Dark: near-black ground, dark rows, large pill buttons — a white primary
   and a dark secondary. Light: grey dotted ground, white cards with a soft
   shadow, a black primary. The theme follows the device; the switch in the
   header (js/theme.js) pins it with data-theme on <html>. */

/* Onest (SIL OFL 1.1, fonts/Onest.OFL.txt), variable weight 100–900, served by the
   site itself in three subsets; ₽ lives in latin-ext. Owner 22.10.2026: a font with
   more character than Inter, the same family as the status site. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-cyrillic.woff2?v=68e5e01d62) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-latin-ext.woff2?v=14e7d3079b) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-latin.woff2?v=052df74533) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Inter stays as the fallback after Onest: a glyph Onest lacks is drawn by it. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/static/fonts/inter-cyrillic.woff2?v=71d5ee93cc) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/static/fonts/inter-latin-ext.woff2?v=34b9c504ca) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/static/fonts/inter-latin.woff2?v=3100e775e8) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --ground: #111111;
  --dots: rgba(255, 255, 255, 0.035);
  --card: #1b1b1b;
  --card-2: #232323;
  --card-3: #2c2c2c;
  --hover: #262626;
  --seg-on: #333333;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --ink: #f5f5f5;
  --ink-2: #c9c9c9;
  --muted: #8e8e8e;
  --faint: #5e5e5e;
  --primary: #f5f5f5;
  --primary-ink: #111111;
  --secondary: #2a2a2a;
  --secondary-ink: #f5f5f5;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.55);
  --glass: rgba(70, 70, 70, 0.55);
  --glass-line: rgba(255, 255, 255, 0.22);
  /* Scrollbar thumb (css/base.css): thin, on a transparent track. */
  --scroll-thumb: rgba(255, 255, 255, 0.16);
  --scroll-thumb-hover: rgba(255, 255, 255, 0.3);

  --blue: #4f8cf7;
  --sky: #93b4f5;
  --purple: #8b6cf6;
  --yellow: #f6c56f;
  --red: #ef5350;
  --green: #22c55e;
  --gray: #6b6b6b;
  --ok: #34c759;
  --ok-soft: rgba(52, 199, 89, 0.14);
  --warn: #f6c56f;
  --warn-soft: rgba(246, 197, 111, 0.14);
  --bad: #ff6b66;
  --bad-soft: rgba(239, 83, 80, 0.14);
  --info-soft: rgba(79, 140, 247, 0.14);

  /* One spacing scale and one type scale for every page (26.10.2026). */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --t-xs: 12px;
  --t-sm: 13px;
  --t-base: 14px;
  --t-md: 15px;
  --t-lg: 17px;
  --t-xl: 22px;
  --t-2xl: 30px;
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-field: 14px;
  --radius-button: 999px;
  --sans: "Onest", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* Tiles: a pastel fill says the state, no outline (22.10.2026). */
  --tile: #202020;
  --tile-hover: #272727;
  --tile-ok: color-mix(in srgb, #34c759 11%, #1d1d1d);
  --tile-ok-hover: color-mix(in srgb, #34c759 17%, #1f1f1f);
  --tile-warn: color-mix(in srgb, #f6c56f 11%, #1d1d1d);
  --tile-bad: color-mix(in srgb, #ef5350 12%, #1d1d1d);
  --tile-info: color-mix(in srgb, #4f8cf7 12%, #1d1d1d);
  --tile-lock: #191919;
  /* Brand colours of the protocol logos, lifted for a dark ground. */
  /* Gold of the rich tiers (css/components.css). */
  --gold-a: #f6c56f;
  --gold-b: #ffe08a;
  --gold-c: #e8a93a;
  --gold-ink: #5c3d00;
  --brand-xray: #e9e9e9;
  --brand-hysteria: #ffbc00;
  --brand-naive: #a78bfa;
  --brand-wireguard: #e0565b;
  --brand-warp: #f38020;
  --brand-telegram: #2aabee;
  --brand-android: #3ddc84;
  --brand-apple: #f2f2f2;
  --brand-linux: #f2f2f2;
  --brand-openwrt: #00b5e2;
  --brand-windows: #4cc2ff;
  /* Chart series (dataviz palette, validated 26.10.2026 on #1b1b1b: CVD ΔE 9.4, contrast ≥ 3:1). */
  --series-in: #3987e5;
  --series-out: #d95926;
  --series-past: #5e5e5e;
  /* Traffic by protocol: palette slots 1–5 in fixed order (validated 26.10.2026). */
  --series-vless: #3987e5;
  --series-hysteria2: #d95926;
  --series-awg: #199e70;
  --series-wireguard: #c98500;
  --series-telemt: #d55181;
  --series-naive: #6a4ce2;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #ebebeb;
    --dots: rgba(0, 0, 0, 0.09);
    --card: #ffffff;
    --card-2: #f4f4f3;
    --card-3: #ececeb;
    --hover: #f2f2f1;
    --seg-on: #ffffff;
    --line: rgba(0, 0, 0, 0.06);
    --line-strong: rgba(0, 0, 0, 0.12);
    --ink: #111111;
    --ink-2: #3a3a3a;
    --muted: #8a8a8a;
    --faint: #b5b5b5;
    --primary: #111111;
    --primary-ink: #ffffff;
    --secondary: #f0f0ef;
    --secondary-ink: #111111;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.14);
    --glass: rgba(255, 255, 255, 0.6);
    --glass-line: rgba(0, 0, 0, 0.08);
    --scroll-thumb: rgba(0, 0, 0, 0.18);
    --scroll-thumb-hover: rgba(0, 0, 0, 0.32);
    --ok: #16a34a;
    --ok-soft: rgba(22, 163, 74, 0.1);
    --warn: #b7791f;
    --warn-soft: rgba(183, 121, 31, 0.12);
    --bad: #dc2626;
    --bad-soft: rgba(220, 38, 38, 0.08);
    --info-soft: rgba(79, 140, 247, 0.1);
    --radius-button: 12px;

    --gold-a: #c98a1b;
    --gold-b: #e0a52e;
    --gold-c: #9a6408;
    --gold-ink: #4a3000;
    --tile: #f4f4f3;
    --tile-hover: #ececeb;
    --tile-ok: #e9f7ee;
    --tile-ok-hover: #ddf2e4;
    --tile-warn: #fbf1df;
    --tile-bad: #fcebea;
    --tile-info: #e8f0fe;
    --tile-lock: #f1f1f0;
    --brand-xray: #111111;
    --brand-hysteria: #e0a400;
    --brand-naive: #6d4de0;
    --brand-wireguard: #88171a;
    --brand-warp: #f38020;
    --brand-telegram: #26a5e4;
    --brand-android: #2bb36a;
    --brand-apple: #111111;
    --brand-linux: #111111;
    --brand-openwrt: #0095bb;
    --brand-windows: #0078d4;
    --series-in: #2a78d6;
    --series-out: #eb6834;
    --series-past: #b5b5b5;
    --series-vless: #2a78d6;
    --series-hysteria2: #eb6834;
    --series-awg: #1baf7a;
    --series-wireguard: #eda100;
    --series-telemt: #e87ba4;
    --series-naive: #9887ef;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --ground: #ebebeb;
  --dots: rgba(0, 0, 0, 0.09);
  --card: #ffffff;
  --card-2: #f4f4f3;
  --card-3: #ececeb;
  --hover: #f2f2f1;
  --seg-on: #ffffff;
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.12);
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #8a8a8a;
  --faint: #b5b5b5;
  --primary: #111111;
  --primary-ink: #ffffff;
  --secondary: #f0f0ef;
  --secondary-ink: #111111;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.14);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-line: rgba(0, 0, 0, 0.08);
  --scroll-thumb: rgba(0, 0, 0, 0.18);
  --scroll-thumb-hover: rgba(0, 0, 0, 0.32);
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, 0.1);
  --warn: #b7791f;
  --warn-soft: rgba(183, 121, 31, 0.12);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.08);
  --info-soft: rgba(79, 140, 247, 0.1);
  --radius-button: 12px;

  --gold-a: #c98a1b;
  --gold-b: #e0a52e;
  --gold-c: #9a6408;
  --gold-ink: #4a3000;
  --tile: #f4f4f3;
  --tile-hover: #ececeb;
  --tile-ok: #e9f7ee;
  --tile-ok-hover: #ddf2e4;
  --tile-warn: #fbf1df;
  --tile-bad: #fcebea;
  --tile-info: #e8f0fe;
  --tile-lock: #f1f1f0;
  --brand-xray: #111111;
  --brand-hysteria: #e0a400;
  --brand-naive: #6d4de0;
  --brand-wireguard: #88171a;
  --brand-warp: #f38020;
  --brand-telegram: #26a5e4;
  --brand-android: #2bb36a;
  --brand-apple: #111111;
  --brand-linux: #111111;
  --brand-openwrt: #0095bb;
  --brand-windows: #0078d4;
  --series-in: #2a78d6;
  --series-out: #eb6834;
  --series-past: #b5b5b5;
  --series-vless: #2a78d6;
  --series-hysteria2: #eb6834;
  --series-awg: #1baf7a;
  --series-wireguard: #eda100;
  --series-telemt: #e87ba4;
  --series-naive: #9887ef;
}

/* Reset, type and the page ground. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--ground); }

/* Thin scrollbars on the page and on every scrolling box (owner 04.11.2026): a quiet
   thumb of the theme on a transparent track. scrollbar-color is inherited from <html>,
   scrollbar-width is not, so it is set on every element. A browser that knows neither
   (Safari) reads the ::-webkit-scrollbar rules; Chrome and Firefox skip that block. */
html { scrollbar-color: var(--scroll-thumb) transparent; }
*, *::before, *::after { scrollbar-width: thin; }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--scroll-thumb) padding-box; border: 2px solid transparent; border-radius: 99px; }
  ::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--ground);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.4px);
  background-size: 18px 18px;
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
p a, li a, .note a, .hint a, .muted a { color: var(--ink); font-weight: 500; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
b, strong { font-weight: 600; }
code { font-family: var(--mono); font-size: .92em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

::selection { background: color-mix(in srgb, var(--blue) 35%, transparent); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Page frames: the side menu and the phone's bottom bar of a signed-in page
   (app.html, nav.html), the content grids, and the centred stage of the
   sign-in and payment pages. */

/* ——— Signed-in frame ——— */
body.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); align-items: start; }

.rail {
  position: sticky; top: 12px;
  display: flex; flex-direction: column; gap: 2px;
  height: calc(100dvh - 24px); margin: 12px 0 12px 12px; padding: 16px 12px;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.rail:focus { outline: none; }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.rail-close { display: none; }
/* The menu is a tree (owner 26.10.2026: «nested»): groups, their sections, and under
   the open section the page's way down to it, every step a link. The page being read
   is bright and bold, without a pill (owner: «the background is also removed»). */
.rail-tree, .rail-tree ul, .rail-path { list-style: none; margin: 0; padding: 0; }
.rail-tree { display: grid; gap: 2px; }
.rail-tree ul { display: grid; gap: 2px; }
.rail-title { margin: 16px 10px 6px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.rail-item, .rail-step {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
  border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.rail-item > span:last-child, .rail-step > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item:hover, .rail-step:hover { background: var(--hover); color: var(--ink); }
.rail-item.on-path, .rail-step.on-path { color: var(--ink); }
.rail-item.here, .rail-step.here { color: var(--ink); font-weight: 650; }
.rail-item.here::after, .rail-step.here::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}
/* Each step of the way hangs one level deeper on a thread from its parent's icon. */
.rail-path { margin-left: 20px; padding-left: 12px; border-left: 1.5px solid var(--line-strong); }
.rail-path .rail-path { margin-left: 8px; }
.rail-step { min-height: 34px; font-size: 13.5px; }
.rail-step::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 9px; border-top: 1.5px solid var(--line-strong);
}
.rail-step.here::before { border-color: var(--blue); }
.rail-item .ico { display: grid; place-items: center; width: 22px; font-size: 15px; line-height: 1; }
.rail-item .ico .icon { width: 18px; height: 18px; }
.rail-item .ico .logo { width: 18px; height: 18px; }
.rail-hint { margin: 10px 10px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand small { color: var(--muted); font-weight: 400; font-size: 13px; }

.main { min-width: 0; padding: 12px 28px 32px 24px; width: 100%; }
.main > main, .main > .sheet, .main > .dash { margin-top: 0; }
/* The header keeps only the page's controls; the page's name is in the menu and,
   for screen readers and the phone, in the header's h1. */
/* On a computer the header is only for screen readers: the content starts at the top. */
.app .top { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding: 14px 6px 2px; }
.rail-foot form { margin: 0 0 0 auto; }
/* «Выйти на всех устройствах» — своей строкой под «Выйти» (cabinet.close_all_sessions). */
.rail-foot form.everywhere { flex-basis: 100%; margin: 0; display: flex; justify-content: flex-end; }
.rail-foot .controls { display: flex; gap: 6px; }
/* The menu button lives on phones only; the round button's own display would show it everywhere. */
.top > .menu-button { display: none; }
.menu-button .icon { width: 22px; height: 22px; }
.mobile-only { display: none; }

.scrim { display: none; }
.dock { display: none; }

.foot { padding: 20px 4px 8px; color: var(--muted); font-size: 13px; }
.foot p + p { margin-top: 4px; }

/* ——— The account page's footer (owner 28.11.2026, «improve the buttons at the bottom»): the number
   support asks for with its copy button, the language as one tap on a segment, the project's channels as
   real buttons. Every control is 44 px to tap; the same on a phone, only wider. ——— */
.foot-account { display: grid; gap: var(--s-4); }
.foot-id { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.foot-id code { color: var(--ink); font: 500 13px var(--mono); user-select: all; -webkit-user-select: all; }
.foot-id button.copy { min-height: 44px; }
.foot-language { display: grid; gap: var(--s-2); justify-items: start; }
.foot-label { margin: 0; }
.seg { display: inline-flex; max-width: 100%; gap: 4px; padding: 4px; border-radius: 999px; background: var(--secondary); }
.seg-item {
  min-height: 44px; padding: 0 18px; border-radius: 999px; background: transparent; color: var(--secondary-ink);
  font-size: 14px; font-weight: 500; letter-spacing: 0;
}
.seg-item:hover { filter: none; background: var(--card-3); }
.seg-item.current, .seg-item.current:hover { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.seg-item .icon { width: 16px; height: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.button.foot-link { min-height: 44px; padding: 0 18px 0 14px; font-size: 14px; font-weight: 500; }
.foot-link .logo { width: 18px; height: 18px; }
body:not(.app) > .foot .foot-links { justify-content: center; }
@media (max-width: 640px) {
  .foot-language, .seg { width: 100%; }
  .seg-item { flex: 1 1 auto; padding: 0 10px; white-space: nowrap; }
  .foot-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .button.foot-link { justify-content: flex-start; }
}

/* ——— Content grids ——— */
/* The dashboard over the whole width (owner 24.10.2026: «Main + side stacks»,
   «Full width, fixed side», «History in main, top-up sticky»). A row of four
   tiles, then two columns that stack on their own: the main one (links, plan,
   history) takes the extra width, the side one (top-up) keeps --side and
   follows the page where the screen is tall enough to hold it whole. Rows
   are not shared below the tiles, so no hole stands beside a short card. The
   last tile stands over the side column. */
.dash { --side: 420px; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 16px; align-items: start; }
.dash > .tiles, .dash > .span-all, .dash > .dash-main.wide { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) var(--side); gap: 16px; }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 1101px) and (min-height: 760px) {
  .dash-side { position: sticky; top: 16px; }
}
.sheet { display: grid; gap: 16px; }
.sheet > .note.in-bot { padding: 0 4px; }

/* ——— Stage: one centred card (sign-in, bills, purchase) ——— */
body:not(.app) > .top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 20px 24px 0; }
body:not(.app) > .foot { max-width: 1240px; margin: 0 auto; padding: 8px 24px 32px; text-align: center; }
.stage { display: grid; place-items: center; min-height: calc(100dvh - 150px); padding: 24px 16px; }
.gate {
  width: 100%; max-width: 460px; padding: 32px 28px; text-align: center;
  background: var(--card); border-radius: 28px; box-shadow: var(--shadow);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }

/* ——— Phone ——— */
@media (max-width: 1500px) {
  .dash { --side: 380px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
}

/* A phone keeps the tiles in two columns (owner 28.11.2026: «the main page is
   too big for small screens»): the subscription and the last payment take a
   row each, the balance and the auto-renew share one (css/pages.css, «Phone:
   a compact home page»). The gaps between cards shrink with the padding. */
@media (max-width: 640px) {
  .dash, .dash-main, .dash-side { gap: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 900px) {
  body.app { display: block; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .main { padding: 4px 16px 24px; }
  .app .top { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0 12px; }
  .mobile-only { display: inline-flex; }
  .top > .menu-button { display: grid; flex: none; }
  /* The phone's menu is folded away: the header names the page beside the menu button. */
  .page-name { position: static; width: auto; height: auto; overflow: hidden; clip: auto; flex: 1; min-width: 0; font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; text-overflow: ellipsis; }

  /* The side menu becomes a sheet from the bottom, opened by #menu. */
  .rail {
    position: fixed; z-index: 40; left: 8px; right: 8px; bottom: 8px; top: auto;
    height: auto; max-height: min(78dvh, 720px); margin: 0;
    border-radius: 28px; box-shadow: var(--shadow-pop);
    transform: translateY(calc(100% + 24px)); visibility: hidden;
    transition: transform .38s var(--ease), visibility 0s linear .38s;
  }
  .rail:target, .rail.open { transform: none; visibility: visible; transition: transform .42s var(--spring), visibility 0s; }
  .rail-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); color: var(--ink); }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
  }
  .rail:target ~ .scrim, .rail.open ~ .scrim { opacity: 1; pointer-events: auto; }

  .dock {
    display: flex; position: fixed; z-index: 20; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%); gap: 4px; padding: 8px 10px;
    background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-radius: 26px; box-shadow: var(--shadow-pop);
  }
  .dock a {
    position: relative; display: grid; place-items: center; width: 52px; height: 46px; border-radius: 16px;
    color: var(--muted); text-decoration: none; transition: color .15s var(--ease), background-color .15s var(--ease);
  }
  .dock a:hover { color: var(--ink); }
  .dock a.here { color: var(--ink); }
  .dock a.here::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
  .dock .icon { width: 22px; height: 22px; }
  .dock span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  .stage { min-height: calc(100dvh - 120px); padding: 16px 12px; }
  .gate { padding: 26px 20px; border-radius: 24px; }
}

/* ——— A section page with help beside it (templates/section.html) ——— */
/* The page's content takes the width; «Как подключить» or a legend stands beside it
   and follows the page on a tall screen. Below 1100 px the help goes under the content. */
.page-grid { --aside: 360px; display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: var(--s-4); align-items: start; }
.page-grid > .sheet { min-width: 0; }
.aside { display: grid; gap: var(--s-4); min-width: 0; }
@media (min-width: 1101px) and (min-height: 760px) { .aside { position: sticky; top: 16px; } }
@media (max-width: 1500px) { .page-grid { --aside: 320px; } }
@media (max-width: 1100px) { .page-grid { grid-template-columns: minmax(0, 1fr); } }

/* Shared pieces: cards, buttons, notices, pills, forms, links with QR,
   rows, switch, segmented control, swap card, checkboxes, tables. */

/* ——— Cards ——— */
/* A card lays its blocks out with one gap, not with margins of its own blocks
   (owner 26.10.2026: «elements touch», «buttons too close» — a block after a
   summary strip had lost its margin to a rule for another neighbour). A heading
   holds its hint closer; an inline block keeps its own width. */
.card, .panel {
  display: flex; flex-direction: column; gap: var(--s-4);
  min-width: 0; padding: 22px 24px;
  background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.card > *, .panel > * { margin-block: 0; }
.card > :is(a.button, button, .pill, .chip, .state, .tag, .support-mark), .panel > :is(a.button, button, .pill, .chip, .state, .tag, .support-mark) { align-self: flex-start; }
.card > h2, .panel > h2 { font-size: var(--t-lg); line-height: 1.3; text-wrap: balance; }
/* A hint spans its card (owner 22.10.2026: text clustered on the left of wide panels). */
.card .hint, .panel .hint { color: var(--muted); font-size: var(--t-md); line-height: 1.55; margin: 0; text-wrap: pretty; }
.card > h2 + .hint, .panel > h2 + .hint { margin-top: calc(var(--s-2) - var(--s-4)); }
.panel[id], .card[id] { scroll-margin-top: 16px; }

/* ——— Buttons: a primary pill and a quiet secondary ——— */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: var(--radius-button);
  background: var(--primary); color: var(--primary-ink);
  font: 600 15px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--spring), filter .15s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.button:hover, button:hover { filter: brightness(.94); }
.button:active, button:active { transform: scale(.97); }
.button.wide, button.wide { width: 100%; }
.quiet, .button.quiet, button.quiet { background: var(--secondary); color: var(--secondary-ink); }
.quiet:hover { filter: none; background: var(--card-3); }
button.small, .button.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
button .icon, .button .icon { width: 17px; height: 17px; }
button[disabled] { opacity: .5; cursor: default; }
.danger, button.danger { background: var(--bad-soft); color: var(--bad); box-shadow: none; }

/* A row of actions: one height, one gap; a form inside is just its button. */
.actions, .choices { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.actions form, .choices form { margin: 0; display: contents; }
.actions.end { justify-content: flex-end; }
.actions.devices .button { min-width: 160px; }
.actions > .button, .actions > form > button, .actions > details > summary { min-height: 40px; }
.actions > .button.small, .actions > form > button.small, .actions > details > summary.small { min-height: 38px; }

/* Digits: Onest's fixed-width figures read «19» as «1 9» (owner 26.10.2026), so they
   are proportional except in a table's columns and while a number rolls (js). */
.counting { font-variant-numeric: tabular-nums; }

/* ——— Notices and pills ——— */
.notice { padding: 12px 16px; border-radius: var(--radius-inner); background: var(--info-soft); color: var(--ink); font-size: 14px; text-align: left; }
.notice.warn { background: var(--bad-soft); color: var(--bad); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--card-3); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill.paid, .pill.available { background: var(--ok-soft); color: var(--ok); }
.pill.pending, .pill.risk_hold { background: var(--warn-soft); color: var(--warn); }
.pill.refunded { background: var(--bad-soft); color: var(--bad); }
.pill.closed { background: var(--card-3); color: var(--muted); }
.state { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.state.none { background: var(--warn-soft); color: var(--warn); }
.tag { margin-left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--card-3); color: var(--muted); font-size: 12px; font-weight: 500; }

.note { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ——— Links of subscriptions and keys, QR codes ——— */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; align-items: start; }
.link { min-width: 0; padding: 16px; background: var(--card-2); border-radius: 18px; }
.link h3 { margin: 0 0 10px; font-size: 14px; }
.link .notice { margin-top: 4px; }
.link > .button { margin-bottom: 10px; }
.url {
  display: block; padding: 12px 14px; border-radius: var(--radius-field);
  background: var(--card);
  font: 400 12.5px/1.55 var(--mono); color: var(--ink); word-break: break-all;
  user-select: all; -webkit-user-select: all; cursor: text;
}
.act { margin-top: 10px; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.qr { display: block; margin-top: 12px; width: 200px; height: 200px; padding: 10px; border-radius: 18px; background: #ffffff; image-rendering: pixelated; }

/* ——— Rows: a list of things with an end column ——— */
.rows { display: grid; gap: 2px; margin: 0 -10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; transition: background-color .15s var(--ease); }
.row:hover { background: var(--hover); }
.row-ico { flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 500; }
.row-sub { color: var(--muted); font-size: 12.5px; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-end .sum { font-weight: 600; }
.seg-dot { width: 10px; height: 10px; border-radius: 4px; background: var(--gray); }

/* ——— Switch: a form button that sets a value ——— */
button.switch {
  position: relative; flex: none; width: 52px; min-height: 0; height: 32px; padding: 0; border-radius: 999px;
  background: var(--card-3);
}
button.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--spring);
}
button.switch[aria-checked="true"] { background: var(--ok); box-shadow: none; }
button.switch[aria-checked="true"]::after { transform: translateX(20px); }
button.switch:active { transform: none; }
button.switch .switch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ——— Segmented control (radio buttons) ——— */
.segmented { display: flex; gap: 2px; margin: 0; padding: 3px; border-radius: 14px; background: var(--card-2); }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 36px; padding: 0 10px; border-radius: 11px; white-space: nowrap;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.segmented input:checked + span { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ——— Checkbox with a drawn box ——— */
.check { position: relative; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check .box {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px;
  border: 1.5px solid var(--faint); background: transparent; color: transparent; transition: all .18s var(--ease);
}
.check .box .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.check input:checked + .box { background: var(--ink); border-color: var(--ink); color: var(--card); }
.check input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ——— Swap card: what you pay → what you get ——— */
.swap { position: relative; display: grid; gap: 6px; }
.swap-cell { padding: 16px 18px; border-radius: 20px; background: var(--card-2); }
.swap-label { display: block; color: var(--muted); font-size: 13px; }
.swap-row { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.swap-row input[type="number"] {
  width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
  font: 600 30px/1.1 var(--sans); letter-spacing: -0.03em; -moz-appearance: textfield;
}
.swap-row input::-webkit-inner-spin-button, .swap-row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.swap-row input[type="number"]:focus { outline: none; border: 0; box-shadow: none; }
.swap-cell:focus-within { }
.swap-row .unit { color: var(--muted); font-size: 22px; font-weight: 600; }
.swap-total { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.swap-total:not(.live) { font-size: 18px; color: var(--ink-2); }
.swap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.swap-limits { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* What the balance becomes: one strip under the amount, the badge and the quip in it. */
.swap-result { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 14px 18px; border-radius: 20px; background: var(--card-2); }
.swap-result-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.swap-result-line .swap-label { flex-basis: 100%; }
.swap-result .rich-quip:empty { display: none; }
/* Rich tiers (owner 22.10.2026: «the higher the number, the more animation»).
   A container carries data-rich="0".."5" or "out": the top-up amount
   (js/forms.js::enhanceTopup, shares of the form's ceiling) and the balance
   tile (templates/account.html, roubles). Each tier adds to the one below:
   1 glow · 2 gold · 3 moving sheen and a glowing card · 4 sparkles and a
   badge · 5 a crown, a pulse, more sparkles and a confetti burst. */
.rich-value { transition: color .3s var(--ease), text-shadow .3s var(--ease); }
.rich-glow { position: relative; transition: box-shadow .4s var(--ease), background-color .4s var(--ease); }
[data-rich="1"] .rich-value { text-shadow: 0 0 22px color-mix(in srgb, var(--blue) 45%, transparent); }
[data-rich="2"] .rich-value, [data-rich="3"] .rich-value, [data-rich="4"] .rich-value, [data-rich="5"] .rich-value {
  background: linear-gradient(100deg, var(--gold-a) 0%, var(--gold-b) 30%, var(--gold-c) 55%, var(--gold-b) 80%, var(--gold-a) 100%) 0 0 / 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-rich="3"] .rich-value { animation: gold-sheen 5s linear infinite; }
[data-rich="4"] .rich-value { animation: gold-sheen 3.2s linear infinite; }
[data-rich="5"] .rich-value { animation: gold-sheen 2s linear infinite; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gold-b) 45%, transparent)); }
[data-rich="3"] .rich-glow { box-shadow: 0 10px 36px color-mix(in srgb, var(--gold-b) 14%, transparent); }
[data-rich="4"] .rich-glow { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-b) 28%, transparent), 0 12px 44px color-mix(in srgb, var(--gold-b) 22%, transparent); }
[data-rich="5"] .rich-glow { background-color: color-mix(in srgb, var(--gold-b) 9%, var(--card-2)); animation: royal-pulse 2.4s ease-in-out infinite; }
@keyframes gold-sheen { to { background-position: -220% 0; } }
@keyframes royal-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-b) 30%, transparent), 0 12px 44px color-mix(in srgb, var(--gold-b) 22%, transparent); }
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-b) 55%, transparent), 0 16px 60px color-mix(in srgb, var(--gold-b) 38%, transparent); }
}
.rich-badge {
  display: inline-flex; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: 1px;
  color: var(--gold-ink); background: linear-gradient(100deg, var(--gold-a), var(--gold-b) 45%, var(--gold-a));
}
.rich-badge.arrive { animation: rise .35s var(--spring) both; }
.rich-badge:empty { display: none; }
[data-rich="out"] .rich-badge { color: var(--bad); background: var(--bad-soft); }
.rich-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.rich-sparkles i { position: absolute; width: 6px; height: 6px; opacity: 0; background: var(--gold-b); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
[data-rich="4"] .rich-sparkles i:nth-child(-n+6) { animation: sparkle 2.4s ease-in-out infinite; }
[data-rich="5"] .rich-sparkles i { animation: sparkle 1.5s ease-in-out infinite; width: 8px; height: 8px; }
.rich-sparkles i:nth-child(1) { left: 6%; top: 24%; }
.rich-sparkles i:nth-child(2) { left: 20%; top: 74%; animation-delay: .5s; }
.rich-sparkles i:nth-child(3) { left: 34%; top: 16%; animation-delay: 1.1s; }
.rich-sparkles i:nth-child(4) { left: 50%; top: 66%; animation-delay: .3s; }
.rich-sparkles i:nth-child(5) { left: 64%; top: 30%; animation-delay: .9s; }
.rich-sparkles i:nth-child(6) { left: 78%; top: 78%; animation-delay: 1.4s; }
.rich-sparkles i:nth-child(7) { left: 88%; top: 20%; animation-delay: .7s; }
.rich-sparkles i:nth-child(8) { left: 94%; top: 56%; animation-delay: 1.8s; }
.rich-sparkles i:nth-child(9) { left: 42%; top: 44%; animation-delay: 1.2s; }
.rich-sparkles i:nth-child(10) { left: 14%; top: 48%; animation-delay: .2s; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
/* The burst on reaching the top tier: pieces fly from the value (js/forms.js). */
.rich-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.rich-burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--piece); animation: burst .9s var(--ease) forwards; }
@keyframes burst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--turn)); opacity: 0; } }
/* Outside the limits: red and a shake. */
[data-rich="out"] .rich-value { color: var(--bad); }
[data-rich="out"] .swap-cell:first-child { background: var(--tile-bad); animation: shake .32s var(--ease); }
@keyframes shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }

/* ——— Forms ——— */
.form { display: grid; gap: 12px; margin: 12px 0; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
/* A tick in a form keeps the tick's own row: box, then its words (the support form's «что уже пробовали»). */
.form label.check { display: flex; }
.form .checks { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.form .checks legend { padding: 0; margin-bottom: 4px; font-size: 14px; color: var(--ink-2); }
input[type="text"], input[type="number"], select, textarea {
  padding: 11px 14px; border-radius: var(--radius-field); border: 1px solid transparent;
  background: var(--card-2); color: var(--ink); font: inherit; font-size: 15px; max-width: 100%;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
textarea { resize: vertical; min-height: 120px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; color: var(--muted); font-size: 13px; margin-bottom: 6px; }

/* ——— Key-value lists ——— */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(45%, 200px), 1fr)); gap: 10px; margin: 16px 0; }
.stats div { padding: 14px 16px; border-radius: 18px; background: var(--card-2); }
.stats dt { color: var(--muted); font-size: 13px; }
.stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }

/* What a composition will build (templates/ui.html::plan_card): the share that works
   already, then one tinted line per fact, the buttons closing the card. */
.plan { display: grid; gap: 18px; margin: 20px 0 8px; padding: 24px; border-radius: 26px; background: var(--card-2); }
.plan-head { display: flex; align-items: center; gap: 14px; }
.plan-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tile-info); color: var(--blue); }
.plan-mark .icon { width: 22px; height: 22px; }
.plan-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.plan-sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.plan-meter { display: grid; gap: 8px; }
.plan-meter p { margin: 0; font-size: 15px; }
.plan-meter b { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.plan-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--card); }
.plan-dot { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--tile-lock); color: var(--muted); }
.plan-dot .icon { width: 18px; height: 18px; }
.plan-row.ok .plan-dot { background: var(--tile-ok); color: var(--ok); }
.plan-row.add .plan-dot { background: var(--tile-info); color: var(--blue); }
.plan-row.wait .plan-dot, .plan-row.warn .plan-dot { background: var(--tile-warn); color: var(--warn); }
.plan-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.plan-text b { font-size: 15px; font-weight: 600; }
.plan-text small { color: var(--muted); font-size: 12.5px; }
.plan-count { flex: none; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.plan-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; }
.plan-note .icon { flex: none; width: 15px; height: 15px; }
.plan-quip { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--tile-info); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.plan-actions { margin-top: 2px; }
.plan-actions > form > button { min-height: 44px; font-size: 15px; }

/* A server's line while the subscription is created says all of its state: it wraps. */
.creation-servers .srow-sub { white-space: normal; overflow: visible; }

/* A whole row as a link (lists of tickets, servers, slots). */
a.row { color: inherit; text-decoration: none; }
.row .row-title, .row .row-sub { display: block; }
.badge { display: grid; place-items: center; min-width: 44px; height: 32px; padding: 0 8px; border-radius: 10px; background: var(--card-3); color: var(--ink-2); font-size: 12px; font-weight: 600; }
h3 { font-size: 15px; }
.panel > h3 { margin-top: 20px; }


/* ——— Ask before a destructive action (templates/ui.html::confirm) ——— */
.confirm { display: contents; }
.confirm > summary.danger-quiet { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.confirm > summary.danger-quiet:hover { filter: brightness(1.08); }
.confirm-panel {
  flex-basis: 100%; display: grid; gap: 10px; padding: 16px 18px; border-radius: 18px;
  background: var(--card-2); animation: rise .25s var(--ease) both;
}
.confirm-question { font-weight: 600; }
.confirm-panel form { display: block; }
.confirm-panel p { color: var(--ink-2); font-size: 14px; }
.confirm-panel .muted { color: var(--muted); }

/* The same panel as a dialog (js/confirm.js). */
dialog.ask {
  width: min(460px, calc(100vw - 24px)); padding: 0; border: 0; outline: 0; border-radius: 28px; overflow: hidden;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line);
}
dialog.ask[open] { animation: dialog-in .35s var(--spring) both; }
dialog.ask::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in .25s var(--ease) both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
.ask-body { display: grid; gap: 12px; padding: 24px 24px 8px; }
.ask-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bad-soft); color: var(--bad); }
.ask-icon.quiet { background: var(--card-3); color: var(--ink); }
.ask-icon .icon { width: 22px; height: 22px; }
.ask-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.ask-note { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ask-foot > .ask-yes { order: 1; }
.ask-body .confirm-panel { padding: 0; border: 0; background: none; animation: none; }
.ask-body .confirm-question { display: none; }
.ask-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 24px 24px; }
.ask-foot > button, .ask-foot > form > button, .ask-foot > form > .slide { flex: 1 1 160px; }
/* The way out is a quiet outlined pill under the confirming control, not a second dark slab. */
.ask-foot > form > *, .ask-foot > button.danger { order: 1; }
.ask-foot > .ask-cancel {
  order: 2; flex: 1 1 100%; background: transparent; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.ask-foot > .ask-cancel:hover { filter: none; background: var(--card-2); color: var(--ink); }
.ask-foot > .ask-cancel .icon { width: 16px; height: 16px; opacity: .8; }
.ask-foot > .ask-cancel:focus-visible { outline: 0; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 38%, transparent); }
.ask-foot > form > .slide { flex-basis: 100%; margin: 0; max-width: none; }
.ask-foot > form > .slide-caption { display: none; }
.ask-body .confirm-panel form { display: none; }
.ask-foot form { display: contents; }
.ask-foot button { min-height: 46px; font-size: 15px; }

/* ——— Lists of servers and slots: tiles in a grid, the state as a pastel fill ——— */
.srows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-top: 4px; }
/* A few device slots stretch across the row instead of leaving an empty column (awg_slots, warp_slots). */
.srows.fill { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.srow {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center;
  column-gap: 12px; row-gap: 10px; min-height: 64px; padding: 12px 14px;
  border-radius: 18px; background: var(--tile); color: var(--ink); text-decoration: none;
  transition: transform .22s var(--spring), background-color .18s var(--ease), box-shadow .22s var(--ease);
}
a.srow:hover { background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
a.srow:active { transform: translateY(0) scale(.985); }
.srow.owned { background: var(--tile-ok); }
a.srow.owned:hover { background: var(--tile-ok-hover); }
.srow.strained { background: var(--tile-warn); }
.srow.closed { background: var(--tile-bad); }
.srow.locked { background: var(--tile-lock); color: var(--muted); }
.srow.locked .srow-mark { filter: grayscale(1); opacity: .55; }
.srow-mark { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card); font-size: 18px; }
.srow-mark .flag { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.srow-badge {
  position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--card); color: var(--muted); box-shadow: 0 0 0 2px var(--tile);
}
.srow-badge .icon { width: 11px; height: 11px; stroke-width: 3; }
.srow-badge.ok { background: var(--ok); color: #ffffff; }
.srow-badge.run { background: var(--blue); color: #ffffff; animation: spin 1.2s linear infinite; }
.srow-text { min-width: 0; display: grid; gap: 1px; }
.srow-title { min-width: 0; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The plan a server opens from, after its name (access_control/server_button.py::tier_mark): small, quiet, never wraps. */
.srow-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.srow-tier { flex: none; color: var(--muted); line-height: 1; }
.srow-tier svg { width: 14px; height: 14px; vertical-align: -2px; }
.srow-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.srow-meta:empty { display: none; }
/* Why a row the tariff allows is closed: a sentence or two, so it wraps (a chip does not). */
.srow-reason { color: var(--muted); font-size: 12.5px; }
.srow > .icon { color: var(--muted); width: 18px; height: 18px; transition: transform .2s var(--spring), color .15s var(--ease); }
a.srow:hover > .icon { transform: translateX(3px); color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Online right now: a dot that breathes; offline stays still and grey. */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); flex: none; }
.live-dot.on { background: var(--ok); animation: breathe 2.2s var(--ease) infinite; }
@keyframes breathe { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--card-3); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }

/* ——— Logos of protocols and systems (frontend/logos/SOURCES.txt) ———
   A one-colour mark is a mask filled with its brand colour, so it reads in
   both themes; AmneziaVPN and Mihomo are drawn in their own colours. These
   URLs carry no version: a changed logo gets a new file name. */
.logo { display: inline-block; flex: none; width: 24px; height: 24px; background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.logo.large { width: 32px; height: 32px; }
.logo.small { width: 18px; height: 18px; }
.logo-amnezia, .logo-mihomo { -webkit-mask: none; mask: none; background: var(--logo) center / contain no-repeat; }
.logo-xray { --logo: url(/static/logos/xray.svg?v=ab7b6a193f); color: var(--brand-xray); }
.logo-hysteria { --logo: url(/static/logos/hysteria.svg?v=78415dbdff); color: var(--brand-hysteria); }
.logo-naive { --logo: url(/static/logos/naive.svg?v=c9d577108f); color: var(--brand-naive); }
.logo-wireguard { --logo: url(/static/logos/wireguard.svg?v=687151a9d0); color: var(--brand-wireguard); }
.logo-warp { --logo: url(/static/logos/cloudflare.svg?v=408096d999); color: var(--brand-warp); }
.logo-telegram { --logo: url(/static/logos/telegram.svg?v=147fd8f892); color: var(--brand-telegram); }
.logo-android { --logo: url(/static/logos/android.svg?v=ff571c5e21); color: var(--brand-android); }
.logo-apple { --logo: url(/static/logos/apple.svg?v=2a1509dccd); color: var(--brand-apple); }
.logo-linux { --logo: url(/static/logos/linux.svg?v=7e55f2779a); color: var(--brand-linux); }
.logo-macos { --logo: url(/static/logos/macos.svg?v=efcada2b66); color: var(--brand-apple); }
.logo-openwrt { --logo: url(/static/logos/openwrt.svg?v=637830d223); color: var(--brand-openwrt); }
.logo-windows { --logo: url(/static/logos/windows.svg?v=db7bbbad5b); color: var(--brand-windows); }
.logo-amnezia { --logo: url(/static/logos/amnezia-mark.svg?v=5d4ba0c961); }
.logo-mihomo { --logo: url(/static/logos/mihomo.svg?v=ca85e0c5bf); }

/* ——— Windows on the same tab (js/modal.js) ———
   Content that lives only in a window (.sheet-only) opens through :target
   without scripts; with scripts it moves into a dialog. */
dialog.sheet {
  width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 28px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-pop); overflow: hidden;
}
dialog.sheet.wide { width: min(980px, calc(100vw - 24px)); }
dialog.sheet.qr-sheet { width: min(440px, calc(100vw - 24px)); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: dialog-in .38s var(--spring) both; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .25s var(--ease) both; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 6px 24px; }
.sheet-head h2 { flex: 1; min-width: 0; font-size: 18px; letter-spacing: -0.02em; }
.sheet-close { flex: none; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 24px 24px; display: grid; gap: 14px; align-content: start; }
.sheet-body > .in-sheet { margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.sheet-body > .in-sheet > h2:first-child { display: none; }
.qr-large { width: 100%; max-width: 380px; height: auto; aspect-ratio: 1; margin: 4px auto 0; padding: 16px; border-radius: 24px; background: #ffffff; image-rendering: pixelated; }
.sheet.qr-sheet .hint { text-align: center; margin: 0; }
.sheet-only:not(:target) { display: none; }
/* With the window script running (js/modal.js marks <html>), such content is
   seen only inside its dialog: replaceState does not reset :target, and a
   closed window must not stay on the page as an overlay that Esc and a
   click outside cannot close (owner 22.10.2026). */
.sheets .sheet-only:not(.in-sheet) { display: none; }
.sheet-body > .sheet-only.in-sheet { display: grid; gap: 14px; }
.sheet-body > .in-sheet > * + * { margin-top: 0; }
:root:not(.sheets) .sheet-only:target:not(.in-sheet) {
  position: fixed; z-index: 60; inset: 0; margin: auto; width: min(560px, calc(100vw - 24px)); height: fit-content; max-height: 88vh; overflow: auto;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55), var(--shadow-pop);
}
/* An action's window (templates/ui.html::window): the button's icon heads it;
   without scripts the panel opens under the button. */
.sheet-mark { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 13px; background: var(--tile-info); color: var(--blue); }
.sheet-mark .icon { width: 20px; height: 20px; }
.act-panel { display: grid; gap: 12px; margin-top: 10px; padding: 16px; border-radius: var(--radius-inner); background: var(--card-2); }
.sheet-body > .act-panel.in-sheet { margin: 0; padding: 0; background: none; }
.act-panel > .form { margin: 0; }
.act-panel .hint { margin: 0; color: var(--muted); font-size: 13px; }
.act-panel code.url { max-height: 50vh; overflow: auto; }
@media (max-width: 560px) {
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  dialog.sheet[open] { animation: sheet-up .38s var(--spring) both; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }

/* ——— Summary strip: the page's state in a few numbers, the main action at the end ——— */
.summary-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
/* A fact is as wide as it needs, up to a third of a wide page (owner 26.10.2026: two
   numbers stretched over the whole width, «a lot of empty space»); the action stands
   at the row's end at its own size, not a block as tall as the facts. */
.summary-item { flex: 1 1 180px; max-width: 340px; display: grid; gap: 2px; align-content: center; padding: 14px 16px; border-radius: 18px; background: var(--tile); min-width: 0; }
.summary-value { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-label { color: var(--muted); font-size: 12.5px; }
.summary-item.wide { flex: 2 1 260px; max-width: none; }
.summary-value.text { font-size: 17px; white-space: normal; }
/* Two numbers to a row on a phone, not one tall card each. */
@media (max-width: 560px) { .summary-item:not(.wide) { flex-basis: 120px; } }
.summary-action { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 0 auto; }
.summary-action button, .summary-action .button { min-height: 44px; }

/* ——— Mode cards of a composition ——— */
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mode-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .mode-grid, .mode-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mode-grid, .mode-grid:has(> :nth-child(3):last-child) { grid-template-columns: 1fr; } }
.mode-form { margin: 0; display: grid; }
button.mode-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px; min-height: 0; height: 100%; padding: 16px 18px;
  border-radius: 20px; background: var(--tile); color: var(--ink); text-align: left; white-space: normal; font: inherit; letter-spacing: 0;
  transition: transform .22s var(--spring), background-color .18s var(--ease), box-shadow .22s var(--ease);
}
button.mode-card:hover { filter: none; background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
button.mode-card:active { transform: scale(.985); }
.mode-card.static { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 20px; }
.mode-card.chosen, button.mode-card.chosen { background: var(--tile-info); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 55%, transparent); }
.mode-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card); }
.mode-icon .icon { width: 20px; height: 20px; }
.mode-body { display: grid; gap: 4px; min-width: 0; }
.mode-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.mode-text { color: var(--muted); font-size: 13px; line-height: 1.45; }
.mode-tick { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #ffffff; animation: pop .3s var(--spring) both; }
.mode-tick .icon { width: 14px; height: 14px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* A tile that is a button (a server to tick). */
.pick-form { margin: 0; display: grid; }
button.srow { min-height: 64px; height: 100%; padding: 12px 14px; border-radius: 18px; background: var(--tile); color: var(--ink); text-align: left; white-space: normal; font: inherit; letter-spacing: 0; justify-content: stretch; }
button.srow:hover { filter: none; background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
button.srow.owned { background: var(--tile-ok); }
button.srow.owned:hover { background: var(--tile-ok-hover); }

/* Actions that stay in reach at the bottom of a long page. */
.sticky-actions { position: sticky; bottom: 12px; z-index: 3; padding: 10px; margin: 0 -10px; border-radius: 20px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* A window with a side column (a slot: details on the left, its QR on the right). */
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: start; }
.sheet-main { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.sheet-main > .url, .sheet-main > .facts-list, .sheet-main > .link-actions { justify-self: stretch; }
.sheet-qr { margin: 0; display: grid; gap: 8px; justify-items: center; }
.sheet-qr .qr-large { width: 280px; max-width: 100%; }
@media (max-width: 760px) { .sheet-grid { grid-template-columns: 1fr; } }
.slot-number { font-weight: 700; font-size: 16px; }
/* Inside a window the card colour is the window's own: blocks take the tile fill. */
.sheet-body .url, .sheet-body .facts-list div { background: var(--tile); }

/* ——— Keys being made (ui.html::forge) ——— */
.forge { display: flex; align-items: center; gap: 22px; padding: 20px 22px; border-radius: 22px; background: var(--tile-info); overflow: hidden; }
.forge-orbit { position: relative; flex: none; width: 76px; height: 76px; }
.forge-core { position: absolute; inset: 18px; display: grid; place-items: center; border-radius: 14px; background: var(--card); color: var(--blue); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); animation: forge-bob 1.6s var(--ease) infinite; }
.forge-core .icon { width: 22px; height: 22px; animation: forge-turn 3.2s var(--spring) infinite; }
.forge-orbit i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--blue); animation: forge-orbit 2.4s linear infinite; }
.forge-orbit i:nth-child(3) { background: var(--purple); animation-delay: -.8s; width: 6px; height: 6px; margin: -3px; }
.forge-orbit i:nth-child(4) { background: var(--yellow); animation-delay: -1.6s; width: 5px; height: 5px; margin: -2.5px; }
@keyframes forge-orbit { from { transform: rotate(0) translateX(36px) rotate(0); } to { transform: rotate(360deg) translateX(36px) rotate(-360deg); } }
@keyframes forge-bob { 50% { transform: translateY(-3px) scale(1.04); } }
@keyframes forge-turn { 0%, 60% { transform: rotate(0); } 80% { transform: rotate(-35deg); } 100% { transform: rotate(0); } }
.forge-body { display: grid; gap: 6px; min-width: 0; flex: 1; }
.forge-title { font-size: 16px; font-weight: 650; }
.forge-lines { position: relative; height: 1.5em; color: var(--ink-2); font-size: 14px; }
.forge-lines span { position: absolute; inset: 0; opacity: 0; animation: forge-line 9.6s var(--ease) infinite; }
.forge-lines span:nth-child(2) { animation-delay: 2.4s; }
.forge-lines span:nth-child(3) { animation-delay: 4.8s; }
.forge-lines span:nth-child(4) { animation-delay: 7.2s; }
@keyframes forge-line { 0% { opacity: 0; transform: translateY(8px); } 4%, 22% { opacity: 1; transform: none; } 26%, 100% { opacity: 0; transform: translateY(-8px); } }
.forge-count { color: var(--muted); font-size: 12.5px; }
progress.meter { width: 100%; height: 8px; border: 0; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; -webkit-appearance: none; appearance: none; }
progress.meter::-webkit-progress-bar { background: transparent; }
progress.meter::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .6s var(--ease); }
progress.meter::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--purple)); }
@media (prefers-reduced-motion: reduce) { .forge *, .forge-lines span { animation: none !important; } .forge-lines span:first-child { opacity: 1; } }
a.summary-item.link { color: var(--ink); text-decoration: none; transition: background-color .15s var(--ease), transform .2s var(--spring); }
a.summary-item.link:hover { background: var(--tile-hover); transform: translateY(-2px); }
.summary-item .logo, .summary-item .icon { width: 24px; height: 24px; }
.summary-item progress.meter { margin: 4px 0 2px; }
.summary-value .pill { font-size: 13px; }
.summary-value .muted { font-size: 15px; font-weight: 500; }
/* A switched-off product: its mark, what turning it on does, the buttons. */
.empty-hero { display: grid; gap: 14px; justify-items: start; padding: 22px; border-radius: 22px; background: var(--tile); }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--card); }

/* ——— Proxy tiles (whitelists): host, place, connect; the link to copy in one line ——— */
.proxy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.proxy-tile { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 18px; background: var(--tile); min-width: 0; transition: transform .22s var(--spring), box-shadow .22s var(--ease), background-color .18s var(--ease); }
.proxy-tile:hover { background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .14); }
.proxy-tile.locked { background: var(--tile-lock); color: var(--muted); }
.proxy-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proxy-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card); }
.proxy-connect { justify-self: start; }
.url.compact { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: normal; font-size: 12px; padding: 9px 12px; background: var(--card); }
.proxy-tile .link-actions { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.proxy-tile .link-actions > * { margin: 0; }
.proxy-tile .muted .icon { width: 14px; height: 14px; vertical-align: -2px; }

/* ——— Taking a key away (ui.html::forge kind="delete") ——— */
.forge.delete { background: var(--tile-bad); }
.forge.delete .forge-core { color: var(--bad); animation: forge-shake .9s var(--ease) infinite; }
.forge.delete .forge-core .icon { animation: forge-crack 2.4s var(--ease) infinite; }
.forge.delete .forge-orbit i { left: 50%; top: 40%; width: 7px; height: 4px; margin: 0; border-radius: 2px; background: var(--bad); animation: forge-shard 2.4s var(--ease) infinite; }
.forge.delete .forge-orbit i:nth-child(3) { background: color-mix(in srgb, var(--bad) 70%, var(--yellow)); animation-delay: .25s; --drift: -14px; }
.forge.delete .forge-orbit i:nth-child(4) { background: color-mix(in srgb, var(--bad) 60%, var(--card)); animation-delay: .5s; --drift: 12px; }
.forge-bin { position: absolute; left: 50%; bottom: -6px; translate: -50% 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--card); color: var(--bad); animation: forge-bin 2.4s var(--ease) infinite; }
.forge-bin .icon { width: 15px; height: 15px; }
.forge.delete progress.meter::-webkit-progress-value { background: linear-gradient(90deg, var(--bad), var(--yellow)); }
.forge.delete progress.meter::-moz-progress-bar { background: linear-gradient(90deg, var(--bad), var(--yellow)); }
@keyframes forge-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-2px) rotate(-3deg); } 40% { transform: translateX(2px) rotate(3deg); } 60% { transform: translateX(-1px); } }
@keyframes forge-crack { 0%, 40% { opacity: 1; transform: scale(1); } 60% { opacity: .35; transform: scale(.82) rotate(-10deg); } 80%, 100% { opacity: 1; transform: scale(1); } }
@keyframes forge-shard { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: 1; } 70% { opacity: 1; transform: translate(var(--drift, 4px), 30px) rotate(160deg); } 85%, 100% { opacity: 0; transform: translate(var(--drift, 4px), 36px) rotate(200deg); } }
@keyframes forge-bin { 0%, 55%, 100% { transform: scale(1); } 70% { transform: scale(1.18) rotate(-6deg); } 82% { transform: scale(.96); } }

/* ——— A key that has just appeared: it arrives with a light sweep ———
   Only a key new on a page already on screen arrives (js/live.js marks it
   .arrive); a page that opens brings its keys in with its cards, once
   (owner 23.10.2026: «the animations appear twice»). */
.link, .key-ready { position: relative; overflow: hidden; }
.link::after, .key-ready::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, #ffffff 22%, transparent) 50%, transparent 65%) -100% 0 / 220% 100% no-repeat;
}
.link.arrive, .key-ready.arrive { animation: key-arrive .55s var(--spring) both; }
.link.arrive::after, .key-ready.arrive::after { animation: key-sweep 1.1s .25s var(--ease) both; }
@keyframes key-arrive { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes key-sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.pill.paid .live-dot.on { animation: breathe 2.2s var(--ease) infinite; }
.pill.paid .live-dot.on.arrive { animation: breathe 2.2s var(--ease) infinite, spark-in .6s var(--spring) both; }
@keyframes spark-in { from { transform: scale(0); } }
@media (prefers-reduced-motion: reduce) {
  .forge.delete *, .link.arrive, .key-ready.arrive, .link.arrive::after, .key-ready.arrive::after { animation: none !important; }
}
.forge.delete .forge-orbit { height: 92px; }
.forge.delete .forge-core { inset: 2px 18px auto; height: 40px; }
.forge.delete .forge-orbit i { top: 42px; }
.forge.delete .forge-bin { bottom: 0; }

/* ——— The head of a server's page ——— */
.server-hero { display: flex; align-items: center; gap: 16px; }
.server-flag { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--tile); font-size: 26px; overflow: hidden; }
.server-flag img { width: 56px; height: 56px; object-fit: cover; }
.server-hero-text { min-width: 0; }
.server-hero-text h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.server-hero-text .muted { margin-top: 2px; font-size: 13.5px; }

/* ——— Journey: a long job with its real step (templates/ui.html::journey) ———
   Bigger than the forge and the full width of its panel (owner 22.10.2026:
   «make it larger», «use the full width»). */
.journey.forge { display: grid; gap: 22px; align-items: stretch; padding: 28px 30px; border-radius: 26px; }
.journey-head { display: flex; align-items: center; gap: 24px; min-width: 0; }
.journey .forge-orbit { width: 104px; height: 104px; }
.journey .forge-core { inset: 26px; border-radius: 18px; }
.journey .forge-core .icon { width: 28px; height: 28px; }
.journey-words { display: grid; gap: 6px; flex: 1; min-width: 0; }
.journey-title { font-size: clamp(20px, 2vw, 26px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.journey-text { color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.journey-time { display: inline-flex; align-items: center; gap: 6px; flex: none; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink-2); font-size: 13px; }
.journey-time .icon { width: 14px; height: 14px; animation: forge-turn 3.2s linear infinite; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; counter-reset: none; }
.stepper li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--muted); font-size: 14px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.stepper-dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--card-3); color: var(--ink-2); font-size: 13px; font-weight: 650; }
.stepper-dot .icon { width: 16px; height: 16px; }
.stepper-name { min-width: 0; }
.stepper li.done { color: var(--ink-2); }
.stepper li.done .stepper-dot { background: var(--ok); color: var(--card); }
.stepper li.now { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.stepper li.now .stepper-dot { background: var(--blue); color: #ffffff; animation: step-pulse 1.8s var(--ease) infinite; }
.journey.delete .stepper li.now .stepper-dot { background: var(--bad); }
@keyframes step-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.journey-count { display: grid; gap: 8px; }
.journey-count p { font-size: 15px; color: var(--ink-2); }
.journey-count b { font-size: 26px; color: var(--ink); letter-spacing: -0.03em; }
.journey-count .meter { height: 10px; }
.journey-extra { color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) {
  .journey.forge { padding: 20px; gap: 16px; }
  .journey-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 16px; }
  .journey-time { justify-self: end; align-self: center; }
  .journey-words { grid-column: 1 / -1; }
  .journey .forge-orbit { width: 76px; height: 76px; }
  .journey .forge-core { inset: 18px; }
  .stepper { grid-auto-flow: row; }
}
/* Waiting for a number: three dots breathe. */
.dots { display: inline-flex; gap: 5px; align-items: center; height: 1em; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: dots 1.2s var(--ease) infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.notice.tail { display: flex; align-items: center; gap: 10px; }
.notice.tail .icon { flex: none; width: 18px; height: 18px; color: var(--bad); }

/* A finished deletion says so plainly (Hysteria 2, like the bot's «Удалено»). */
.done-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 24px; background: var(--tile-ok); }
.done-mark { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--ok); color: var(--card); animation: knob-done .5s var(--spring) both; }
.done-mark .icon { width: 26px; height: 26px; }
.done-title { font-size: clamp(18px, 1.8vw, 22px); font-weight: 650; letter-spacing: -0.02em; }
.done-text { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.deletion-servers { margin: 14px 0 18px; }
.deletion-servers .srow-sub { white-space: normal; overflow: visible; text-overflow: clip; }
.deletion-servers .srow-badge.run .icon { animation: spin 1.2s linear infinite; }

/* An explicit empty composition asks for a choice instead of pretending to prepare (owner 22.10.2026). */
.choose-hero { width: 100%; gap: 18px; }
.choose-title { font-size: clamp(20px, 2vw, 26px); font-weight: 650; letter-spacing: -0.02em; }
.choose-text { margin-top: 6px; max-width: 70ch; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.choose-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; width: 100%; }
.choose-option { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--card); transition: transform .18s var(--spring), background .18s; }
.choose-option:hover { transform: translateY(-2px); background: var(--tile-hover); }
.choose-option b { font-size: 15px; font-weight: 620; }
.choose-option span { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }

/* WARP sets: the NAT64 pack's variants and the two set presses. */
.pack-files .srow, .sets .srow { grid-template-columns: 40px minmax(0, 1fr) auto; }
.pack-files .srow-sub, .sets .srow-sub, .sets .srow-title { white-space: normal; overflow: visible; }
.pack-actions { display: flex; align-items: center; gap: 6px; }
.pack-actions .act { margin: 0; }
.set-form { display: contents; }
.sets button.srow { width: 100%; text-align: left; cursor: pointer; }

/* The wizard's first choice (connect.html): two plain option rows. */
.options { display: grid; gap: 8px; margin-top: 4px; }
.option {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 18px 18px 18px 20px; border-radius: var(--radius-inner); background: var(--tile); color: var(--ink); text-decoration: none;
  transition: background-color .15s var(--ease);
}
.option:hover, .option:focus-visible { background: var(--tile-hover); }
.option-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--card); color: var(--ink-2); }
.option-mark .icon { width: 22px; height: 22px; }
.option-body { display: grid; gap: 4px; min-width: 0; }
.option-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.option-text { color: var(--muted); font-size: 14px; line-height: 1.45; }
.option-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.option > .icon { width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 640px) {
  .option { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .option-meta { display: none; }
}
/* A row whose action is its own buttons (upgrade.html): no hover, buttons on the right, under the text on a phone. */
.option.static { grid-template-columns: 44px minmax(0, 1fr) auto; }
.option.static:hover { background: var(--tile); }
.option-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .option.static { grid-template-columns: 44px minmax(0, 1fr); }
  .option-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Where an emoji came with a text, the site draws its own icon in the line (cabinet/backend/site/emoji_icons.py). */
.icon.inline { width: 1.15em; height: 1.15em; margin: 0 .12em; vertical-align: -.2em; }
.dot { display: inline-block; width: .62em; height: .62em; margin: 0 .2em; border-radius: 50%; background: var(--muted); vertical-align: .04em; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--bad); }
.dot-warn { background: var(--warn); }
.dot-info { background: var(--blue); }
.flag-inline { display: inline-block; width: 1.3em; height: auto; margin: 0 .2em; border-radius: 2px; vertical-align: -.14em; }

/* A key page (xray_variant.html, 22.10.2026): the status in the hero, the key
   card with copy and QR side by side, the actions as settings rows, the way back. */
.server-hero .hero-status { margin-left: auto; align-self: center; flex: none; }
.key-card { display: grid; gap: 12px; margin-top: 18px; }
.key-card-head h3 { margin: 0; font-size: 15px; }
.key-card-head .hint { margin: 2px 0 0; }
.key-card code.url { max-height: 7.4em; overflow: auto; }
.key-card .link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 460px; margin-top: 0; }
.key-card .link-actions > .copy, .key-card .link-actions > .button, .key-card .link-actions > .act > summary { width: 100%; min-height: 44px; justify-content: center; }
.key-card .link-actions > .act { margin: 0; }
/* Where copying is the main thing to do (a key, not a proxy link or a file), copy is the main button. */
.key-card.copy-main .link-actions > .copy.quiet { background: var(--primary); color: var(--primary-ink); }
.key-section { margin: 24px 0 10px; font-size: 15px; }
/* Rows follow the card without a heading (owner 23.10.2026: «let the layout do the explaining»). */
.act-rows { display: grid; gap: 8px; margin-top: 20px; }
.act-rows > details { display: block; margin: 0; }
:is(summary, a).act-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-inner); background: var(--tile); color: var(--ink);
  transition: background-color .15s var(--ease);
}
:is(summary, a).act-row:hover, :is(summary, a).act-row:focus-visible { background: var(--tile-hover); }
.act-row-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card); color: var(--ink-2); }
.act-row-mark .icon { width: 20px; height: 20px; }
.act-row-title { font-weight: 600; font-size: 15px; }
:is(summary, a).act-row > .icon { width: 18px; height: 18px; color: var(--muted); }
:is(summary, a).act-row.danger .act-row-title { color: var(--bad); }
:is(summary, a).act-row.danger .act-row-mark { background: var(--bad-soft); color: var(--bad); }
a.act-row { text-decoration: none; }
/* A subscription's page (23.10.2026): the protocol's logo in the hero's tile, the apps as a quiet card of readable width. */
.product-hero .server-flag .logo.large { width: 30px; height: 30px; }
.sub-note { max-width: 72ch; margin: 20px 0 0; padding: 14px 18px; border-radius: var(--radius-inner); background: var(--tile); color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 560px) {
  .server-hero { flex-wrap: wrap; }
  .server-hero .hero-status { margin-left: 0; }
  /* A long main button («Подключить прокси») takes the row; the QR goes under it. */
  .key-card .link-actions > .grow { grid-column: 1 / -1; }
  /* A subscription's long title stays beside its logo; the state goes under the title. */
  .product-hero .server-hero-text { flex: 1 1 calc(100% - 72px); }
  .product-hero .hero-status { margin-left: 72px; }
}

/* ——— Hover explanations (templates/ui.html::tip) ——— */
/* A bubble over a short mark that says what it means; a press keeps it while
   the mark has focus. With scripts one bubble fixed to the window
   (js/tips.js): kept inside the window, never part of the page's width. Without
   them the mark draws it itself — only while it is shown: a hidden bubble in
   the layout widened the page wherever a mark stood near the right edge
   (owner 26.10.2026: «let's fix and remove the scrolling»). */
[data-tip] { position: relative; cursor: help; }
.tip-bubble, :root:not(.tips) [data-tip]:is(:hover, :focus-visible)::after {
  z-index: 60; width: max-content; max-width: min(280px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 12px;
  background: var(--ink); color: var(--ground); box-shadow: var(--shadow-pop);
  font-size: var(--t-sm); font-weight: 500; line-height: 1.45; letter-spacing: 0; text-align: left; white-space: normal;
  pointer-events: none;
}
:root:not(.tips) [data-tip]:is(:hover, :focus-visible)::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); }
.tip-bubble { position: fixed; opacity: 0; transform: translateY(4px); transition: opacity .14s var(--ease), transform .18s var(--ease); }
.tip-bubble.below { transform: translateY(-4px); }
.tip-bubble.shown { opacity: 1; transform: none; }

/* ——— «Как подключить»: numbered steps (templates/ui.html::howto) ——— */
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); counter-reset: none; }
.howto-steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.howto-no {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--info-soft); color: var(--blue); font-size: var(--t-sm); font-weight: 650;
}
.howto-steps .telegram-html { padding-top: 3px; font-size: var(--t-base); line-height: 1.55; }
.howto .note { color: var(--muted); font-size: var(--t-sm); }

/* ——— The composition of a link (29.11.2026): a switch on every server, one save bar ——— */
.comp-head h2 { margin: 0 0 6px; }
.comp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 12px; }
.comp-count { color: var(--muted); font-size: 13px; }
.comp-count b { color: var(--ink); font-weight: 600; }
.comp-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.comp-card {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  min-height: 64px; padding: 12px 14px; border-radius: 18px; background: var(--tile); color: var(--ink); cursor: pointer;
  transition: transform .22s var(--spring), background-color .18s var(--ease), box-shadow .22s var(--ease);
}
.comp-card:hover { background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
.comp-card.on { background: var(--tile-ok); }
.comp-card.on:hover { background: var(--tile-ok-hover); }
.comp-card.goes { background: var(--tile-warn); }
.comp-card.closed { background: var(--tile-lock); color: var(--muted); cursor: not-allowed; }
.comp-card.closed:hover { transform: none; box-shadow: none; background: var(--tile-lock); }
.comp-card.closed .srow-mark { filter: grayscale(1); opacity: .55; }
.comp-card > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.comp-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.comp-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; background: var(--card-3); transition: background-color .2s var(--ease); }
.comp-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--spring);
}
.comp-card.on .comp-switch { background: var(--ok); }
.comp-card.on .comp-switch::after { transform: translateX(20px); }
.comp-card.closed .comp-switch { opacity: .4; }
.comp-card .srow-sub { white-space: normal; overflow: visible; text-overflow: clip; }
.comp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.comp-sum { margin: 0; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.comp-form.busy .comp-sum { color: var(--muted); }
.comp-bar button[disabled] { opacity: .45; pointer-events: none; }
/* Where the floating menu dock is (layout.css, 900px), the bar sits above it. */
@media (max-width: 900px) { .comp-bar { bottom: calc(86px + env(safe-area-inset-bottom)); } }
@media (max-width: 520px) {
  .comp-bar { flex-direction: column; align-items: stretch; }
  .comp-bar button { width: 100%; justify-content: center; }
}

/* Page-specific pieces: the emblem and the sign-in stage, the subscription
   pass with its glass ticket, balance and auto-renew, top-up, the payment
   chart, tariffs, the wizard, purchase terms, support threads. */

/* ——— Emblem ——— */
.emblem { position: relative; display: inline-block; flex: none; width: 24px; height: 24px; }
.emblem svg { display: block; width: 100%; height: 100%; overflow: visible; }
.em-shield { fill: color-mix(in srgb, var(--ink) 8%, transparent); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.em-ring { fill: none; stroke: var(--ink); stroke-opacity: .35; stroke-width: .9; stroke-dasharray: 1.6 2.2; }
.em-core { fill: var(--ink); }
.em-orbit { display: none; }

/* ——— Stage: sign-in, bills, purchase ——— */
.gate > .emblem { width: 64px; height: 64px; margin-bottom: 18px; }
.gate h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.03em; }
.gate .lead { margin-top: 10px; color: var(--muted); text-wrap: balance; }
.gate .lead b { color: var(--ink); }
.gate .lead.small { font-size: 14px; }
.gate .button, .gate form { margin-top: 24px; }
.gate .button + .button { margin-top: 10px; }
.gate .after { margin-top: 14px; color: var(--muted); font-size: 13px; }
.gate .notice { margin-bottom: 20px; }
.gate .em-orbit { display: block; position: absolute; left: 28.33%; top: 26.67%; width: 43.33%; height: 43.33%; animation: orbit 9s linear infinite; }
.gate .em-orbit b { position: absolute; left: 50%; top: 0; width: 21%; height: 21%; border-radius: 50%; background: var(--ink); translate: -50% -50%; }
@keyframes orbit { to { rotate: 1turn; } }
.key { white-space: nowrap; color: var(--ink); font-weight: 600; }

.gate .steps { list-style: none; margin: 24px 0 0; padding: 0; text-align: left; counter-reset: step; display: grid; gap: 6px; }
.gate .steps li {
  position: relative; padding: 12px 14px 12px 50px; counter-increment: step;
  border-radius: 16px; background: var(--card-2); color: var(--ink-2); font-size: 14px;
}
.gate .steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 11px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 12px;
}
.gate .key { white-space: normal; }
.gate .steps + .after { text-align: left; }

/* The glass ticket: a gradient tile under a frosted one. */
.ticket-art { position: relative; width: 210px; height: 150px; margin: 0 auto 22px; }
.tile { position: absolute; display: grid; place-items: center; border-radius: 34px; }
.tile-back {
  left: 18px; top: 26px; width: 118px; height: 118px; rotate: -12deg;
  background:
    radial-gradient(circle at 50% 0, var(--card) 7px, transparent 7.5px),
    radial-gradient(circle at 50% 100%, var(--card) 7px, transparent 7.5px),
    linear-gradient(140deg, #4f7cf7 0%, #7c6cf6 55%, #b07cf0 100%);
  box-shadow: 0 18px 40px rgba(79, 124, 247, .3);
}
.tile-glass {
  left: 84px; top: 4px; width: 110px; height: 110px; rotate: 10deg; color: #ffffff;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tile-glass .icon { width: 40px; height: 40px; stroke-width: 1.6; color: var(--ink); }
.ticket-art .tile-back { animation: float-a 6s ease-in-out infinite; }
.ticket-art .tile-glass { animation: float-b 6s ease-in-out infinite; }
@keyframes float-a { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes float-b { 50% { transform: translateY(4px) rotate(2deg); } }

/* ——— Pass: the subscription card ——— */
.pass { position: relative; overflow: hidden; isolation: isolate; padding: 24px; }
.pass-art { position: absolute; z-index: -1; right: -12px; top: -8px; width: 170px; height: 130px; opacity: .9; pointer-events: none; }
.pass-art .tile-back { left: 16px; top: 20px; width: 84px; height: 84px; border-radius: 26px; }
.pass-art .tile-glass { left: 62px; top: 0; width: 80px; height: 80px; border-radius: 24px; }
.pass-art .tile-glass .icon { width: 28px; height: 28px; }
.plan { margin-top: 16px; }
.plan + .plan { margin-top: 20px; padding-top: 20px; }
.plan h2 { font-size: 30px; line-height: 1.1; letter-spacing: -0.035em; max-width: calc(100% - 120px); }
@media (max-width: 520px) { .plan h2 { font-size: 26px; max-width: calc(100% - 96px); } .pass-art { transform: scale(.8); transform-origin: top right; } }
.plan .until { margin-top: 8px; color: var(--muted); }
.plan .until b { color: var(--ink); }
.plan .main { margin-left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--card-3); font-size: 12px; font-weight: 600; color: var(--ink-2); vertical-align: middle; letter-spacing: 0; }
.features { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.feature-row {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px 8px 8px; border-radius: 14px;
  background: var(--tile); color: var(--ink-2); font-size: 14px; line-height: 1.4; text-decoration: none;
  transition: background-color .15s var(--ease), transform .2s var(--spring), color .15s var(--ease);
}
a.feature-row:hover { background: var(--tile-hover); color: var(--ink); transform: translateX(2px); }
a.feature-row:active { transform: scale(.99); }
.feature-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--card); font-size: 15px; }
.feature-mark .logo { width: 18px; height: 18px; }
.feature-mark .icon { width: 17px; height: 17px; }
.feature-text { flex: 1; min-width: 0; }
.feature-row > .icon { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--spring), color .15s var(--ease); }
a.feature-row:hover > .icon { transform: translateX(3px); color: var(--ink); }
.tariff .features { gap: 4px; }
.tariff .feature-row { min-height: 40px; padding: 6px 10px 6px 6px; font-size: 13.5px; background: transparent; }
.tariff a.feature-row:hover { background: var(--card); }
.pass .empty { margin-top: 14px; color: var(--muted); }
.pass .button { margin-top: 18px; }
.pass .notice { margin-top: 16px; }

/* ——— Balance and auto-renew ——— */
.fact .label { color: var(--muted); font-size: 13px; }
.fact .value { margin-top: 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.fact .value.big { font-size: 38px; line-height: 1.15; letter-spacing: -0.04em; }
.fact .value.on { color: var(--ok); }
.fact .value.off { color: var(--muted); }
.fact .note { margin-top: 8px; }
.fact.balance .button { margin-top: 14px; }
.fact-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fact .setting { margin: 0; }
.fact .setting.target { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fact .setting.target label { flex-basis: 100%; margin: 0; }
.fact .setting.target select { flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px; }

/* ——— Top-up ——— */
.topup form { display: grid; gap: 14px; }
.topup .note { text-align: center; }
.topup form:has(input[name="repeat"][value="once"]:checked) .repeat-note { display: none; }
.bill-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; text-decoration: none; }
.bill-link .icon { width: 14px; height: 14px; }

/* ——— Payment chart: stacked bars by day, refunds below the axis ——— */
/* The method's dot in the payment history. */
.seg-dot.pally { background: var(--blue); }
.seg-dot.antilopay { background: var(--purple); }
.seg-dot.other { background: var(--sky); }
.seg-dot.donation { background: var(--yellow); }
.seg-dot.refund { background: var(--red); }
.legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .seg { width: 10px; height: 10px; min-height: 0; border-radius: 3px; animation: none; }
.abandoned { margin-top: 12px; font-size: 13px; }

/* ——— Section pages: tariffs, wizard, referrals ——— */
.sheet .note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.sheet .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.tariffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.tariff { min-width: 0; padding: 18px; border-radius: 20px; background: var(--card-2); }
.tariff h3 { margin: 0; font-size: 18px; }
.tariff .features { margin-top: 10px; gap: 0; }
.wizard { display: grid; gap: 14px; }
.wizard > h2 { margin-bottom: 0; }
.wizard h3 { font-size: 15px; margin: 4px 0 0; }
.telegram-html { white-space: pre-line; color: var(--ink-2); line-height: 1.6; }
.telegram-html b { color: var(--ink); }
.sheet .steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.whens { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* The wizard's last step: three numbered cards side by side, then the advice for when
   something goes wrong, each with its button (26.10.2026). */
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.step-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border-radius: var(--radius-inner); background: var(--tile); min-width: 0; }
.step-head { display: flex; align-items: center; gap: var(--s-2); }
.step-card h3 { margin: 0; font-size: var(--t-md); }
.step-card .telegram-html { font-size: var(--t-base); }
.step-card > .actions { margin-top: auto; padding-top: var(--s-2); }
.alt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s-3); }
.alt-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius-inner); background: var(--card-2); }
.alt-card .telegram-html { font-size: var(--t-base); }
.alt-card > .actions { margin-top: auto; }
@media (max-width: 1100px) { .step-cards { grid-template-columns: minmax(0, 1fr); } }
.whens li { display: flex; gap: 8px; align-items: baseline; }
.whens li::before { content: ""; flex: none; width: 1em; height: 1em; transform: translateY(.18em); background: currentColor; opacity: .7; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 13.7-5.6L20 9M20 4v5h-5M20 12a8 8 0 0 1-13.7 5.6L4 15M4 20v-5h5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ——— Purchase and upgrade ——— */
.buy .terms { margin: 18px 0; display: grid; gap: 2px; text-align: left; }
.buy .terms div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.buy .terms dt { color: var(--muted); }
.buy .terms dd { margin: 0; font-weight: 600; }
.buy form + form { margin-top: 10px; }
.buy .telegram-html { text-align: left; margin-bottom: 16px; }
.upgrade-row { margin-top: 12px; padding-top: 12px; }
.upgrade-row .choices { margin-top: 8px; }
.upgrade-row form { margin: 0; }

/* ——— Support threads ——— */
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.message { margin: 10px 0; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: var(--card-2); max-width: 680px; }
.message.from-support { margin-left: auto; border-radius: 18px 18px 6px 18px; background: var(--info-soft); }

/* ——— Dashboard tiles (account.html): a label, a large value, a line under it ——— */
.stat { display: flex; flex-direction: column; gap: 6px; min-height: 148px; padding: 20px 22px; }
.tile-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile-value { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.035em; }
.tile-value.on { color: var(--ok); font-size: 22px; }
.tile-value.off { color: var(--muted); font-size: 22px; }
.tile-sub { margin-top: auto; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tile-sub .pill { margin-right: 6px; }
.tile-sub b { color: var(--ink); }
.tile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat .button.small { align-self: flex-start; margin-top: auto; }
.stat.pass { padding: 20px 22px; }
.stat.pass .state { align-self: flex-start; }
.stat.pass .plan-name { margin-top: 8px; font-size: 26px; }
.support-mark { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--tile-bad); color: var(--red); font-size: 12.5px; font-weight: 500; }
.support-mark .icon { width: 14px; height: 14px; }
.stat.pass .pass-art { right: -46px; top: -30px; transform: scale(.56); transform-origin: top right; opacity: .75; }
.stat.pass .empty { color: var(--muted); font-size: 14px; }
.stat.pass .button { align-self: flex-start; margin-top: auto; }

/* ——— «Что входит»: groups (owner 24.10.2026, «Groups with logos», ui.html::composition) ———
   Products as logo chips under a titled count (every protocol equal: no tile for one of them, owner
   28.11.2026), extras as equal tiles, notes as a checklist: no tile grows taller than its row, nothing is a comma list. */
.plan-card .plan-item + .plan-item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.plan-title { margin-bottom: 12px; font-weight: 600; font-size: 15px; }
.plan-title .main { margin-left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--card-3); font-size: 12px; color: var(--ink-2); }
.plan-group { margin-top: 16px; }
.plan-group-title { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.plan-chips, .plan-extras, .plan-notes { list-style: none; margin: 0; padding: 0; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px 6px 8px;
  border-radius: 999px; background: var(--tile); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color .15s var(--ease), transform .2s var(--spring);
}
.plan-chip:hover { background: var(--tile-hover); transform: translateY(-1px); }
.plan-chip.off { color: var(--muted); }
.plan-chip .logo, .plan-chip .icon { width: 20px; height: 20px; }
.plan-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 16px; }
.plan-extra {
  display: flex; align-items: center; gap: 12px; min-height: 52px; height: 100%; padding: 8px 12px 8px 8px;
  border-radius: 16px; background: var(--tile); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color .15s var(--ease), transform .2s var(--spring);
}
a.plan-extra:hover { background: var(--tile-hover); transform: translateY(-1px); }
.plan-extra-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.plan-extra-text small { color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.35; }
.plan-extra-mark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--card); }
.plan-extra-mark .icon, .plan-extra-mark .logo { width: 18px; height: 18px; }
.plan-notes { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; }
.plan-notes li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.plan-notes .icon { flex: none; width: 16px; height: 16px; color: var(--ok); }
.plan-card .actions { margin-top: 18px; }
.plan-card .choices { margin-top: 16px; }
.plan-card .setting.target { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-card .setting.target label { flex-basis: 100%; margin: 0; }
.plan-card .setting.target select { flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px; }

/* ——— The chart in its wide card ——— */
.empty-state { flex: 1; display: grid; place-items: center; min-height: 180px; margin-top: 12px; border-radius: 18px; background: var(--card-2); color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }

/* ——— Links: one row each (owner 24.10.2026, «Compact rows») ———
   Mark, name, the address in one line (copied whole, js/forms.js), copy and
   QR at the end; a narrow card puts the address and the buttons under the name. */
.links-card { container-type: inline-size; }
.links-card .links { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.link-row { display: grid; grid-template-columns: 36px minmax(0, 15rem) minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 8px 8px 8px 10px; border-radius: 16px; }
.link-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--card); }
.link-mark .logo, .link-mark .icon { width: 20px; height: 20px; }
.link-row h3 { margin: 0; font-size: 14px; line-height: 1.3; }
.link-row h3 .tag { display: table; margin: 3px 0 0; }
.link-row .url.compact { margin: 0; }
.link-row .link-actions, .link-row > .act { margin: 0; flex-wrap: nowrap; }
.link-row .notice { grid-column: 3 / -1; margin: 0; }
@container (max-width: 720px) {
  /* Name and icon-only buttons on the first line, the address under them; the words stay for screen readers. */
  .link-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 10px; }
  .link-row .link-actions, .link-row > .act { grid-row: 1; grid-column: 3; }
  .link-row .url, .link-row .notice { grid-row: 2; grid-column: 1 / -1; }
  .link-row .link-actions .labels, .link-row summary > span:not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .link-row .link-actions > *, .link-row summary { gap: 0; padding-inline: 11px; }
}

/* ——— History: columns on a wide screen, stacked rows on a phone ——— */
.table { display: grid; margin: 0 -10px; }
.table-head, .table-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; }
.table-head { color: var(--muted); font-size: 12px; font-weight: 500; }
.table { display: grid; gap: 4px; }
.table-row { border-radius: 14px; font-size: 14px; color: var(--ink); text-decoration: none; background: var(--tile); transition: background-color .15s var(--ease), transform .2s var(--spring); }
a.table-row:hover { background: var(--tile-hover); transform: translateX(2px); }
a.table-row:active { transform: scale(.99); }
.table-row > :last-child { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.table-row > :last-child .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .2s var(--spring); }
a.table-row:hover > :last-child .icon { transform: translateX(3px); color: var(--ink); }
.pill { transition: transform .2s var(--spring); }
a.table-row:hover .pill { transform: scale(1.05); }
.pill.pending { animation: pending-glow 2.4s var(--ease) infinite; }
@keyframes pending-glow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); } }
/* The window of one payment. */
.pay-hero { display: grid; gap: 8px; justify-items: start; padding: 16px 18px; border-radius: 18px; background: var(--tile); }
.pay-hero.paid { background: var(--tile-ok); }
.pay-hero.pending { background: var(--tile-warn); }
.pay-hero.refunded { background: var(--tile-bad); }
.pay-sum { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; }
.table .method { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.table .when { font-variant-numeric: tabular-nums; font-size: 13px; }
.table .sum { font-weight: 600; font-variant-numeric: tabular-nums; }
.table-head span:nth-child(3), .table-head span:nth-child(4), .table-row > :nth-child(3), .table-row > :nth-child(4) { text-align: right; }
/* A narrow table — on a phone or in the side column of the main page — puts each row on two lines. */
.table { container-type: inline-size; }
@container (max-width: 560px) {
  .table-head { display: none; }
  .table-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .table-row > :nth-child(2) { grid-row: 2; }
  .table-row > :nth-child(3) { grid-row: 1; grid-column: 2; }
  .table-row > :nth-child(4) { grid-row: 2; grid-column: 2; }
}

/* ——— Slot cards (Mihomo): everything known about one device's link ——— */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.slot-card { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 20px; background: var(--card-2); }
.slot-card.live { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.slot-head { display: flex; align-items: center; gap: 10px; }
.slot-head h3 { flex: 1; margin: 0; font-size: 15px; }
.slot-head .srow-mark { font-weight: 700; font-size: 14px; }
.facts-list { display: grid; gap: 6px; margin: 0; }
.facts-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border-radius: 12px; background: var(--card); font-size: 13px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ——— Overviews (/vpn, /telegram): every product of the bot's menu as a card ——— */
/* A column count the cards fill (owner 26.10.2026: 6 + 2 left a hole): 4, 3, 2, 1. */
.hub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1500px) { .hub { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hub { grid-template-columns: minmax(0, 1fr); } }
.hub-card {
  display: flex; align-items: flex-start; gap: 14px; min-height: 84px; padding: 16px; border-radius: 20px;
  background: var(--card-2); color: var(--ink); text-decoration: none;
  transition: transform .2s var(--spring), border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .2s var(--ease);
}
.hub-card:hover { transform: translateY(-2px); background: var(--hover); box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }
.hub-card:active { transform: scale(.99); }
.hub-card.locked { opacity: .75; }
.hub-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--card); font-size: 22px; transition: transform .25s var(--spring); }
.hub-icon .logo { width: 28px; height: 28px; }
.hub-icon .icon { width: 24px; height: 24px; }
.hub-card:hover .hub-icon { transform: scale(1.08) rotate(-4deg); }
.hub-body { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.hub-title { font-weight: 600; font-size: 15px; }
.hub-text { color: var(--muted); font-size: 13px; line-height: 1.4; white-space: normal; }
.hub-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.hub-card > .icon { align-self: center; color: var(--muted); width: 18px; height: 18px; transition: transform .2s var(--spring); }
.hub-card:hover > .icon { transform: translateX(3px); color: var(--ink); }

/* WARP: the slot's own settings — the bot's menus as one form. */
.warp-settings { margin-top: 18px; border-radius: 20px; background: var(--card-2); }
.warp-settings > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 600; }
.warp-settings > summary > svg:last-child { margin-left: auto; transform: rotate(90deg); transition: transform .2s var(--ease); }
.warp-settings[open] > summary > svg:last-child { transform: rotate(-90deg); }
.warp-settings > .hint, .warp-settings > form { margin: 0 16px 16px; }
.warp-form { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-items: end; }
.warp-form > label { min-width: 0; }
.warp-form select, .warp-form input { width: 100%; min-width: 0; }
.warp-form > button { grid-column: 1 / -1; justify-self: start; }

/* A day's card over its bar: what was paid, by whom, how much. */
.bar { position: relative; }
.bar.has { cursor: default; outline: none; }
.bars:has(.bar.has:hover) .bar:not(:hover) .seg { opacity: .45; }
.bar .tip {
  position: absolute; z-index: 5; bottom: calc(100% + 8px); left: 50%; translate: -50% 6px; min-width: 168px;
  display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-pop); font-size: 12.5px; white-space: nowrap; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .15s var(--ease), translate .2s var(--spring), visibility .15s;
}
.bar:hover .tip, .bar:focus-visible .tip { opacity: 1; visibility: visible; translate: -50% 0; }
.bar:first-child .tip, .bar:nth-child(2) .tip { left: 0; translate: 0 6px; }
.bar:first-child:hover .tip, .bar:nth-child(2):hover .tip { translate: 0 0; }
.bar:last-child .tip, .bar:nth-last-child(2) .tip { left: auto; right: 0; translate: 0 6px; }
.bar:last-child:hover .tip, .bar:nth-last-child(2):hover .tip { translate: 0 0; }
/* A phone fits more bars into the width: a centred card near either edge stuck
   out and scrolled the whole page sideways. */
@media (max-width: 560px) {
  .bar:nth-child(-n+5) .tip { left: 0; right: auto; translate: 0 6px; }
  .bar:nth-last-child(-n+5) .tip { left: auto; right: 0; translate: 0 6px; }
  .bar:nth-child(-n+5):hover .tip, .bar:nth-last-child(-n+5):hover .tip { translate: 0 0; }
}
.tip b { font-size: 13px; }
.tip-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.tip-row .seg { width: 10px; height: 10px; min-height: 0; border-radius: 3px; animation: none; flex: none; }
.tip-sum { margin-left: auto; padding-left: 12px; color: var(--ink); font-weight: 600; }

/* ——— Time left on the plan; little of it is an alarm (22.10.2026) ——— */
.state.soon { background: var(--warn-soft); color: var(--warn); }
.state.alarm { background: var(--bad-soft); color: var(--bad); animation: alarm-pulse 1.6s var(--ease) infinite; }
.state.alarm::before { animation: alarm-dot 1s steps(2, jump-none) infinite; }
@keyframes alarm-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 16%, transparent); } }
@keyframes alarm-dot { 50% { opacity: .25; } }
.countdown { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.countdown b { font-size: 22px; color: var(--ink); }
.countdown.soon b { color: var(--warn); }
.countdown.alarm b { color: var(--bad); }
.countdown-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.countdown.alarm .countdown-icon { background: var(--bad-soft); color: var(--bad); animation: ring 1.8s var(--ease) infinite; transform-origin: 50% 20%; }
.countdown-icon .icon { width: 17px; height: 17px; }
@keyframes ring { 0%, 50%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); } }
.card.pass:has(.state.alarm) { background: color-mix(in srgb, var(--bad) 7%, var(--card)); }
.card.pass .actions { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .state.alarm, .state.alarm::before, .countdown.alarm .countdown-icon { animation: none; } }

/* ——— First steps for a beginner ——— */
.first-steps-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.first-steps-head h2 { margin: 0; }
.first-steps-head progress.meter { flex: 1 1 160px; max-width: 280px; }
.step-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .step-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .step-tiles { grid-template-columns: 1fr; } }
.step-tile { position: relative; display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 14px; border-radius: 18px; background: var(--tile-info); color: var(--ink); text-decoration: none; transition: transform .22s var(--spring), background-color .18s var(--ease); }
.step-tile:hover { transform: translateY(-2px); }
.step-tile.done { background: var(--tile-ok); color: var(--ink-2); }
.step-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card); font-weight: 700; font-size: 13px; }
.step-tile.done .step-mark { background: var(--ok); color: #ffffff; }
.step-mark .icon { width: 15px; height: 15px; stroke-width: 3; }
.step-body { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.step-body span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.step-tile > .icon { flex: none; width: 18px; height: 18px; color: var(--muted); }
.dash > .first-steps { grid-column: 1 / -1; }

/* ——— Tariff cards ——— */
.tariffs { align-items: stretch; }
.tariff { display: flex; flex-direction: column; gap: 12px; background: var(--tile); }
.tariff.best { background: var(--tile-info); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 45%, transparent); }
.tariff-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tariff-head h3 { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; }
.tariff-head .chip .icon { width: 13px; height: 13px; }
.tariff-from { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.tariff-from b { color: var(--ink); font-size: 15px; }
/* The plan's features keep their own height; the terms sit at the card's foot, so cards
   of one row line their terms up without spreading three features over nine rows' height. */
.tariff .features { margin: 0; }
.tariff .durations { margin-top: auto; }
.durations { display: grid; gap: 6px; }
.durations form { margin: 0; display: grid; }
.duration-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "label price go" "day price go"; align-items: center; column-gap: 14px; row-gap: 2px;
  min-height: 0; height: auto; padding: 10px 12px; border-radius: 14px; background: var(--card); color: var(--ink);
  font: inherit; letter-spacing: 0; text-align: left; white-space: normal; text-decoration: none;
  transition: transform .2s var(--spring), background-color .15s var(--ease);
}
button.duration-row:hover, a.duration-row:hover { filter: none; transform: translateY(-1px); background: var(--card-3); }
.duration-label { grid-area: label; font-weight: 600; font-size: 14px; }
.duration-day { grid-area: day; color: var(--muted); font-size: 12px; }
.duration-price { grid-area: price; justify-self: end; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.duration-go { grid-area: go; justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 12.5px; font-weight: 600; }
.duration-go .icon { width: 14px; height: 14px; }
.duration-row.short .duration-go { background: var(--warn-soft); color: var(--warn); }

/* ——— Connect a device: steps and system tiles ——— */
.wizard-steps { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--tile); color: var(--muted); font-size: 13px; font-weight: 600; }
.wizard-steps li.here { background: var(--tile-info); color: var(--ink); }
.wizard-steps li.done { background: var(--tile-ok); color: var(--ink-2); }
.wizard-step-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--card); font-size: 12px; }
.wizard-steps li.done .wizard-step-mark { background: var(--ok); color: #ffffff; }
.wizard-steps li.here .wizard-step-mark { background: var(--blue); color: #ffffff; }
.wizard-step-mark .icon { width: 12px; height: 12px; stroke-width: 3; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.device-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--tile); color: var(--ink); text-decoration: none; font-weight: 600; transition: transform .22s var(--spring), background-color .18s var(--ease), box-shadow .22s var(--ease); }
.device-tile:hover { background: var(--tile-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
.device-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--card); font-size: 24px; transition: transform .25s var(--spring); }
.device-tile:hover .device-logo { transform: scale(1.08) rotate(-4deg); }
.device-name { flex: 1; }
.device-tile > .icon { width: 18px; height: 18px; color: var(--muted); }

/* ——— Zapret Premium: pairing on the left, devices on the right ——— */
.premium-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .premium-grid { grid-template-columns: 1fr; } }
.premium-pair { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--tile-info); }
.premium-pair h3, .premium-devices h3 { margin: 0; }
.premium-devices { display: grid; gap: 12px; min-width: 0; }
.pair-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; }
.premium-pair .form { margin: 0; }
.premium-pair input[name="code"] { font: 600 18px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; background: var(--card); }
.premium-devices .srow-meta { align-items: center; }

/* ——— Transfer: the steps, the form, and what to know beside it ——— */
.transfer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 18px; align-items: start; margin-top: 14px; }
@media (max-width: 900px) { .transfer-grid { grid-template-columns: 1fr; } }
.transfer-main { display: grid; gap: 12px; min-width: 0; }
.transfer-main .form { margin: 0; }
.transfer-facts { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--tile); }
.transfer-facts h3 { margin: 0; }
.fact-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fact-tiles li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--card); font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.fact-tiles .icon { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--muted); }
.fact-tiles li.ok .icon { color: var(--ok); }
.fact-tiles li.warn .icon { color: var(--warn); }

/* ——— Welcome: the sign-in page (redesign 22.10.2026) ———
   Two columns: what the cabinet is and three steps in; a drawn preview of the
   cabinet over a slow aurora. The preview is an example, not data. */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%; filter: blur(90px); opacity: .32; animation: aurora-drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: -14vmax; top: -18vmax; background: var(--blue); }
.aurora i:nth-child(2) { right: -18vmax; top: 6vmax; background: var(--purple); animation-duration: 32s; animation-delay: -8s; }
.aurora i:nth-child(3) { left: 24vmax; bottom: -30vmax; background: var(--sky); opacity: .2; animation-duration: 38s; animation-delay: -15s; }
@keyframes aurora-drift { 50% { transform: translate(6vmax, 4vmax) scale(1.08); } to { transform: translate(-4vmax, 7vmax) scale(.94); } }
.welcome > .top, .welcome > .foot { position: relative; z-index: 1; }

.hello {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center;
  max-width: 1180px; min-height: calc(100dvh - 300px); margin: 0 auto; padding: 40px 24px 24px;
}
.hello-copy { min-width: 0; animation: rise .55s var(--ease) both; }
.hello-copy > .notice { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.hello-copy > .notice .icon { width: 18px; height: 18px; flex: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.hello h1 { margin-top: 20px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.shine {
  background: linear-gradient(100deg, var(--blue) 0%, var(--purple) 40%, #c47cf0 60%, var(--blue) 100%) 0 0 / 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: hello-shine 7s linear infinite;
}
@keyframes hello-shine { to { background-position: -200% 0; } }
.hello .lead { max-width: 54ch; margin-top: 18px; color: var(--muted); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.hello-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.hello-cta { min-height: 56px; padding-inline: 24px 22px; font-size: 16px; gap: 10px; box-shadow: 0 14px 34px color-mix(in srgb, var(--blue) 28%, transparent); }
.hello-cta .icon:last-child { transition: transform .25s var(--spring); }
.hello-cta:hover .icon:last-child { transform: translateX(4px); }
.hello-safe { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.hello-safe .icon { width: 16px; height: 16px; color: var(--ok); }

.hello-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 34px 0 0; padding: 0; counter-reset: step; }
.hello-steps li {
  position: relative; display: grid; align-content: start; gap: 14px; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
  counter-increment: step; animation: rise .5s var(--ease) both; transition: transform .25s var(--spring);
}
.hello-steps li:nth-child(2) { animation-delay: .08s; }
.hello-steps li:nth-child(3) { animation-delay: .16s; }
.hello-steps li:hover { transform: translateY(-3px); }
.hello-steps li::after { content: counter(step); position: absolute; right: 14px; top: 10px; color: var(--faint); font-size: 28px; font-weight: 700; letter-spacing: -0.04em; }
.step-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--tile-info); color: var(--blue); }
.hello-steps li:nth-child(2) .step-mark { background: color-mix(in srgb, var(--purple) 14%, var(--card)); color: var(--purple); }
.hello-steps li:nth-child(3) .step-mark { background: var(--tile-ok); color: var(--ok); }
.step-mark .icon { width: 20px; height: 20px; }
.step-text { display: grid; gap: 4px; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.step-text b { color: var(--ink); font-size: 15px; font-weight: 600; }
.step-text .key { white-space: normal; }
.hello .after { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* The preview: a cabinet window, tilted until the pointer comes. */
.hello-preview { position: relative; min-width: 0; margin: 0; padding: 30px 30px 18px; }
.mock {
  overflow: hidden; border-radius: 26px; background: var(--card); box-shadow: var(--shadow-pop);
  transform: perspective(1400px) rotateY(-9deg) rotateX(4deg); transition: transform .7s var(--ease);
  animation: mock-in .9s var(--ease) .15s both;
}
.hello-preview:hover .mock { transform: perspective(1400px) rotateY(0) rotateX(0); }
@keyframes mock-in { from { opacity: 0; translate: 0 26px; scale: .96; } }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: var(--card-2); }
.mock-bar > i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--bad) 70%, transparent); }
.mock-bar > i:nth-child(2) { background: color-mix(in srgb, var(--warn) 75%, transparent); }
.mock-bar > i:nth-child(3) { background: color-mix(in srgb, var(--ok) 70%, transparent); }
.mock-bar > span { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto; padding-right: 46px; color: var(--muted); font-size: 12px; }
.mock-bar .icon { width: 12px; height: 12px; }
.mock-body { display: grid; gap: 12px; padding: 18px; }
.mock-plan {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--blue) 24%, var(--card-2)), color-mix(in srgb, var(--purple) 22%, var(--card-2)));
}
.mock-label { color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mock-plan > b { font-size: 24px; letter-spacing: -0.03em; }
.mock-left { color: var(--ink-2); font-size: 13px; }
.mock-bar-track { height: 6px; margin-top: 4px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.mock-bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--purple)); animation: mock-fill 1.6s var(--ease) .7s forwards; }
@keyframes mock-fill { to { width: 78%; } }
.mock-servers { display: grid; gap: 8px; }
.mock-server { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 14px; background: var(--tile); font-size: 14px; animation: mock-row-in .6s var(--ease) both; }
.mock-server:nth-child(1) { animation-delay: .55s; }
.mock-server:nth-child(2) { animation-delay: .7s; }
.mock-server:nth-child(3) { animation-delay: .85s; }
@keyframes mock-row-in { from { opacity: 0; translate: 18px 0; } }
.mock-server img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.mock-ping { display: flex; align-items: flex-end; gap: 3px; margin-left: auto; height: 14px; }
.mock-ping i { width: 4px; border-radius: 2px; background: var(--faint); }
.mock-ping i:nth-child(1) { height: 6px; }
.mock-ping i:nth-child(2) { height: 10px; }
.mock-ping i:nth-child(3) { height: 14px; }
.mock-ping i.on { background: var(--ok); animation: mock-ping 2.6s ease-in-out infinite; }
.mock-ping i.on:nth-child(2) { animation-delay: .2s; }
.mock-ping i.on:nth-child(3) { animation-delay: .4s; }
@keyframes mock-ping { 50% { opacity: .45; } }
.mock-key { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--tile-ok); }
.mock-qr {
  position: relative; flex: none; width: 60px; height: 60px; border-radius: 12px; overflow: hidden;
  background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 82%, transparent) 0 25%, transparent 0 50%) 0 0 / 6px 6px, var(--card);
  box-shadow: inset 0 0 0 5px var(--card);
}
.mock-qr::before, .mock-qr::after {
  content: ""; position: absolute; top: 5px; width: 16px; height: 16px; border-radius: 4px;
  background: var(--card); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px var(--card), inset 0 0 0 9px var(--ink);
}
.mock-qr::before { left: 5px; }
.mock-qr::after { right: 5px; }
.mock-scan { position: absolute; z-index: 1; left: 4px; right: 4px; top: 8%; height: 2px; border-radius: 1px; background: var(--ok); box-shadow: 0 0 12px 2px var(--ok); animation: mock-scan 2.2s ease-in-out infinite alternate; }
@keyframes mock-scan { to { top: 88%; } }
.mock-key-text { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: 12px; }
.mock-key-text b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; }
.mock-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; color: var(--ink-2); font-size: 13px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: var(--shadow-pop);
}
.mock-chip b { color: var(--ink); }
.mock-chip .icon { width: 16px; height: 16px; color: var(--yellow); }
.chip-balance { right: 0; top: 8px; animation: float-b 6s ease-in-out infinite, rise .5s var(--ease) 1s backwards; }
.chip-device { right: 4px; bottom: 34px; animation: float-a 7s ease-in-out infinite, rise .5s var(--ease) 1.2s backwards; }
.hello-preview figcaption { margin-top: 16px; color: var(--faint); font-size: 12px; text-align: center; }

.hello-perks { position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1180px; margin: 8px auto 0; padding: 0 24px 16px; }
.hello-perks li { display: grid; align-content: start; gap: 6px; padding: 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); color: var(--muted); font-size: 13px; line-height: 1.45; transition: transform .25s var(--spring), background-color .2s var(--ease); }
.hello-perks li:hover { transform: translateY(-3px); background: var(--hover); }
.hello-perks .icon { width: 22px; height: 22px; margin-bottom: 6px; color: var(--blue); }
.hello-perks li:nth-child(2) .icon { color: var(--purple); }
.hello-perks li:nth-child(3) .icon { color: var(--ok); }
.hello-perks li:nth-child(4) .icon { color: var(--yellow); }
.hello-perks b { color: var(--ink); font-size: 15px; font-weight: 600; }

@media (max-width: 1000px) {
  .hello { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding: 24px 16px 16px; }
  .hello-preview { max-width: 520px; width: 100%; margin: 0 auto; padding: 24px 12px 12px; }
  .mock { transform: none; }
  .hello-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 16px; }
}
@media (max-width: 640px) {
  .hello-steps { grid-template-columns: minmax(0, 1fr); }
  .hello-steps li { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .hello-actions { flex-direction: column; align-items: stretch; }
  .hello-cta { justify-content: center; }
  .hello-safe { justify-content: center; }
  .chip-device { right: 0; }
  .hello-perks { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .aurora i { opacity: .2; } }
:root[data-theme="light"] .aurora i { opacity: .2; }
.welcome .stage { position: relative; z-index: 1; }

/* The transfer's last step (owner 23.10.2026): a window that says the step is final. */
.transfer-final { margin-top: 14px; }
.irreversible { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-inner); background: var(--bad-soft); }
.irreversible-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 600; color: var(--bad); }
.irreversible-title .icon { width: 20px; height: 20px; }
.transfer-final .form { margin-top: 16px; }
code.phrase { display: block; margin: 6px 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--tile); font-size: 15px; user-select: all; overflow-wrap: anywhere; }

/* ——— The year in charts (templates/charts.html) ——— */
/* Thin marks on a hairline grid, one scale per chart, a legend for two series, a
   table twin under each; text keeps the text colours, only marks wear the series. */
.chart-grid { display: grid; gap: var(--s-6); }
.chart { margin: 0; display: grid; gap: var(--s-2); min-width: 0; }
.chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.chart-title { font-weight: 600; font-size: var(--t-md); }
.chart-sub { color: var(--muted); font-size: var(--t-sm); }
.chart-keys { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ink-2); font-size: var(--t-sm); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--series-in); }
.key.out::before { background: var(--series-out); }
.key.past::before { background: var(--series-past); }
.key.today::before { width: 2px; height: 12px; border-radius: 1px; background: var(--ink); }
.key.s-vless::before, .plot .mark.s-vless { background: var(--series-vless); fill: var(--series-vless); }
.key.s-hysteria2::before, .plot .mark.s-hysteria2 { background: var(--series-hysteria2); fill: var(--series-hysteria2); }
.key.s-awg::before, .plot .mark.s-awg { background: var(--series-awg); fill: var(--series-awg); }
.key.s-wireguard::before, .plot .mark.s-wireguard { background: var(--series-wireguard); fill: var(--series-wireguard); }
.key.s-telemt::before, .plot .mark.s-telemt { background: var(--series-telemt); fill: var(--series-telemt); }
.key.s-naive::before, .plot .mark.s-naive { background: var(--series-naive); fill: var(--series-naive); }
.chart-note { font-size: var(--t-sm); }
.plot-wrap { overflow-x: auto; }
/* On a phone a chart keeps a readable size and scrolls sideways in its own box. */
.plot { display: block; width: 100%; min-width: 540px; height: auto; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .baseline { stroke: var(--line-strong); stroke-width: 1; }
.plot .tick { fill: var(--muted); font-size: 12px; }
.plot .row-label { fill: var(--ink-2); font-size: 13px; }
.plot .mark { fill: var(--series-in); transition: opacity .15s var(--ease), filter .15s var(--ease); cursor: default; outline: none; }
.plot .mark.out { fill: var(--series-out); }
.plot .mark.past { fill: var(--series-past); }
.plot .mark.lit, .plot .mark:focus-visible { filter: brightness(1.18); }
.plot:has(.mark.lit) .mark:not(.lit) { opacity: .55; }
.plot .area { fill: var(--series-in); opacity: .1; }
.plot .line { fill: none; stroke: var(--series-in); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .hit { fill: transparent; }
.plot .hit.lit { fill: color-mix(in srgb, var(--series-in) 8%, transparent); }
.plot .end { fill: var(--series-in); stroke: var(--card); stroke-width: 2; }
.plot .end-label { fill: var(--ink); font-size: 14px; font-weight: 600; }
.plot .today { stroke: var(--ink); stroke-width: 1.5; }
.chart-empty { padding: var(--s-5) 0; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: var(--t-sm); width: max-content; }
.chart-table summary:hover { color: var(--ink); }
.chart-table .table-scroll { max-height: 260px; overflow: auto; margin-top: var(--s-2); }
.chart-table table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.chart-table th { position: sticky; top: 0; background: var(--card); color: var(--muted); font-weight: 500; text-align: left; padding: 6px 8px; }
.chart-table td { padding: 6px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chart-tip {
  position: fixed; z-index: 70; max-width: 280px; padding: 8px 11px; border-radius: 12px; pointer-events: none;
  background: var(--ink); color: var(--ground); box-shadow: var(--shadow-pop); font-size: var(--t-sm); font-weight: 500; line-height: 1.45;
}

/* ——— Phone: a compact home page (owner 28.11.2026: «the main page is too big
   for small screens»; the Telegram Mini App is this page at ~390 px) ———
   Four tiles used to be four full-width cards of 150–200 px each, so the
   first screen held the subscription and half the balance. Now: the subscription
   on one wide card whose chips share a line, the balance and the auto-renew side
   by side, the last payment on a two-line row. The sentence under the auto-renew
   and the joke under the balance are cut: the tile's own state says the same,
   and the page is told by the numbers. Nothing is hidden that a person acts on. */
@media (max-width: 640px) {
  .dash .card, .dash .panel { padding: 14px 16px; gap: var(--s-3); border-radius: 20px; }
  .stat { min-height: 0; padding: 14px 16px; gap: 6px; }
  .tile-value { font-size: 24px; overflow-wrap: anywhere; }
  .tile-value.on, .tile-value.off { font-size: 17px; }
  .stat .tile-quip, #autorenew .tile-sub { display: none; }
  .tile-row { flex-wrap: wrap; gap: 8px; }

  .stat.pass { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .stat.pass > * { margin: 0; order: 3; }
  .stat.pass .state { order: 1; }
  .stat.pass .support-mark { order: 2; align-self: center; }
  .stat.pass .plan-name { flex-basis: 100%; font-size: 22px; }
  .stat.pass .countdown { font-size: 14px; }
  .stat.pass .countdown b { font-size: 18px; }
  .stat.pass .countdown-icon { width: 26px; height: 26px; border-radius: 8px; }
  .stat.pass .tile-sub { font-size: 12.5px; }
  .stat.pass .tile-sub + .tile-sub { display: none; }
  .stat.pass .actions { flex-basis: 100%; gap: 8px; margin-top: 2px; }
  .stat.pass .empty { flex-basis: 100%; }

  .stat[aria-label="Последний платёж"] { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .stat[aria-label="Последний платёж"] .tile-label { flex-basis: 100%; }
  .stat[aria-label="Последний платёж"] .tile-sub { margin: 0; }

  .first-steps-head { margin-bottom: 10px; }
  .step-tiles { gap: 8px; }
  .step-tile { padding: 10px 12px; align-items: center; }
  .step-tile.done .step-body span { display: none; }
  .links-card .links { gap: 8px; }
}

/* Pieces that exist only with scripts (js/): header switches, notifications,
   slide to confirm, copy buttons, the theme change. */

/* ——— Header switches: sound and theme ——— */
.controls { display: flex; gap: 6px; }
body:not(.app) > .top .controls { margin-left: auto; }
.icon-button {
  display: grid; place-items: center; width: 38px; min-height: 38px; height: 38px; padding: 0; border-radius: 12px;
  background: var(--secondary); color: var(--ink-2);
}
.icon-button:hover { filter: none; color: var(--ink); background: var(--card-3); }
.icon-button .icon { width: 19px; height: 19px; transition: transform .45s var(--spring), opacity .25s var(--ease); }
.sound-switch .off { display: none; }
.sound-switch.muted .on { display: none; }
.sound-switch.muted .off { display: inline; }
.sound-switch.muted { color: var(--muted); }
.theme-switch { position: relative; }
.theme-switch .icon { position: absolute; }
:root .theme-switch .sun { opacity: 1; transform: none; }
:root .theme-switch .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-switch .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
  :root:not([data-theme="dark"]) .theme-switch .moon { opacity: 1; transform: none; }
}
:root[data-theme="light"] .theme-switch .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="light"] .theme-switch .moon { opacity: 1; transform: none; }

/* ——— Theme change: a circle grows from the switch (View Transitions); without
   them colours cross-fade. ——— */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theming, .theming *, .theming *::before, .theming *::after {
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease) !important;
}

/* ——— Notifications ——— */
.toasts {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; translate: -50% 0;
  width: min(400px, calc(100vw - 24px)); height: 0; pointer-events: none;
}
.toast {
  --depth: 0;
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; min-height: 64px;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-pop);
  pointer-events: auto; transform-origin: 50% 100%;
  transform: translateY(calc(var(--depth) * -12px)) scale(calc(1 - var(--depth) * .05));
  transition: transform .4s var(--spring), opacity .3s var(--ease);
  animation: toast-in .5s var(--spring) both;
}
.toast:not(:last-child) .toast-body, .toast:not(:last-child) .toast-action, .toast:not(:last-child) .toast-icon { opacity: 0; transition: opacity .2s var(--ease); }
.toasts.fanned .toast { transform: translateY(calc(var(--depth) * (-100% - 8px))); }
.toasts.fanned .toast .toast-body, .toasts.fanned .toast .toast-action, .toasts.fanned .toast .toast-icon { opacity: 1; }
.toast.buried { opacity: 0; pointer-events: none; }
.toast.leaving { animation: toast-out .3s var(--ease) both; pointer-events: none; }
@keyframes toast-in { from { opacity: 0; translate: 0 110%; scale: .96; } }
@keyframes toast-out { to { opacity: 0; translate: 0 40%; scale: .96; } }
.toast-icon { flex: none; display: grid; place-items: center; }
.toast-icon .icon { width: 22px; height: 22px; }
.toast.ok .toast-icon { color: var(--ok); }
.toast.info .toast-icon { color: var(--blue); }
.toast.error .toast-icon { color: var(--bad); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.toast-text { color: var(--muted); font-size: 13px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast-action { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--secondary); color: var(--secondary-ink); font-size: 13px; }
.toast-close { flex: none; width: 30px; min-height: 30px; height: 30px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.toast-close:hover { filter: none; color: var(--ink); background: var(--hover); }
.toast-close .icon { width: 16px; height: 16px; }

/* ——— Slide to confirm ——— */
.slide-caption { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.slide {
  --x: 0px; --p: 0;
  position: relative; display: block; width: 100%; max-width: 420px; height: 60px; margin: 8px auto 0; padding: 4px;
  border-radius: 999px; background: var(--card-2);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; overflow: hidden;
}
.slide:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.slide-fill {
  position: absolute; inset: 4px auto 4px 4px; width: calc(var(--x) + 52px); border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.slide.danger .slide-fill { background: var(--bad-soft); }
.slide-hint {
  position: absolute; inset: 0; display: grid; place-items: center; padding-left: 48px;
  color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: .005em; opacity: calc(1 - var(--p) * 1.6);
  background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 50%, var(--muted) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.slide-knob {
  position: relative; z-index: 1; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transform: translateX(var(--x)); cursor: grab; touch-action: none;
}
.slide-knob:active { cursor: grabbing; }
.slide.danger .slide-knob { background: var(--bad); color: #ffffff; }
.slide.settling .slide-knob, .slide.settling .slide-fill { transition: transform .45s var(--spring), width .45s var(--spring); }
.slide.done .slide-knob { animation: knob-done .4s var(--spring); }
.slide.late .slide-hint { opacity: 1; padding: 0 64px 0 16px; font-size: 13px; }
/* At the very end the slider asks «Вы уверены?» inside itself: the question in
   two lines beside the knob — it, large, then what letting go does, quiet —
   and the knob pulses. Letting go now sends. */
.slide.armed .slide-hint {
  opacity: 1; place-items: center start; align-content: center; gap: 1px; padding: 0 70px 0 24px; text-align: left;
  background: none; -webkit-text-fill-color: currentColor; color: var(--ink); animation: none;
}
.slide.armed .slide-hint b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; animation: armed-in .32s var(--ease) both; }
.slide.armed .slide-hint span { color: var(--muted); font-size: 13px; font-weight: 450; line-height: 1.25; animation: armed-in .32s var(--ease) .07s both; }
.slide.armed.danger .slide-hint b { color: color-mix(in srgb, var(--bad) 78%, var(--ink)); }
.slide.armed .slide-knob { animation: armed-pulse 1.1s ease-in-out infinite; }
.slide.armed .slide-fill { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.slide.armed.danger .slide-fill { background: color-mix(in srgb, var(--bad) 17%, transparent); }
@keyframes armed-in { from { opacity: 0; transform: translateX(10px); filter: blur(2px); } }
@keyframes armed-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 35%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
.slide.armed.danger .slide-knob { animation-name: armed-pulse-danger; }
@keyframes armed-pulse-danger { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
@keyframes knob-done { 50% { scale: 1.12; } }

/* ——— Copy button under a link ——— */
.copy.copied { color: var(--ok); }

/* ——— Top-up: the total once a script counts it ——— */
.swap-total.live { animation: none; }
.swap-total { transform-origin: left center; }

/* The wealth meter under the amount: fills on a square-root scale, a tick for
   every tier that lights as the amount reaches it (js/forms.js::buildMeter). */
.rich-meter { position: relative; height: 6px; margin-top: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.swap:not([data-rich]) .rich-meter { opacity: 0; }
.rich-meter b {
  position: absolute; inset: 0; border-radius: inherit; transform-origin: left; transform: scaleX(var(--fill, 0));
  background: linear-gradient(90deg, var(--blue), var(--gold-b) 70%, var(--gold-c)); background-size: 200% 100%;
  transition: transform .45s var(--spring); animation: meter-flow 3s linear infinite;
}
.rich-meter i { position: absolute; top: 1px; bottom: 1px; left: var(--at); width: 2px; margin-left: -1px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: background-color .3s var(--ease), transform .3s var(--spring); }
.rich-meter i.on { background: var(--gold-ink); transform: scaleY(1.5); }
[data-rich="out"] .rich-meter b { background: var(--bad); animation: none; }
@keyframes meter-flow { to { background-position: -200% 0; } }

/* What the card says about the amount: a line that slides in when it changes,
   and a badge that pops whenever its words change. */
.rich-quip { min-height: 1.4em; margin-top: 6px; color: var(--ink-2); font-size: 13.5px; font-style: italic; }
.rich-quip:empty { display: none; }
.rich-quip.say { animation: quip-in .45s var(--ease) both; }
[data-rich="3"] .rich-quip, [data-rich="4"] .rich-quip, [data-rich="5"] .rich-quip { color: color-mix(in srgb, var(--gold-b) 70%, var(--ink-2)); }
[data-rich="out"] .rich-quip { color: var(--bad); }
.rich-badge.pop { animation: badge-pop .5s var(--spring) both; }
/* A regular donation: what a year of it makes (js/forms.js::buildYear). */
.rich-year { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; color: var(--ink-2); font-size: 13.5px; }
.rich-year[hidden] { display: none; }
.rich-year b { color: var(--ink); font-weight: 650; }
.rich-year-say { flex-basis: 100%; font-style: italic; }
.rich-year.say { animation: quip-in .45s var(--ease) both; }
/* The donation button's heart beats, the faster the larger the gift. */
form[data-donate] button[type="submit"] .icon { animation: heartbeat 1.6s var(--ease) infinite; transform-origin: 50% 55%; color: var(--bad); }
form[data-donate]:has(.swap[data-rich="2"]) button[type="submit"] .icon, form[data-donate]:has(.swap[data-rich="3"]) button[type="submit"] .icon { animation-duration: 1.1s; }
form[data-donate]:has(.swap[data-rich="4"]) button[type="submit"] .icon, form[data-donate]:has(.swap[data-rich="5"]) button[type="submit"] .icon { animation-duration: .7s; }
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 28% { transform: scale(1.08); } }
[data-rich="1"] .rich-badge { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
@keyframes quip-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
@keyframes badge-pop { 0% { transform: scale(.5) rotate(-6deg); opacity: 0; } 60% { transform: scale(1.12) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rich-meter b { animation: none; } }

@media (max-width: 900px) {
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* ——— Hover and press, everywhere a person can click ——— */
.button, button, summary.button { position: relative; overflow: hidden; isolation: isolate; }
.button:hover, button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .14); }
.button:active, button:active { transform: translateY(0) scale(.97); box-shadow: none; transition-duration: .08s; }
button.switch:hover, .toast-close:hover, .segmented button:hover { transform: none; box-shadow: none; }
.rail-item { transition: background-color .15s var(--ease), color .15s var(--ease), transform .2s var(--spring); }
.rail-item:hover { transform: translateX(3px); }
.rail-item:active { transform: translateX(1px) scale(.98); }
.dock a:active { transform: scale(.9); }
.dock a { transition: color .15s var(--ease), transform .2s var(--spring); }
.card { transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--spring); }
.card:hover { }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 14px 30px rgba(0, 0, 0, .10); }
.table-row, .row { transition: background-color .15s var(--ease), transform .2s var(--spring); }
.table-row:hover, a.row:hover { transform: translateX(2px); }
.url { transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.url:hover { }
.seg { transition: filter .15s var(--ease), transform .2s var(--spring); }
.bar:hover .seg { filter: brightness(1.15); }

/* A ripple from the point of the press (js/motion.js adds the dot). */
.ripple {
  position: absolute; z-index: -1; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: currentColor; opacity: .22; pointer-events: none; animation: ripple .55s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(var(--ripple-scale, 30)); opacity: 0; } }

/* ——— A page arriving ——— */
/* A page comes on screen readable (owner 26.10.2026: «lk still creates an empty page at
   the beginning and the animations look clunky», «Let's fix this architecturally»).
   Before, every card started transparent under <html class="entering">, a class two
   timers put on and took off: a busy first frame (the scripts' own start, 0.1 s on a
   slow phone) showed the transparent cards — an empty page — and a live update of a
   bill page replayed its card every few seconds. Now the page that arrives — the one
   the document loaded with, or one put in place without a view transition — is
   `main:not([data-settled])`, and its cards only glide the last 10 px into place, one
   after another (cascade at most 0.12 s, each in place in 0.34 s). Only transform
   moves: a card is never transparent, whatever the main thread is doing, and nothing
   waits for a timer. A <main> a script inserts for any other reason — a live update,
   a page a view transition brings — is settled (js/motion.js::settle) and stays still.
   One level moves: a grid of server tiles does not glide itself, its tiles do. */
main:not([data-settled]).dash > *, main:not([data-settled]).sheet > :not(.panel), main:not([data-settled]).sheet > .panel > :not(.srows), main:not([data-settled]) .gate, main:not([data-settled]) .aside > * { animation: glide-in .34s cubic-bezier(.16, 1, .3, 1) backwards; }
main:not([data-settled]).sheet > .panel > :nth-child(2), main:not([data-settled]).dash > :nth-child(2), main:not([data-settled]).sheet > :nth-child(2), main:not([data-settled]) .aside > :nth-child(1) { animation-delay: .03s; }
main:not([data-settled]).sheet > .panel > :nth-child(3), main:not([data-settled]).dash > :nth-child(3), main:not([data-settled]).sheet > :nth-child(3) { animation-delay: .06s; }
main:not([data-settled]).sheet > .panel > :nth-child(4), main:not([data-settled]).dash > :nth-child(4), main:not([data-settled]).sheet > :nth-child(4) { animation-delay: .09s; }
main:not([data-settled]).sheet > .panel > :nth-child(n+5), main:not([data-settled]).dash > :nth-child(n+5) { animation-delay: .12s; }
main:not([data-settled]) .srows > .srow { animation: glide-in .3s cubic-bezier(.16, 1, .3, 1) backwards; }
main:not([data-settled]) .srows > .srow:nth-child(n+2) { animation-delay: .02s; }
main:not([data-settled]) .srows > .srow:nth-child(n+4) { animation-delay: .04s; }
main:not([data-settled]) .srows > .srow:nth-child(n+8) { animation-delay: .06s; }
@keyframes glide-in { from { transform: translateY(10px); } }

/* The loading line at the top (js/motion.js): a thin gradient that grows
   with the load, a soft glowing head, a light running along it. */
.loading-line {
  --p: 0;
  position: fixed; z-index: 90; inset: 0 0 auto 0; height: 3px; pointer-events: none;
  opacity: 0; transition: opacity .35s var(--ease) .1s;
}
.loading-line.run { opacity: 1; transition: opacity .1s var(--ease); }
.loading-line.done { opacity: 0; transition: opacity .35s var(--ease) .15s; }
.loading-fill {
  position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p));
  background: linear-gradient(90deg, #4f8cf7 0%, #8b6cf6 45%, #c084fc 70%, #4f8cf7 100%) 0 0 / 200% 100%;
  border-radius: 0 3px 3px 0; box-shadow: 0 0 12px rgba(120, 120, 255, .55);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  animation: line-flow 1.4s linear infinite;
}
.loading-head {
  position: absolute; top: -3px; left: calc(var(--p) * 100% - 120px); width: 120px; height: 9px;
  background: radial-gradient(60% 100% at 100% 50%, rgba(190, 170, 255, .95), rgba(140, 140, 255, 0) 70%);
  filter: blur(2px); transition: left .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes line-flow { to { background-position: -200% 0; } }

/* The next page (js/navigate.js::swapIn): one view transition. The browser keeps the
   current page's picture until the next is in place; the content's two pictures
   cross-fade on one curve and add up (the browser's own plus-lighter pair), so the
   screen never dims, and the new one rises the last 6 px. The content's frame does not
   travel: it takes the new place at once and the old picture stays where the person saw
   it (`--paging-shift`, measured by the script), so a page left scrolled down does not
   slide. Between two pages of the signed-in shell (`:root.paging`) the menu and the
   bottom bar switch at once. No cross-document transition: a full load (a release, a
   failed fetch) drew the next page squeezed to its content's width while the browser
   animated between the two snapshots (owner 26.10.2026, screenshots). */
.rail { view-transition-name: rail; }
.dock { view-transition-name: dock; }
.main { view-transition-name: main-content; }
::view-transition-group(main-content) { animation-duration: 0s; }
::view-transition-old(main-content) { translate: 0 var(--paging-shift, 0px); animation: vt-out .22s var(--ease) both; }
::view-transition-new(main-content) { animation: vt-in .22s var(--ease) both; }
:root.paging::view-transition-old(rail), :root.paging::view-transition-old(dock) { display: none; }
:root.paging::view-transition-new(rail), :root.paging::view-transition-new(dock) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* Copy: the two labels share one place, the button never changes width. */
.copy .labels { display: inline-grid; }
.copy .labels > span { grid-area: 1 / 1; }
.copy .done, .copy.copied .idle { visibility: hidden; }
.copy.copied .done { visibility: visible; }
.copy .icon.check { display: none; }
.copy.copied .icon.check { display: inline; }
.copy.copied .icon.copy-icon { display: none; }
.link-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.link-actions > .copy, .link-actions > .act { margin: 0; }
.link-actions > .act[open] { flex-basis: 100%; }


/* ——— A page on its way: its shape, shimmering (js/navigate.js) ——— */
main.skeleton-on > :not(.skeleton) { display: none; }
.skeleton { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; animation: fade-in .25s var(--ease) both; }
.skeleton i { display: block; border-radius: 18px; background: linear-gradient(100deg, var(--tile) 30%, var(--tile-hover) 50%, var(--tile) 70%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton .sk-strip { height: 76px; }
.skeleton .sk-tile { height: 104px; }
.skeleton i:nth-child(3n+2) { animation-delay: .08s; }
.skeleton i:nth-child(3n) { animation-delay: .16s; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 640px) { .skeleton { grid-template-columns: 1fr; } .skeleton i:nth-child(n+7) { display: none; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } }

/* Top-up quick amounts (js/forms.js::buildQuick): chips with their hotkey. */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px 4px 12px; border: 0; border-radius: 999px;
  background: var(--card-2); color: var(--ink-2); font: inherit; font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), transform .2s var(--spring);
}
.quick-chip:hover { background: var(--tile-hover); color: var(--ink); transform: translateY(-1px); }
.quick-chip[aria-pressed="true"] { background: var(--tile-info); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 55%, transparent); }
.quick-chip kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--card);
  color: var(--muted); font: inherit; font-size: 11px; box-shadow: inset 0 0 0 1px var(--line);
}
@media (hover: none) { .quick-chip kbd { display: none; } .quick-chip { padding-right: 12px; } }

/* The top-up card's widget (js/widgets.js): a sticker in the corner of the total, eight motions
   repeated along the ladder. */
.rich-glow { position: relative; }
.rich-sticker { position: absolute; right: 16px; top: 12px; line-height: 0; pointer-events: none; color: var(--gold-b); }
[data-rich="1"] .rich-sticker, [data-rich="2"] .rich-sticker { color: var(--blue); }
.rich-sticker .icon { width: 38px; height: 38px; stroke-width: 1.5; }
.rich-sticker[hidden] { display: none; }
.rich-sticker.pop { animation: sticker-pop .55s var(--spring) both; }
.rich-sticker-face { display: inline-block; transform-origin: 50% 60%; }
.rich-sticker-face[data-look="0"] { animation: sticker-bob 2.4s ease-in-out infinite; }
.rich-sticker-face[data-look="1"] { animation: sticker-spin 6s linear infinite; }
.rich-sticker-face[data-look="2"] { animation: sticker-wobble 1.8s ease-in-out infinite; }
.rich-sticker-face[data-look="3"] { animation: sticker-pulse 1.6s ease-in-out infinite; }
.rich-sticker-face[data-look="4"] { animation: sticker-float 3.2s ease-in-out infinite; }
.rich-sticker-face[data-look="5"] { animation: sticker-flip 4s ease-in-out infinite; }
.rich-sticker-face[data-look="6"] { animation: sticker-sway 2.6s ease-in-out infinite; }
.rich-sticker-face[data-look="7"] { animation: sticker-glow 2.2s ease-in-out infinite; }
@keyframes sticker-pop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sticker-bob { 50% { transform: translateY(-6px); } }
@keyframes sticker-spin { to { transform: rotate(360deg); } }
@keyframes sticker-wobble { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes sticker-pulse { 50% { transform: scale(1.15); } }
@keyframes sticker-float { 33% { transform: translate(-4px, -5px) rotate(-4deg); } 66% { transform: translate(4px, -2px) rotate(4deg); } }
@keyframes sticker-flip { 45%, 55% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes sticker-sway { 50% { transform: translateX(-7px) skewX(-6deg); } }
@keyframes sticker-glow { 50% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gold-b) 80%, transparent)); transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .rich-sticker-face[data-look], .rich-sticker.pop { animation: none; } }

/* The page's way in the menu unfolds under its section when the page changes in place. */
.rail-path.grow { animation: path-in .32s var(--ease) both; }
.rail-path.grow .rail-path { animation: path-in .32s var(--ease) .07s both; }
.rail-path.grow .rail-path .rail-path { animation-delay: .14s; }
@keyframes path-in { from { opacity: 0; transform: translateX(-6px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* The year's charts come alive once, when the page arrives (above): columns grow from the
   baseline one month after another, the balance line draws itself left to right. The
   axes, labels and the table under each chart are there from the first frame. */
main:not([data-settled]) .plot .mark { animation: grow-up .5s cubic-bezier(.16, 1, .3, 1) backwards; transform-box: fill-box; transform-origin: 50% 100%; }
main:not([data-settled]) .plot rect.mark:is(.on, .past) { transform-origin: 0 50%; animation-name: grow-right; }
main:not([data-settled]) .plot .mark:nth-of-type(4n+2) { animation-delay: .04s; }
main:not([data-settled]) .plot .mark:nth-of-type(4n+3) { animation-delay: .08s; }
main:not([data-settled]) .plot .mark:nth-of-type(4n) { animation-delay: .12s; }
main:not([data-settled]) .plot .line { stroke-dasharray: 1; animation: draw .9s cubic-bezier(.65, 0, .35, 1) backwards; }
main:not([data-settled]) .plot .area { animation: fade-in .6s var(--ease) .3s backwards; }
@keyframes grow-up { from { transform: scaleY(0); } }
@keyframes grow-right { from { transform: scaleX(0); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* The small joys (js/delight.js): confetti, the balance line, empty places,
   and a few touches of movement on controls. Everything here is decoration;
   reduced motion shortens every animation to nothing (base.css). */

/* ——— Confetti and coins when a payment arrives ——— */
.confetti { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -16px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; background: var(--piece);
  opacity: 0; animation: confetti-fall var(--fall) var(--delay) cubic-bezier(.3, .6, .5, 1) both;
}
.confetti i.coin { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-c), var(--gold-b) 60%, var(--gold-a)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold-ink) 40%, transparent); }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(var(--turn)); }
}

/* ——— The line under the balance ——— */
/* The tile's line comes in with its tile, not after it. */
.tile-quip { margin-top: 4px; color: var(--muted); font-size: 13px; font-style: italic; }
[data-rich="3"] .tile-quip, [data-rich="4"] .tile-quip, [data-rich="5"] .tile-quip { color: color-mix(in srgb, var(--gold-b) 70%, var(--ink-2)); }

/* ——— Empty places ——— */
.empty-quip { color: var(--muted); font-size: 13px; font-style: italic; }
.empty-icon { animation: float-a 4.2s ease-in-out infinite; }

/* ——— Touches of movement ——— */
.button .icon, button .icon { transition: transform .25s var(--spring); }
.button:hover > .icon, button:hover > .icon { transform: translateY(-1px) rotate(-8deg) scale(1.12); }
.button:active > .icon, button:active > .icon { transform: scale(.9); }
.check input:checked + .box .icon { animation: pop .32s var(--spring); }
.card.stat { transition: transform .22s var(--spring), box-shadow .22s var(--ease); }
.card.stat:hover { transform: translateY(-2px); }
.swap-cell:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 45%, transparent), 0 8px 28px color-mix(in srgb, var(--blue) 14%, transparent); transition: box-shadow .25s var(--ease); }

/* ——— A list of names as chips: servers in a confirmation, each with its flag ——— */
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 148px; margin: 0 0 4px; padding: 2px 0; overflow-y: auto; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 7px; border-radius: 999px; background: var(--card-2); color: var(--ink-2); font-size: 13px; line-height: 1.2; }
.chips img { flex: none; border-radius: 50%; }

/* Support pages of the cabinet (owner 05.11.2026: «not very pretty», chosen look
   «Help desk, chat»): kind tiles with a line on when to choose them, tickets as
   cards with a coloured status, the conversation as a chat — your messages on the
   right, the support's on the left — and the reply box under it. Templates:
   support.html, support_ticket.html, support_new.html, support_review.html;
   shared marks — support_marks.html. */

/* ——— Kind mark: a rounded square with the kind's icon ——— */
.sup-mark {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--card-2); color: var(--ink-2);
}
.sup-mark .icon { width: 20px; height: 20px; }
.sup-mark.big { width: 52px; height: 52px; border-radius: 16px; }
.sup-mark.big .icon { width: 26px; height: 26px; }
.sup-mark[data-kind="bug"] { background: var(--bad-soft); color: var(--bad); }
.sup-mark[data-kind="idea"] { background: var(--warn-soft); color: var(--warn); }
.sup-mark[data-kind="refund"] { background: var(--ok-soft); color: var(--ok); }
.sup-mark[data-kind="business"] { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }
.sup-mark[data-kind="question"] { background: var(--info-soft); color: var(--blue); }

/* ——— Status chip: the tone says whose move it is ——— */
.sup-status {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: var(--t-sm); font-weight: 600; white-space: nowrap;
  background: var(--card-3); color: var(--muted);
}
.sup-status .icon { width: 14px; height: 14px; }
.sup-status.tone-info { background: var(--info-soft); color: var(--blue); }
.sup-status.tone-warn { background: var(--warn-soft); color: var(--warn); }
.sup-status.tone-ok { background: var(--ok-soft); color: var(--ok); }
.sup-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--card-2); color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap;
}
.sup-chip .icon { width: 14px; height: 14px; }
.sup-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ——— «Чем помочь?»: kind tiles ——— */
.sup-start-head { display: flex; gap: var(--s-4); align-items: flex-start; }
.sup-start-head h2 { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 6px; }
.sup-start-mark {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--primary); color: var(--primary-ink);
}
.sup-start-mark .icon { width: 26px; height: 26px; }
.sup-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--s-3); }
.sup-kind {
  position: relative; display: grid; align-content: start; gap: var(--s-3);
  min-height: 150px; padding: 16px; border-radius: var(--radius-inner);
  background: var(--tile); color: var(--ink); text-decoration: none;
  transition: background-color .2s var(--ease), transform .18s var(--spring);
}
.sup-kind:hover, .sup-kind:focus-visible { background: var(--tile-hover); transform: translateY(-2px); }
.sup-kind > .icon { position: absolute; top: 18px; right: 14px; width: 18px; height: 18px; color: var(--faint); transition: transform .18s var(--spring), color .2s var(--ease); }
.sup-kind:hover > .icon { color: var(--ink-2); transform: translateX(2px); }
.sup-kind-text { display: grid; gap: 4px; min-width: 0; }
.sup-kind-name { font-weight: 650; font-size: var(--t-md); line-height: 1.25; }
.sup-kind-line { color: var(--muted); font-size: var(--t-sm); line-height: 1.4; }

/* ——— Empty, locked and closed states: a mark, a title, a way on ——— */
.sup-empty, .sup-locked, .sup-closed { flex-direction: row; align-items: center; gap: var(--s-4); }
.sup-locked > div, .sup-closed > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sup-locked > div > p, .sup-closed > div > p { margin: 0; }
.sup-empty { flex-direction: column; align-items: flex-start; }
.sup-empty-mark {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--card-2); color: var(--muted);
}
.sup-empty-mark .icon { width: 22px; height: 22px; }
.sup-empty-title { font-weight: 650; font-size: var(--t-md); }
.panel.sup-closed > a.button, .panel.sup-locked > a.button { align-self: center; flex: none; }

/* ——— «Мои обращения»: ticket cards ——— */
.sup-mine-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.sup-mine-head h2 { font-size: var(--t-lg); margin: 0; }
.sup-count { color: var(--muted); font-size: var(--t-sm); }
.sup-tickets { display: grid; gap: var(--s-2); }
.sup-ticket {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  padding: 12px 14px; border-radius: var(--radius-inner);
  background: var(--tile); color: var(--ink); text-decoration: none;
  transition: background-color .2s var(--ease);
}
.sup-ticket:hover, .sup-ticket:focus-visible { background: var(--tile-hover); }
.sup-ticket.is-yours { background: var(--tile-warn); }
.sup-ticket-main { display: grid; gap: 3px; min-width: 0; }
.sup-ticket-subject { font-weight: 600; font-size: var(--t-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-ticket-meta { color: var(--muted); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-ticket-side { display: grid; justify-items: end; gap: 4px; }
.sup-ticket-time { color: var(--faint); font-size: var(--t-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sup-none { display: flex; align-items: center; gap: var(--s-3); padding: 18px 16px; border-radius: var(--radius-inner); background: var(--card-2); color: var(--muted); font-size: var(--t-base); }
.sup-none .icon { flex: none; width: 22px; height: 22px; }
.sup-archive > summary {
  display: flex; align-items: center; gap: var(--s-2); padding: 6px 2px; cursor: pointer; list-style: none;
  color: var(--muted); font-size: var(--t-sm); font-weight: 600;
}
.sup-archive > summary::-webkit-details-marker { display: none; }
.sup-archive > summary .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); transform: rotate(-90deg); }
.sup-archive[open] > summary .icon { transform: none; }
.sup-archive[open] > summary { margin-bottom: var(--s-2); }
.sup-archive .sup-ticket { background: var(--card-2); }
.sup-archive .sup-ticket .sup-mark { background: var(--card-3); color: var(--muted); }

/* ——— Ticket head ——— */
.sup-head { flex-direction: row; align-items: flex-start; gap: var(--s-4); }
.sup-head-main { display: grid; gap: var(--s-2); min-width: 0; }
.sup-head-id { margin: 0; color: var(--muted); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.sup-head h2 { margin: 0; font-size: var(--t-xl); line-height: 1.25; letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* ——— The conversation ——— */
.sup-chat { gap: var(--s-3); }
.sup-earlier { margin: 0; text-align: center; color: var(--faint); font-size: var(--t-sm); }
.sup-msg {
  position: relative; display: grid; gap: 4px;
  max-width: min(640px, 82%); padding: 10px 14px 12px;
  border-radius: 18px; background: var(--card-2);
}
.sup-msg.mine { justify-self: end; align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 6px; }
.sup-msg.theirs { align-self: flex-start; margin-left: 40px; border-bottom-left-radius: 6px; }
.sup-msg-face {
  position: absolute; left: -40px; bottom: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--card-3); color: var(--ink-2);
}
.sup-msg-face .icon { width: 16px; height: 16px; }
.sup-msg > p { margin: 0; }
.sup-msg-meta { font-size: var(--t-xs); font-weight: 600; opacity: .62; }
.sup-msg-text { font-size: var(--t-md); line-height: 1.5; }
.sup-msg-note { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); opacity: .72; }
.sup-msg-note .icon { width: 14px; height: 14px; flex: none; }

/* ——— Reply box under the conversation ——— */
.sup-compose { flex-direction: row; align-items: flex-end; gap: var(--s-3); padding: 12px; }
.sup-compose-field { flex: 1; min-width: 0; display: block; }
.sup-compose textarea {
  display: block; width: 100%; min-height: 52px; max-height: 40vh; resize: vertical;
  padding: 14px 16px; border: 0; border-radius: var(--radius-field);
  background: var(--card-2); color: var(--ink); font: 400 var(--t-md)/1.5 var(--sans);
}
.sup-compose textarea:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 0; }
.sup-compose > button { flex: none; }

/* ——— «Об обращении» beside the conversation ——— */
.sup-facts dl { margin: 0; display: grid; gap: 0; }
.sup-facts dl > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 9px 0; border-bottom: 1px solid var(--line); }
.sup-facts dl > div:last-child { border-bottom: 0; }
.sup-facts dt { color: var(--muted); font-size: var(--t-sm); }
.sup-facts dd { margin: 0; font-size: var(--t-base); font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; }
.sup-facts .actions { margin: 0; }
.sup-facts-note { margin: 0; color: var(--faint); font-size: var(--t-sm); }

/* ——— New ticket and its review ——— */
.sup-form-head { display: flex; align-items: center; gap: var(--s-3); }
.sup-form-head h2 { margin: 0; font-size: var(--t-xl); letter-spacing: -0.02em; }
.sup-new h3 { margin: 0; font-size: var(--t-md); }
.sup-new .act-rows { margin-top: 0; }
/* Answered steps: compact rows, two in a line; a row opens its step again. */
.sup-chosen .act-rows { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-2); }
.sup-chosen a.act-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; min-height: 0; padding: 8px 12px; background: var(--card-2); }
.sup-chosen .act-row-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); }
.sup-chosen .act-row-mark .icon { width: 15px; height: 15px; }
.sup-chosen .act-row-title { font-size: var(--t-sm); font-weight: 550; }
/* The choice: option tiles in a grid, one arrow each. */
.sup-choice .act-rows { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-2); }
.sup-choice a.act-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 56px; }
.sup-choice .act-row-mark { display: none; }
/* The form: short fields two in a line; ticks, files, the description and the button across. */
.sup-new .form { margin: 0; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sup-new .form > :is(.checks, button, label:has(textarea), label:has(input[type="file"])) { grid-column: 1 / -1; }
.sup-new .form .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2); }
.sup-new .form .checks legend { grid-column: 1 / -1; float: left; width: 100%; margin-bottom: var(--s-2); }
.sup-new .form label.check { align-items: center; padding: 11px 12px; border-radius: 12px; background: var(--card-2); transition: background-color .2s var(--ease); }
.sup-new .form label.check:hover { background: var(--hover); }
.sup-new .form label.check:has(input:checked) { background: var(--tile-ok); color: var(--ink); }
.sup-new .form input[type="file"] { font: inherit; font-size: var(--t-sm); color: var(--muted); }
.sup-new .form input[type="file"]::file-selector-button {
  margin-right: var(--s-3); min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--secondary); color: var(--secondary-ink); font: 600 var(--t-sm)/1 var(--sans); cursor: pointer;
}
.sup-new .form > button { justify-self: start; }
.sup-review .rows { display: grid; gap: 0; }
.sup-review .row { padding: 10px 0; border-bottom: 1px solid var(--line); background: none; }
.sup-review .row:last-child { border-bottom: 0; }

@media (max-width: 640px) {
  .sup-new .form { grid-template-columns: minmax(0, 1fr); }
  .sup-new .form > button { justify-self: stretch; }
  .sup-kinds { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .sup-kind { grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 0; padding: 12px 40px 12px 12px; }
  .sup-kind > .icon { top: 50%; margin-top: -9px; }
  .sup-ticket { grid-template-columns: auto minmax(0, 1fr); }
  .sup-ticket-side { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s-2); min-width: 0; }
  .sup-compose { flex-direction: column; align-items: stretch; }
  .panel.sup-compose > button { align-self: stretch; }
  .sup-head .sup-mark.big { width: 44px; height: 44px; border-radius: 14px; }
  .sup-msg { max-width: 88%; }
  .sup-msg.theirs { margin-left: 34px; }
  .sup-msg-face { left: -34px; width: 26px; height: 26px; }
  .sup-closed, .sup-locked { flex-wrap: wrap; }
  .sup-head h2 { font-size: var(--t-lg); }
  .sup-start-head h2 { font-size: var(--t-lg); }
}

.tl { width: 16px; height: 16px; flex: none; fill: color-mix(in oklab, currentColor 18%, transparent); stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tl-tile { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: color-mix(in oklab, currentColor 14%, transparent); border: 1px solid color-mix(in oklab, currentColor 32%, transparent); }
.tl-tile .tl { width: 17px; height: 17px; }
.tone-slate { color: #8f98ab; }
.tone-blue { color: #4c9aff; }
.tone-violet { color: #a284ff; }
.tone-aqua { color: #38d6e8; }
.tone-gold { color: #f6b93b; }
