@font-face { font-family: "Inter UI"; src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter UI"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; 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; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-cyrillic.woff2") format("woff2"); font-weight: 100 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; 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; }
@font-face { font-family: "Tektur"; src: url("fonts/tektur-cyrillic.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Tektur"; src: url("fonts/tektur-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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;

  --black-rgb: 0 0 0;
  --white-rgb: 255 255 255;

  --bg: #0a0a0f;
  --bg-2: #13131c;
  --panel: #101018;
  --panel-2: #181823;
  --panel-3: #222230;
  --glass: rgb(17 17 26 / .82);
  --track: rgb(var(--white-rgb) / .08);
  --line: rgb(var(--white-rgb) / .08);
  --line-2: rgb(var(--white-rgb) / .16);
  --edge: rgb(var(--white-rgb) / .06);
  --grid: rgb(var(--white-rgb) / .022);
  --paper: #ffffff;
  --ink: #000000;
  --rule: #cccccc;

  --text: #ececf4;
  --muted: #a8a8bd;
  --faint: #8a8aa3;

  --accent: #ff2bd6;
  --accent-hi: #ff62e1;
  --accent-soft: #ff8aea;
  --accent-dim: #7a1466;
  --accent-rgb: 255 43 214;
  --accent-2: #2bf0ff;
  --accent-2-soft: #8af6ff;
  --accent-2-dim: #0e6b78;
  --accent-2-rgb: 43 240 255;
  --violet: #a78bfa;
  --violet-rgb: 167 139 250;
  --violet-ink: #c9bcff;
  --violet-bg: rgb(var(--violet-rgb) / .16);
  --violet-bg-hi: rgb(var(--violet-rgb) / .3);
  --violet-line: rgb(var(--violet-rgb) / .45);
  --lilac: #9f9acc;
  --lilac-rgb: 159 154 204;
  --on-accent: #0a0a0f;

  --ok: #3ce8a0;
  --warn: #ffcc4d;
  --err: #ff5a6e;
  --ok-ink: #62f0b4;
  --warn-ink: #ffd878;
  --err-ink: #ff8c9a;
  --ok-rgb: 60 232 160;
  --warn-rgb: 255 204 77;
  --err-rgb: 255 90 110;
  --orange: #ff9340;
  --orange-rgb: 255 147 64;

  --hue-1: #2bf0ff;
  --hue-2: #ffcc4d;
  --hue-3: #3ce8a0;
  --hue-5: #ff2bd6;
  --hue-7: #a78bfa;

  --ring: rgb(var(--accent-2-rgb) / .75);
  --glow-accent: 0 0 0 1px rgb(var(--accent-rgb) / .55), 0 0 20px rgb(var(--accent-rgb) / .42);
  --glow-cyan: 0 0 0 1px rgb(var(--accent-2-rgb) / .5), 0 0 18px rgb(var(--accent-2-rgb) / .36);
  --glow-ok: 0 0 0 1px rgb(var(--ok-rgb) / .5), 0 0 16px rgb(var(--ok-rgb) / .34);
  --glow-err: 0 0 0 1px rgb(var(--err-rgb) / .55), 0 0 16px rgb(var(--err-rgb) / .38);
  --glow-focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-2), 0 0 18px rgb(var(--accent-2-rgb) / .4);
  --shadow-pop: 0 24px 60px rgb(var(--black-rgb) / .65);

  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 360ms;
  --t-page: 440ms;
  --t-sweep: 720ms;
  --t-breathe: 3.2s;
  --t-blink: 1.1s;
  --t-shimmer: 1.6s;
  --t-none: 1ms;
  --t-press: 60ms;
  --stagger-opt: 14ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --stagger: 36ms;
  --stagger-row: 22ms;

  --cut: 16px;
  --cut-sm: 10px;
  --radius: 10px;
  --radius-sm: 6px;
  --r: 6px;
  --r-sm: 4px;
  --r-lg: 10px;

  --font: "Inter UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Tektur", "Inter UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body::before, body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
  background:
    radial-gradient(60% 46% at 6% -8%, rgb(var(--accent-rgb) / .07), transparent 62%),
    radial-gradient(52% 46% at 106% 108%, rgb(var(--accent-2-rgb) / .05), transparent 62%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 48px 48px;
}
body::after { background: radial-gradient(ellipse 90% 75% at 50% 38%, transparent 42%, rgb(var(--black-rgb) / .5) 100%); }

::selection { background: rgb(var(--accent-rgb) / .38); color: var(--text); }

a { color: var(--accent-2); text-decoration: none; transition: color var(--t-fast) var(--ease-out), text-shadow var(--t-fast) var(--ease-out); }
a:hover { color: var(--accent-2-soft); text-shadow: 0 0 12px rgb(var(--accent-2-rgb) / .45); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 13px; }
.num, .value, td, th { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: var(--r-sm); }
:focus:not(:focus-visible) { outline: none; }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--accent-2-rgb) / .5); background-clip: padding-box; border: 2px solid transparent; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: fixed; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-weight: 600; transition: top var(--t-base) var(--ease-out); }
.skip:focus { top: 12px; color: var(--on-accent); }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.stage { min-width: 0; display: flex; flex-direction: column; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / .05), transparent 220px), rgb(var(--black-rgb) / .35);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 6px; font: 600 17px/1.1 var(--display); letter-spacing: .01em; }
.brand .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark {
  position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-lg);
  font-size: 0; color: var(--accent-soft);
  background: rgb(var(--accent-rgb) / .1);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .5), 0 0 14px rgb(var(--accent-rgb) / .2);
}
.mark::before { content: ">_"; font: 700 15px/1 var(--mono); letter-spacing: -.04em; }

