/* Панель фермы — редизайн 12.10.2026.
   Светлая, тихая: главное — фраза-сводка и одна строка на телефон/аккаунт,
   технические подробности раскрываются по нажатию. Цвет несёт смысл:
   ультрамарин — действие и ожидание, зелёный — «живое, работает»,
   янтарь — норма/пауза/внимание, красный — только стоп и ЧП. */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/onest-cyr.woff2) 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: 400 700; font-display: swap;
  src: url(/static/fonts/onest-latext.woff2) 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: 400 700; font-display: swap;
  src: url(/static/fonts/onest-lat.woff2) 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 {
  --bg: #F6F7F4;
  --surface: #FFFFFF;
  --sunk: #EEF0EB;
  --ink: #18211C;
  --soft: #4A554F;
  --mute: #7D8882;
  --line: #E3E7E1;
  --act: #4C55E8;          /* ультрамарин: действие, навигация, «ждёт» */
  --act-tint: #ECEDFD;
  --go: #1DB16E;           /* живое */
  --go-tint: #E3F6EC;
  --amber: #E39A26;
  --amber-tint: #FBF0DC;
  --red: #E0444B;
  --red-tint: #FCE9E9;
  --off: #A3ACA6;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614; --surface: #1A201C; --sunk: #222924; --ink: #E9EDEA; --soft: #BAC3BD;
    --mute: #8A958F; --line: #2A322D; --act: #8B91FF; --act-tint: #262A4A; --go: #3AD08A;
    --go-tint: #173327; --amber: #F2B04A; --amber-tint: #3A2E17; --red: #FF6B70; --red-tint: #3E1E20;
    --off: #5F6963; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1; padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; border-radius: 8px; }

/* ── шапка ─────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 12px max(16px, calc((100vw - 1120px) / 2)); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { font-weight: 700; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--mute); white-space: nowrap; transition: color .2s, background .2s; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--act); background: var(--act-tint); font-weight: 500; }
.panic button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--red) 55%, transparent); background: transparent; color: var(--red);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, transform .1s;
}
.panic button i { width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.panic button:hover { background: var(--red); color: #fff; }
.panic button:active { transform: scale(.96); }

main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 24px; }

/* ── сводка ────────────────────────────────────────────────────────────── */
.hero { padding: 28px 2px 26px; }
.hero h1 {
  margin: 0; font-size: clamp(30px, 6.4vw, 52px); line-height: 1.06; font-weight: 600; letter-spacing: -.035em;
  max-width: 18ch; text-wrap: balance;
}
.hero p { margin: 10px 0 0; color: var(--soft); font-size: 17px; max-width: 52ch; }
.hero.t-red h1 { color: var(--red); }
.hero.t-go h1::before, .hero.t-wait h1::before, .hero.t-amber h1::before {
  content: ""; display: inline-block; width: .42em; height: .42em; border-radius: 50%; margin: 0 .32em .1em 0;
  vertical-align: middle; background: var(--act);
}
.hero.t-go h1::before { background: var(--go); animation: beat 2.4s var(--ease) infinite; }
.hero.t-amber h1::before { background: var(--amber); }

/* ── замечания, тосты, тревога ─────────────────────────────────────────── */
.toast { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--act-tint); color: var(--act); font-weight: 500; animation: drop .35s var(--ease); }
.note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--amber-tint); color: var(--soft); }
.notes { margin: -8px 0 18px; color: var(--soft); font-size: 14px; }
.notes summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 500; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.notes ul { margin: 8px 0 0; padding-left: 18px; }
.notes li { margin: 4px 0; }
.alarm {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 8px 0 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--red); color: #fff;
}
.alarm b { display: block; font-size: 18px; }
.alarm span { opacity: .9; font-size: 14px; }
.alarm .btn { background: #fff; color: var(--red); border-color: #fff; }

/* ── телефоны ──────────────────────────────────────────────────────────── */
.phones { display: grid; gap: 18px; }
@media (min-width: 900px) { .phones { grid-template-columns: 1fr 1fr; align-items: start; } }
.phone { background: var(--surface); border-radius: 24px; padding: 6px; }
.dev > summary { list-style: none; cursor: pointer; padding: 16px 16px 14px; border-radius: 19px; transition: background .2s; }
.dev > summary::-webkit-details-marker { display: none; }
.dev > summary:hover { background: var(--sunk); }
.dev-head { display: flex; align-items: center; gap: 10px; }
.dev-head h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.eng { color: var(--mute); font-size: 14px; }
.chev { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; position: relative; background: var(--sunk); transition: transform .3s var(--ease), background .2s; }
.chev::before { content: ""; position: absolute; left: 9px; top: 8px; width: 6px; height: 6px; border-right: 1.6px solid var(--soft); border-bottom: 1.6px solid var(--soft); transform: rotate(45deg); }
details[open] > summary .chev { transform: rotate(180deg); }
.doing { margin: 6px 0 0 20px; color: var(--soft); }
.phone.t-go .doing { color: var(--ink); }
.phone.t-red .doing { color: var(--red); font-weight: 500; }
.phone.t-amber .doing { color: var(--amber); }
.phone.t-off .doing { color: var(--mute); }

.beacon { width: 10px; height: 10px; border-radius: 50%; background: var(--off); flex: none; }
.beacon.on { background: var(--go); box-shadow: 0 0 0 4px var(--go-tint); }

.dev-body { padding: 4px 16px 18px; }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
.gauges div { background: var(--sunk); border-radius: 14px; padding: 10px 12px; }
.gauges dt { font-size: 12px; color: var(--mute); }
.gauges dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.gauges dd.small { font-size: 15px; font-weight: 500; padding-top: 5px; }
.gauges dd.hot { color: var(--amber); }
.gauges small { font-size: 12px; color: var(--mute); }
.gauges.stale { opacity: .5; }
.facts { margin: 0 0 12px; display: grid; gap: 6px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 14px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; }
.facts small, .meta small { color: var(--mute); }
.hold { margin: 8px 0; padding: 9px 12px; border-radius: 12px; font-size: 14px; background: var(--sunk); }
.hold b { font-weight: 600; margin-right: 6px; }
.hold.k-estop { background: var(--red-tint); color: var(--red); }
.hold.k-pause, .hold.k-owner_hands { background: var(--amber-tint); }
.hold.k-lease { background: var(--act-tint); }
.meta { margin: 8px 0 0; font-size: 13px; color: var(--mute); max-width: 70ch; }
.bad { color: var(--red); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  min-height: 42px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-weight: 500; transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { border-color: var(--act); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--act); border-color: var(--act); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--act) 86%, #000); }
.btn.ghost { border-color: transparent; color: var(--act); }
.btn.ghost:hover { background: var(--act-tint); }
.btn[disabled] { opacity: .55; }
form.inline { display: inline; }

/* ── аккаунты внутри телефона ──────────────────────────────────────────── */
.accs { list-style: none; margin: 0; padding: 0 0 4px; }
.accs li + li { border-top: 1px solid var(--line); }
.acc > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 13px 16px; border-radius: 16px; transition: background .2s;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--sunk); }
.nick { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why { grid-column: 1 / -1; color: var(--mute); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc[open] .why { display: none; }
.acc-body { padding: 0 16px 16px; }
.full { color: var(--soft); }
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 2px 0 6px; }
.nums div { background: var(--sunk); border-radius: 12px; padding: 8px 10px; }
.nums dt { font-size: 12px; color: var(--mute); }
.nums dd { margin: 0; font-size: 19px; font-weight: 600; }
.nums dd.small { font-size: 14px; font-weight: 500; padding-top: 4px; }
.nums small { font-size: 12px; color: var(--mute); font-weight: 400; }
.go { display: inline-block; margin-top: 10px; color: var(--act); font-weight: 500; text-decoration: none; }
.go:hover { text-decoration: underline; }

/* статус: точка + слово */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--soft); }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--off); position: relative; }
.st.t-go { color: var(--go); } .st.t-go i { background: var(--go); }
.st.t-wait { color: var(--act); } .st.t-wait i { background: var(--act); }
.st.t-amber { color: var(--amber); } .st.t-amber i { background: var(--amber); }
.st.t-red { color: var(--red); } .st.t-red i { background: var(--red); }
.st.t-off { color: var(--mute); }
.st.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--go); animation: ring 2s var(--ease) infinite; }