.nav { display: grid; gap: 2px; }
.navgroup { height: 0; margin: 14px 0 0; overflow: hidden; font-size: 0; }
.navgroup:first-child { margin-top: 0; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-lg);
  color: var(--muted); font-weight: 500; overflow: hidden;
  transition: color var(--t-fast) var(--ease-out), background var(--t-base) var(--ease-out);
}
.nav a::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); transform: scaleY(0); transition: transform var(--t-base) var(--ease-out); }
.nav a:hover { color: var(--text); background: rgb(var(--white-rgb) / .04); text-shadow: none; }
.nav a:hover::before { transform: scaleY(.55); }
.nav a.on { color: var(--text); background: rgb(var(--accent-rgb) / .1); }
.nav a.on::before { background: var(--accent); transform: scaleY(1); }
.nav a .ic { transition: color var(--t-fast) var(--ease-out); }
.nav a:hover .ic { color: var(--accent-2); }
.nav a.on .ic { color: var(--accent-soft); }

.me { margin-top: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 2px 2px 6px; }
.me .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 700 14px/1 var(--display); color: var(--accent-2); background: rgb(var(--accent-2-rgb) / .1); }
.me b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .role { display: block; margin-top: 2px; color: var(--faint); font: 600 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.me form { margin: 0; }
.me .btn { min-width: 34px; padding: 0 8px; }

.bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0 32px;
  background: rgb(var(--black-rgb) / .55); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; font: 600 14px/1 var(--mono); color: var(--text); }
.crumb i { color: var(--accent); font-style: normal; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--ok-ink); }
.state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgb(var(--ok-rgb) / .6); animation: breathe var(--t-breathe) var(--ease-in-out) infinite; }
.state.off { color: var(--err-ink); }
.state.off i { background: var(--err); box-shadow: none; animation: none; }

.main { padding: 30px 32px 72px; max-width: 1400px; width: 100%; }
.main > * + * { margin-top: 20px; }
.main > .top + * { margin-top: 26px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top .heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pagechip { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-lg); color: var(--accent-2); background: rgb(var(--accent-2-rgb) / .06); box-shadow: inset 0 0 0 1px rgb(var(--accent-2-rgb) / .28); }
.pagechip .ic { width: 22px; height: 22px; }
.top h1 { font-size: 28px; font-weight: 600; letter-spacing: .005em; line-height: 1.15; }
.top .sub { margin-top: 5px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn.burger { display: none; }

.btn {
  --fill: linear-gradient(180deg, var(--accent-hi), var(--accent));
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 18px; border: 0; border-radius: var(--r); cursor: pointer;
  font: 600 14px/1.1 var(--font); letter-spacing: .01em; white-space: nowrap; color: var(--on-accent);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / .18);
  transition: transform var(--t-slow) var(--ease-spring), box-shadow var(--t-base) var(--ease-out), background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), filter var(--t-fast) var(--ease-out);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 32%, rgb(var(--white-rgb) / .4) 50%, transparent 68%); transform: translateX(-130%); transition: transform var(--t-sweep) var(--ease-out); }
.btn:hover, .btn:focus-visible { color: var(--on-accent); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / .3), var(--glow-accent); text-shadow: none; }
.btn:hover::before, .btn:focus-visible::before { transform: translateX(130%); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / .3), var(--glow-focus); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: var(--t-press); }
.btn[aria-busy="true"] {
  pointer-events: none; opacity: .9;
  background-image: repeating-linear-gradient(135deg, rgb(var(--white-rgb) / .22) 0 8px, transparent 8px 16px), var(--fill);
  background-size: 32px 32px, 100% 100%; animation: stripes var(--t-sweep) linear infinite;
}
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] { opacity: .4; filter: saturate(.45); cursor: not-allowed; pointer-events: none; box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / .12); }
.btn .ic { width: 16px; height: 16px; }
.btn .rip { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%; background: rgb(var(--white-rgb) / .45); transform: scale(0); opacity: .7; pointer-events: none; animation: ripple var(--t-sweep) var(--ease-out) forwards; z-index: 0; }

.btn.ghost, .quick .btn:not(.danger):not(.chip-btn) { --fill: linear-gradient(rgb(var(--white-rgb) / .04), rgb(var(--white-rgb) / .04)); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost::before, .quick .btn:not(.danger):not(.chip-btn)::before { background: linear-gradient(105deg, transparent 32%, rgb(var(--accent-2-rgb) / .22) 50%, transparent 68%); }
.btn.ghost:hover, .btn.ghost:focus-visible, .quick .btn:not(.danger):not(.chip-btn):hover, .quick .btn:not(.danger):not(.chip-btn):focus-visible { color: var(--accent-2-soft); background-color: rgb(var(--accent-2-rgb) / .08); box-shadow: inset 0 0 0 1px rgb(var(--accent-2-rgb) / .6); }
.btn.ghost:focus-visible, .quick .btn:not(.danger):not(.chip-btn):focus-visible { box-shadow: inset 0 0 0 1px rgb(var(--accent-2-rgb) / .65), var(--glow-focus); }
.btn.ghost:disabled, .btn.ghost[disabled] { box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { --fill: linear-gradient(rgb(var(--err-rgb) / .12), rgb(var(--err-rgb) / .12)); color: var(--err-ink); box-shadow: inset 0 0 0 1px rgb(var(--err-rgb) / .45); }
.btn.danger::before { background: linear-gradient(105deg, transparent 32%, rgb(var(--err-rgb) / .28) 50%, transparent 68%); }
.btn.danger:hover, .btn.danger:focus-visible { color: var(--err-ink); background-color: rgb(var(--err-rgb) / .16); box-shadow: inset 0 0 0 1px rgb(var(--err-rgb) / .8); }
.btn.small { min-height: 32px; padding: 5px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn.chip-btn { min-height: 30px; padding: 4px 12px; border-radius: 999px; font: 600 12px/1 var(--mono); letter-spacing: .04em; }
.btn.chip-btn.on, .btn.chip-btn[aria-pressed="true"] { color: var(--accent-soft); background-color: rgb(var(--accent-rgb) / .14); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .7); }
.btn[hidden] { display: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 14px; }
.card, .stat {
  --hue: var(--accent-2);
  position: relative; display: block; min-width: 0; padding: 18px 20px 16px; color: inherit; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out);
}
.card .label { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font: 600 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.card .chip { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--r); color: var(--hue); background: color-mix(in srgb, var(--hue) 12%, transparent); }
.card .chip .ic { width: 15px; height: 15px; }
.card .value { margin-top: 14px; font: 600 32px/1.05 var(--display); letter-spacing: 0; overflow-wrap: anywhere; }
.card .value.text { font-size: 22px; padding-top: 6px; }
.card .delta { margin-top: 9px; color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.t1 { --hue: var(--hue-1); }
.t2 { --hue: var(--hue-2); }
.t3 { --hue: var(--hue-3); }
.t5 { --hue: var(--hue-5); }
.t7 { --hue: var(--hue-7); }
.card.bad { --hue: var(--err); border-color: rgb(var(--err-rgb) / .38); }
.card.bad .value { color: var(--err-ink); }
.card.big .value { font-size: 46px; background: linear-gradient(90deg, var(--accent-soft), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
a.card:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-2); }
@media (hover: hover) {
  a.card:hover { background-color: var(--panel-2); border-color: color-mix(in srgb, var(--hue) 55%, transparent); text-shadow: none; }
}

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.grid.start { align-items: start; }

.box {
  position: relative; min-width: 0; padding: 22px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.box h2 { position: relative; padding-left: 14px; font-size: 17px; font-weight: 600; letter-spacing: .01em; line-height: 1.3; }
.box h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--accent); }
.box.keybox h2 { margin-bottom: 16px; }
.box > * + * { margin-top: 16px; }
.box .head.bare { padding: 0; }
.box.narrow { max-width: 520px; }
.box.flush { padding: 0; overflow: hidden; }
.box.flush > * + * { margin-top: 0; }
.box .head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; }
.box .head > * + * { margin-top: 0; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 18px; text-align: left; color: var(--faint); font: 600 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid var(--edge); vertical-align: middle; transition: background var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
tr:last-child td { border-bottom: 0; }
tbody tr { animation: row var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--n, 0) * var(--stagger-row)); }
tbody tr:hover td { background: rgb(var(--accent-2-rgb) / .05); }
tr.link { cursor: pointer; }
td.r, th.r { text-align: right; }
td.num { white-space: nowrap; }
.ua { display: inline-block; max-width: min(240px, 34vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
td .sub { display: block; margin-top: 2px; color: var(--faint); font-size: 12.5px; }
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty::before { content: ">_"; display: block; margin-bottom: 10px; font: 700 22px/1 var(--mono); color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: var(--r-sm); font: 600 11px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; color: var(--muted); background: rgb(var(--white-rgb) / .06); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok-ink); background: rgb(var(--ok-rgb) / .12); }
.pill.warn { color: var(--warn-ink); background: rgb(var(--warn-rgb) / .12); }
.pill.err { color: var(--err-ink); background: rgb(var(--err-rgb) / .12); }
.pill.accent { color: var(--accent-soft); background: rgb(var(--accent-rgb) / .14); }
.pill.cyan { color: var(--accent-2); background: rgb(var(--accent-2-rgb) / .1); }
.pill.plain::before { display: none; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; min-width: 0; }
.field label { color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: .01em; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], textarea {
  width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-2);
  color: var(--text); outline: none;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search] { height: 42px; padding-top: 0; padding-bottom: 0; }