/* ── свёрнутое второстепенное ──────────────────────────────────────────── */
.more { margin-top: 26px; display: grid; gap: 4px; }
.fold > summary { min-width: 0; list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; padding: 12px 4px; color: var(--soft); font-weight: 500; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; width: 18px; color: var(--act); font-weight: 600; transition: transform .25s var(--ease); }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary em { min-width: 0; flex: 1; font-style: normal; color: var(--mute); font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-body { padding: 0 4px 12px 32px; }
pre.log { margin: 0; padding: 14px; border-radius: 14px; background: var(--surface); font: 12px/1.55 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: var(--soft); }
.cmds { list-style: none; margin: 0; padding: 0; }
.cmds li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cmds li p { grid-column: 2 / -1; margin: 0; color: var(--mute); font-size: 13px; }
.cmds .when { color: var(--mute); }
.cmds .res { font-weight: 500; color: var(--mute); }
.cmds .r-confirmed { color: var(--go); } .cmds .r-failed, .cmds .r-rejected { color: var(--red); }
.cmds .r-running, .cmds .r-requested { color: var(--act); } .cmds .r-unknown, .cmds .r-expired { color: var(--amber); }
.cmds .empty { display: block; color: var(--mute); border: 0; }

/* ── страницы реестра и контента ───────────────────────────────────────── */
.page-head { padding: 26px 2px 18px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); font-weight: 600; letter-spacing: -.03em; }
.page-head p { margin: 6px 0 0; color: var(--soft); }
.page-head .st { font-size: 16px; margin-top: 8px; }
.block { background: var(--surface); border-radius: 24px; padding: 20px; margin: 0 0 16px; }
.block h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.block h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.filters a { padding: 6px 13px; border-radius: 999px; text-decoration: none; font-size: 14px; color: var(--soft); background: var(--sunk); transition: background .2s, color .2s; }
.filters a:hover { color: var(--ink); }
.filters a.on { background: var(--act); color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.row-link { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 13px 8px; margin: 0 -8px; border-radius: 14px; text-decoration: none; transition: background .2s; }
.row-link:hover { background: var(--sunk); }
.row-link .sub { grid-column: 1 / -1; color: var(--mute); font-size: 14px; }
.stage { font-size: 13px; color: var(--mute); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--mute); font-size: 13px; padding: 6px 8px 6px 0; }
.tbl td { padding: 9px 8px 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.dim td { color: var(--mute); }
.scroll { overflow-x: auto; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--mute); }
.form .wide { grid-column: 1 / -1; }
input, select {
  min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg);
  max-width: 100%; transition: border-color .2s, background .2s;
}
input:focus, select:focus { outline: none; border-color: var(--act); background: var(--surface); }
.devrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.devrow:first-of-type { border-top: 0; }
.devrow .name { font-weight: 600; min-width: 120px; }
.devrow .name small { display: block; font-weight: 400; color: var(--mute); font-size: 13px; }
.devrow input { flex: 1; min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--sunk); font-size: 13px; color: var(--soft); }
.big-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.big-nums div { padding: 4px 0; }
.big-nums dt { font-size: 13px; color: var(--mute); }
.big-nums dd { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.big-nums small { font-size: 14px; color: var(--mute); font-weight: 400; }
.link-btn { border: 0; background: none; padding: 0; color: var(--mute); cursor: pointer; text-decoration: underline; min-height: 0; }

.foot { text-align: center; color: var(--mute); font-size: 13px; padding: 26px 0 8px; }
.logout { text-align: center; padding: 0 0 34px; }
.logout button { border: 0; background: none; color: var(--mute); cursor: pointer; text-decoration: underline; }

/* вход */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border-radius: 28px; padding: 30px 26px; display: grid; gap: 14px; animation: drop .5s var(--ease); }
.login-card h1 { margin: 0 0 4px; font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.login-card p { margin: 0; color: var(--mute); }
.login-card .err { color: var(--red); }
.login-card .btn { width: 100%; }

/* ── движение ──────────────────────────────────────────────────────────── */
details[open] > .dev-body, details[open] > .acc-body, details[open] > .fold-body, .notes[open] ul { animation: unfold .32s var(--ease); }
main.restoring details > * { animation: none !important; }
body.enter .hero { animation: rise .6s var(--ease) both; }
body.enter .phone, body.enter .block { animation: rise .6s var(--ease) both; }
body.enter .phone:nth-child(1), body.enter .block:nth-of-type(1) { animation-delay: .08s; }
body.enter .phone:nth-child(2), body.enter .block:nth-of-type(2) { animation-delay: .16s; }
body.enter .block:nth-of-type(3) { animation-delay: .22s; }
body.enter .more { animation: rise .6s var(--ease) .24s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── узкий экран ───────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .top { gap: 10px; padding: 10px 12px; }
  .brand { display: none; }
  .top nav a { padding: 6px 7px; font-size: 14px; }
  .nums { grid-template-columns: repeat(2, 1fr); }
  .panic button { padding: 6px 11px 6px 10px; font-size: 13px; }
  .panic .long { display: none; }
  .top nav { gap: 0; }
  .hero { padding: 22px 2px 20px; }
  .gauges { grid-template-columns: repeat(2, 1fr); }
  .phone { border-radius: 22px; }
  .block { padding: 16px; border-radius: 22px; }
}
.spaced { margin-top: 16px; }
@media (prefers-color-scheme: dark) { .btn.primary, .filters a.on { color: #10123A; } }

/* ── цифры и графики (12.10) ──────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 6px; }
.kpi { position: relative; background: var(--surface); border-radius: 20px; padding: 14px 16px 12px; display: grid; gap: 2px; }
.kpi-label { font-size: 13px; color: var(--mute); }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-feature-settings: "tnum" 0; }
.kpi-delta { font-size: 13px; color: var(--soft); min-height: 18px; }
.kpi-delta.up { color: var(--go); } .kpi-delta.down { color: var(--red); }
.kpi-note { font-size: 12px; color: var(--mute); }
.kpi .spark { width: 100%; max-width: 160px; height: 34px; margin: 4px 0 2px; }
.kpi-more { margin: 4px 2px 18px; }
.spark .ch-spark { fill: none; stroke: var(--off); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--act); } .ch-ring { fill: var(--surface); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-tick { fill: var(--mute); font: 10px "Onest", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ch-end { fill: var(--ink); font: 600 12px "Onest", system-ui, sans-serif; }
.ch-line { fill: none; stroke: var(--act); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: var(--act); opacity: .1; }
.ch-bar { fill: color-mix(in srgb, var(--act) 55%, var(--surface)); transition: fill .15s; }
.ch-bar.now { fill: var(--act); }
.ch-hit rect { fill: transparent; }
.ch-hit:hover .ch-bar { fill: var(--act); }
.ch-hover { fill: var(--act); opacity: 0; transition: opacity .15s; }
.ch-hit:hover .ch-hover { opacity: 1; }
.grow-grid { display: grid; gap: 16px; margin: 16px 0; }
@media (min-width: 900px) { .grow-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); } }
.grow-grid .block { margin: 0; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.row-between h2 { margin-bottom: 10px; }
.big-nums small.up { color: var(--go); }
.grow-acc .big-nums { grid-template-columns: repeat(2, 1fr); }
.grow-acc .big-nums dd { font-size: 26px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: minmax(110px, 210px) 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hb-name small { display: block; font-weight: 400; color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; border-radius: 0 4px 4px 0; }
.hb-bar { display: block; height: 10px; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--act); }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
body.enter .kpi { animation: rise .6s var(--ease) both; }
body.enter .kpi:nth-child(2) { animation-delay: .05s; } body.enter .kpi:nth-child(3) { animation-delay: .1s; }
body.enter .kpi:nth-child(4) { animation-delay: .15s; } body.enter .kpi:nth-child(5) { animation-delay: .2s; }
body.enter .hb-bar { animation: grow .7s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 12px 14px 10px; border-radius: 18px; }
  .kpi-value { font-size: 26px; }
  .hbars li { grid-template-columns: 38% 1fr 40px; gap: 8px; }
}

.only-narrow, .only-narrow-inline { display: none; }
/* телефон: меню — нижняя панель вкладок, в шапке остаются название и «Стоп» */
@media (max-width: 560px) {
  .only-wide { display: none; }
  .only-narrow { display: block; }
  .only-narrow-inline { display: inline; }
  .brand { display: inline; font-size: 18px; }
  /* 🪤 backdrop-filter у шапки делает её «контейнером» для position:fixed —
     нижняя панель тогда прилипает к шапке, а не к экрану */
  .top { justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .top nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; flex: none; overflow: visible;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .top nav a { text-align: center; padding: 9px 2px; font-size: 13px; border-radius: 12px; }
  .top nav a.on { background: var(--act-tint); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .panic .long { display: inline; }
}
.chtip { position: absolute; z-index: 30; max-width: 280px; padding: 8px 11px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.35; pointer-events: none; animation: drop .18s var(--ease); }