input:hover, textarea:hover { border-color: var(--line-2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: rgb(var(--accent-2-rgb) / .8); box-shadow: 0 0 0 3px rgb(var(--accent-2-rgb) / .14); }
input:user-invalid, textarea:user-invalid { border-color: rgb(var(--err-rgb) / .7); box-shadow: 0 0 0 3px rgb(var(--err-rgb) / .12); }
input:disabled, textarea:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
input[type=date] { color-scheme: dark; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); color: var(--text); }
.form { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 150px; }
.row > .btn { flex: none; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.filters .field { flex: 1 1 140px; }
.filters .field.grow { flex: 2 1 230px; }
.filters .field:only-child { flex: 0 1 280px; }
.field.wide { flex: 2 1 230px; }
.row > form { display: contents; }
.actions > form { margin: 0; }

.check { display: flex; align-items: center; gap: 12px; min-height: 40px; color: var(--text); font-size: 14px; cursor: pointer; }
.check:hover { color: var(--accent-2-soft); }
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 999px; cursor: pointer;
  background: rgb(var(--white-rgb) / .07); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
input[type=checkbox]::before { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform var(--t-slow) var(--ease-spring), background var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
input[type=checkbox]:hover { box-shadow: inset 0 0 0 1px rgb(var(--accent-2-rgb) / .5); }
input[type=checkbox]:checked { background: rgb(var(--accent-rgb) / .24); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .85); }
input[type=checkbox]:checked::before { transform: translateX(18px); background: var(--accent-soft); }
input[type=checkbox]:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent-2), var(--glow-focus); }
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }

.sel { position: relative; display: block; width: 100%; min-width: 0; }
.sel-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.sel-trigger {
  position: relative; width: 100%; height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; outline: none;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.sel-trigger:hover { border-color: var(--line-2); }
.sel-trigger:focus-visible, .sel-trigger[aria-expanded="true"] { border-color: rgb(var(--accent-2-rgb) / .8); box-shadow: 0 0 0 3px rgb(var(--accent-2-rgb) / .14); }
.sel-trigger:disabled { opacity: .5; cursor: not-allowed; }
.sel-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-val.ph { color: var(--faint); }
.sel-caret { flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(45deg); transition: transform var(--t-base) var(--ease-spring), margin var(--t-base) var(--ease-spring); }
.sel-trigger[aria-expanded="true"] .sel-caret { transform: rotate(225deg); margin-top: 4px; }
.sel-list {
  position: fixed; z-index: 90; margin: 0; padding: 6px; list-style: none; max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain;
  background-color: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  transform-origin: top center; animation: selIn var(--t-base) var(--ease-out) both;
}
.sel-list.up { transform-origin: bottom center; }
.sel-list.out { animation: selOut var(--t-fast) var(--ease-in-out) both; }
.sel-group { padding: 8px 12px 4px; color: var(--faint); font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.sel-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r); color: var(--muted); cursor: pointer;
  animation: selOpt var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--n, 0) * var(--stagger-opt));
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.sel-opt::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); transform: scaleY(0); transition: transform var(--t-base) var(--ease-out); }
.sel-opt[data-active] { background: rgb(var(--accent-2-rgb) / .1); color: var(--text); }
.sel-opt[data-active]::before { transform: scaleY(1); }
.sel-opt[aria-selected="true"] { color: var(--accent-2-soft); font-weight: 600; }
.sel-opt[aria-selected="true"]::after { content: ""; flex: none; width: 5px; height: 10px; margin-right: 4px; border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(45deg); }
.sel-opt[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.num-field { position: relative; display: block; width: 100%; }
.num-field input { padding-right: 78px; }
.num-steps { position: absolute; top: 5px; right: 5px; bottom: 5px; display: flex; gap: 3px; }
.num-btn { display: grid; place-items: center; width: 30px; padding: 0; border: 0; border-radius: var(--r-sm); background: rgb(var(--white-rgb) / .05); color: var(--muted); font: 600 17px/1 var(--mono); cursor: pointer; user-select: none; touch-action: manipulation; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spring); }
.num-btn:hover { background: rgb(var(--accent-2-rgb) / .16); color: var(--accent-2); }
.num-btn:active { transform: scale(.88); background: rgb(var(--accent-rgb) / .22); color: var(--accent-soft); }
.num-field:has(input:disabled) .num-steps { opacity: .4; pointer-events: none; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { position: relative; display: flex; gap: 4px; max-width: 100%; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a, .tabs .tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 12px; border: 0; border-radius: var(--r) var(--r) 0 0; background: none; color: var(--muted); font: 600 13.5px/1 var(--font); white-space: nowrap; cursor: pointer; transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.tabs a:hover, .tabs .tab:hover { color: var(--text); background: rgb(var(--white-rgb) / .04); text-shadow: none; }
.tabs .on, .tabs [aria-selected="true"] { color: var(--accent-2-soft); text-shadow: none; }
.tabs:not([data-ind]) .on, .tabs:not([data-ind]) [aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--accent-2); }
.tabs[data-ind]::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--iw); height: 2px; border-radius: 2px; transform: translateX(var(--ix)); background: var(--accent-2); transition: transform var(--t-slow) var(--ease-out), width var(--t-slow) var(--ease-out); pointer-events: none; }
.pane { display: grid; gap: 16px; align-content: start; }
.pane[hidden] { display: none; }
.pane:not([hidden]) { animation: rise var(--t-page) var(--ease-out) both; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: rgb(var(--accent-2-rgb) / .8); transform-origin: bottom; transform-box: fill-box; animation: grow var(--t-page) var(--ease-out) both; animation-delay: calc(var(--n, 0) * var(--stagger-opt)); transition: fill var(--t-fast) var(--ease-out); }
.chart .bar:hover { fill: var(--accent-2); }
.chart .bar.bad { fill: var(--err); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 6; }
.chart text { fill: var(--faint); font-size: 12px; font-family: var(--mono); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--accent-2); }
.legend i.bad { background: var(--err); }

.note { position: relative; padding: 12px 16px 12px 18px; border-radius: var(--r); font-size: 14px; background: rgb(var(--white-rgb) / .04); overflow: hidden; }
.note::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-2); }
.note.err { background: rgb(var(--err-rgb) / .09); color: var(--err-ink); }
.note.err::before { background: var(--err); }
.note.ok { background: rgb(var(--ok-rgb) / .09); color: var(--ok-ink); }
.note.ok::before { background: var(--ok); }
.note.warn { background: rgb(var(--warn-rgb) / .09); color: var(--warn-ink); }
.note.warn::before { background: var(--warn); }

.secret { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--bg-2); box-shadow: inset 0 0 0 1px rgb(var(--accent-2-rgb) / .35); }
.secret code { flex: 1; font: 600 19px/1.2 var(--mono); letter-spacing: .03em; color: var(--accent-2-soft); overflow-wrap: anywhere; user-select: all; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 16px 18px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-pop);
  animation: toastIn var(--t-slow) var(--ease-spring) both;
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ok); }
.toast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ok); opacity: .7; transform-origin: left; animation: drain var(--life, var(--t-slow)) linear forwards; }
.toast.err::before, .toast.err::after { background: var(--err); }
.toast .ic { margin-top: 1px; color: var(--ok); }
.toast.err .ic { color: var(--err); }
.toast:hover::after { animation-play-state: paused; }
.toast.leaving { animation: toastOut var(--t-base) var(--ease-in-out) both; }
.toast.wait::before { background: var(--accent-2); }
.toast.wait::after { display: none; }
.toast .ic.spinner { flex: none; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--accent-2); border-right-color: transparent; border-radius: 50%; animation: spin var(--t-sweep) linear infinite; }

dialog { padding: 24px 24px 22px; width: min(440px, calc(100vw - 32px)); border: 0; border-radius: var(--r-lg); background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-pop); overflow: hidden; }
dialog[open] { animation: pop var(--t-base) var(--ease-spring) both; }
dialog::backdrop { background: rgb(var(--black-rgb) / .62); backdrop-filter: blur(5px); }
dialog h3 { font-size: 18px; margin-bottom: 10px; }
dialog .actions { margin-top: 20px; justify-content: flex-end; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(780px, 100vw); display: flex; flex-direction: column; background: var(--panel); box-shadow: inset 1px 0 0 var(--line-2), -30px 0 80px rgb(var(--black-rgb) / .65); transform: translateX(105%); transition: transform var(--t-slow) var(--ease-out); }
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.drawer .body { overflow: auto; padding: 20px 22px 44px; display: grid; gap: 18px; align-content: start; grid-auto-rows: max-content; }
.scrim { position: fixed; inset: 0; z-index: 49; background: rgb(var(--black-rgb) / .55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease-out); }
.scrim.open { opacity: 1; pointer-events: auto; }
.section h3 { margin-bottom: 8px; color: var(--faint); font: 600 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
pre.code { margin: 0; padding: 13px 15px; max-height: 360px; overflow: auto; border-radius: var(--r); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
table.heads td { padding: 6px 10px; font: 12.5px/1.4 var(--mono); border-bottom: 1px solid var(--edge); overflow-wrap: anywhere; }
table.heads td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }

.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card-login {
  position: relative; width: min(420px, 100%); padding: 34px 32px 30px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 60%, transparent) top left / 100% 2px no-repeat, var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 40px 100px rgb(var(--black-rgb) / .65);
  animation: pop var(--t-page) var(--ease-out) both;
}
.auth .brand { padding: 0; margin-bottom: 24px; }
.auth .mark { width: 48px; height: 48px; animation: settle var(--t-slow) var(--ease-spring) both; }
.auth .mark::before { font-size: 19px; }
.auth h1 { font-size: 26px; font-weight: 600; letter-spacing: .005em; }
.auth .form { margin-top: 24px; }
.auth .btn { width: 100%; min-height: 46px; }

.errorpage { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.errorpage .code { font: 700 clamp(72px, 14vw, 128px)/1 var(--display); letter-spacing: .02em; color: var(--text); text-shadow: 4px 0 rgb(var(--accent-rgb) / .75), -4px 0 rgb(var(--accent-2-rgb) / .75); }
.errorpage h1 { margin-top: 14px; font-size: 24px; }
.errorpage p { margin: 10px auto 0; color: var(--muted); max-width: 440px; }
.errorpage .actions { justify-content: center; margin-top: 24px; }

.main > *, .cards > *, .grid > *, .rise { animation: rise var(--t-page) var(--ease-out) both; }
.main > :nth-child(2), .cards > :nth-child(2), .grid > :nth-child(2) { animation-delay: calc(1 * var(--stagger)); }
.main > :nth-child(3), .cards > :nth-child(3), .grid > :nth-child(3) { animation-delay: calc(2 * var(--stagger)); }
.main > :nth-child(4), .cards > :nth-child(4), .grid > :nth-child(4) { animation-delay: calc(3 * var(--stagger)); }
.main > :nth-child(5), .cards > :nth-child(5), .grid > :nth-child(5) { animation-delay: calc(4 * var(--stagger)); }
.main > :nth-child(n+6), .cards > :nth-child(n+6), .grid > :nth-child(n+6) { animation-delay: calc(5 * var(--stagger)); }

.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 600 11.5px/1 var(--mono); letter-spacing: .06em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: breathe var(--t-breathe) var(--ease-in-out) infinite; }
.live.off i { background: var(--faint); box-shadow: none; animation: none; }

.result { display: grid; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); animation: rise var(--t-page) var(--ease-out) both; }
.result > * + * { margin-top: 0; }

details.more { padding: 0; border-top: 1px solid var(--line); }
details.more summary { cursor: pointer; padding: 14px 0 8px; color: var(--muted); font-weight: 500; font-size: 14px; list-style: none; }
details.more summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 12px 1px 3px; border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); transition: transform var(--t-base) var(--ease-spring); }
details.more[open] summary::before { transform: rotate(45deg); }
details.more[open] summary { color: var(--text); }
details.more .hint { margin-bottom: 10px; }
details.more[open] > :not(summary) { animation: reveal var(--t-base) var(--ease-out) both; }

textarea.list { min-height: 130px; padding: 13px 15px; resize: vertical; font: 13px/1.6 var(--mono); white-space: pre; overflow: auto; tab-size: 4; }

.meter { position: relative; height: 10px; border-radius: 3px; background: var(--track); overflow: hidden; box-shadow: inset 0 0 0 1px var(--edge); }
.meter i { display: block; position: relative; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform var(--t-page) var(--ease-out); }
.meter.run i { background-image: repeating-linear-gradient(135deg, rgb(var(--white-rgb) / .2) 0 8px, transparent 8px 16px), linear-gradient(90deg, var(--accent), var(--accent-2)); background-size: 32px 32px, 100% 100%; animation: stripes var(--t-sweep) linear infinite; }
.meterline { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.meterline b { color: var(--text); font-weight: 600; font-family: var(--mono); }

.spark { display: block; width: 100%; height: 56px; color: var(--accent-2); overflow: visible; }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark path.fill { fill: currentColor; fill-opacity: .16; stroke: none; filter: none; }

.cards.census { grid-template-columns: repeat(4, minmax(0, 1fr)); }
td a { white-space: nowrap; }
.grid.top { align-items: start; }
table.roomy { min-width: 430px; }

.box.console { padding: 0; overflow: hidden; }
.box.console > * + * { margin-top: 0; }
.box.console > .head { padding: 11px 16px; background: rgb(var(--white-rgb) / .03); border-bottom: 1px solid var(--line); font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.box.console > .head > :first-child { margin-right: auto; }
.box.console > .head h2 { font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-left: 0; }
.box.console > .head h2::before { display: none; }
.term {
  position: relative; height: clamp(320px, calc(100vh - 360px), 900px); overflow: auto; padding: 12px 0;
  background: rgb(var(--black-rgb) / .45);
  font: 12.5px/1.75 var(--mono); outline: none;
}
.term:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }
.term:empty::before { content: "Строк пока нет"; display: block; padding: 28px 18px; color: var(--faint); }
.term:not(:empty)::after { content: "\2588"; display: block; padding: 0 18px; color: var(--accent-2); text-shadow: 0 0 10px var(--accent-2); animation: blink var(--t-blink) steps(2, jump-none) infinite; }
.ln { display: flex; gap: 16px; width: max-content; min-width: 100%; padding: 0 18px; white-space: pre; box-shadow: inset 2px 0 0 transparent; transition: background var(--t-fast) var(--ease-out); }
.ln:hover { background: rgb(var(--white-rgb) / .04); }
.ln time { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }
.ln span { color: var(--muted); }
.ln.info span { color: var(--accent-2-soft); }
.ln.ok { box-shadow: inset 2px 0 0 var(--ok); }
.ln.ok span { color: var(--ok-ink); }
.ln.warn { box-shadow: inset 2px 0 0 var(--warn); background: rgb(var(--warn-rgb) / .05); }
.ln.warn span { color: var(--warn-ink); }
.ln.err { box-shadow: inset 2px 0 0 var(--err); background: rgb(var(--err-rgb) / .07); }
.ln.err span { color: var(--err-ink); }

.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgb(var(--accent-2-rgb) / .2); border-top-color: var(--accent-2); animation: spin var(--t-sweep) linear infinite; vertical-align: -3px; }
.skeleton { display: block; min-height: 14px; border-radius: var(--r-sm); background-color: var(--bg-2); background-image: linear-gradient(100deg, transparent 25%, rgb(var(--accent-2-rgb) / .09) 50%, transparent 75%); background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer var(--t-shimmer) linear infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(.6) rotate(-10deg); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.97); } }
@keyframes drain { to { transform: scaleX(0); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes stripes { to { background-position: 32px 0, 0 0; } }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes selIn { from { opacity: 0; transform: translateY(-6px) scaleY(.92); } to { opacity: 1; transform: none; } }
@keyframes selOut { to { opacity: 0; transform: translateY(-4px) scaleY(.96); } }
@keyframes selOpt { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-105%); transition: transform var(--t-slow) var(--ease-out); background: var(--panel); box-shadow: 1px 0 0 var(--line-2), 30px 0 80px rgb(var(--black-rgb) / .6); }
  .side.open { transform: none; }
  .btn.burger { display: inline-flex; }
  .grid.two, .grid.wide, .grid.flip { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 24px 18px 56px; }
  .bar { padding: 0 18px; }
  .cards.census { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .top h1 { font-size: 22px; }
  .pagechip { width: 40px; height: 40px; }
  .card .value { font-size: 24px; }
  .chart text { font-size: 24px; }
  .card.big .value { font-size: 34px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .card { padding: 14px 14px 13px; }
  .main { padding: 18px 14px 44px; }
  .box { padding: 18px 16px; }
  .box .head { padding: 18px 16px 12px; }
  .filters { padding: 16px; }
  th, td { padding: 11px 12px; }
  .term { font-size: 12px; height: clamp(300px, calc(100vh - 300px), 700px); }
  .ln { gap: 10px; padding: 0 12px; }
}

@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
  .sel-opt { padding-top: 13px; padding-bottom: 13px; }
  .num-btn { width: 36px; }
  .num-field input { padding-right: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: var(--t-none) !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: var(--t-none) !important; }
  .term:not(:empty)::after { animation: none; }
  .btn::before { display: none; }
}

@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  .btn:focus-visible, a.card:focus-visible, input:focus-visible, textarea:focus-visible, .sel-trigger:focus-visible, .term:focus-visible { outline: 2px solid Highlight !important; outline-offset: 2px; }
}

@media print {
  .side, .bar, .burger, .toasts, .actions, body::before, body::after { display: none !important; }
  .app { display: block; }
  body { background: var(--paper); color: var(--ink); }
  .box, .card { box-shadow: none; clip-path: none; border: 1px solid var(--rule); }
}
