/* Палитра и характер — из презентации «AI-отдел продаж»: почти чёрный фон, один синий акцент,
   стеклянные панели, шрифт Onest. Холст 1920×1080 масштабируется целиком под экран (телевизор). */
@font-face { font-family: "Onest"; src: url("/static/fonts/onest-cyrillic.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: "Onest"; src: url("/static/fonts/onest-latin.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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --blue: #2f72e0; --blue-dark: #0c52eb; --blue-soft: #5b9bff;
  --acc-30: rgba(91,155,255,.30); --acc-06: rgba(91,155,255,.07);
  --ink: #ffffff; --ink-2: rgba(255,255,255,.62); --ink-3: rgba(255,255,255,.38);
  --line: rgba(255,255,255,.10); --glass: rgba(255,255,255,.045); --glass-2: rgba(255,255,255,.07);
  --bg: #06070a; --good: #5b9bff; --bad: #ff7a6b; --warn: #f2c14e;
  --r-lg: 30px; --r-md: 22px; --r-sm: 14px;
  --k: 1;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); overflow: hidden;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "ss01" 1; }
[hidden] { display: none !important; }

#glow { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 18% 0%, rgba(47,114,224,.26), transparent 70%),
              radial-gradient(45% 45% at 100% 100%, rgba(12,82,235,.16), transparent 70%); }

/* --- вход --- */
#gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(440px, 100%); padding: 44px 40px 36px; border-radius: var(--r-lg); text-align: center;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(22px); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.brand { font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.gate-text { margin: 12px 0 28px; color: var(--ink-2); font-size: 17px; line-height: 1.45; text-wrap: balance; }
.btn { appearance: none; border: 0; cursor: pointer; width: 100%; padding: 17px 22px; border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--blue), var(--blue-dark)); color: #fff; font: inherit; font-size: 18px; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: default; }
.gate-err { min-height: 22px; margin: 16px 0 0; color: var(--bad); font-size: 15px; }

/* --- холст --- */
/* Холст ставится по центру окна абсолютно: в сетке с place-items он центрировался только при окне
   не меньше 1920×1080, а в меньшем уезжал вправо-вниз (поймано 13.11 на первом живом входе). */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--k)); transform-origin: center;
  display: grid; grid-template-rows: auto 1fr auto; padding: 64px 84px 44px; gap: 34px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.eyebrow { color: var(--blue-soft); font-size: 22px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 10px 0 0; font-size: 76px; line-height: 1.02; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; max-width: 1300px; }
h1 .accent { color: var(--blue-soft); }
h1.long { font-size: 60px; }
.top-right { text-align: right; flex: none; }
.week { font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.who { margin-top: 6px; color: var(--ink-3); font-size: 20px; }

.body { min-height: 0; display: grid; grid-template-rows: auto 1fr; gap: 26px; }
.note { color: var(--ink-2); font-size: 24px; line-height: 1.35; max-width: 1500px; }
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 22px; }
.tile { padding: 26px 30px 24px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); min-width: 0; }
.tile-label { color: var(--ink-2); font-size: 22px; line-height: 1.25; }
.tile-value { margin-top: 12px; font-size: 68px; line-height: 1; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.tile-unit { font-size: 30px; font-weight: 500; color: var(--ink-2); margin-left: 8px; letter-spacing: 0; }
.tile-foot { margin-top: 14px; display: flex; gap: 12px; align-items: baseline; font-size: 21px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.delta { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); }

.blocks { min-height: 0; display: grid; grid-template-columns: repeat(var(--bcols, 2), 1fr); gap: 22px; align-content: start; }
.block { padding: 26px 30px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.block-title { color: var(--ink-2); font-size: 22px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 24px; }
th { text-align: left; color: var(--ink-3); font-weight: 500; font-size: 19px; padding: 0 14px 10px 0; white-space: nowrap; }
td { padding: 11px 14px 11px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
th.num, td.num { text-align: right; padding-right: 0; padding-left: 14px; white-space: nowrap; }
td { color: var(--ink-2); } td.num { color: var(--ink); font-weight: 600; }
td:first-child { color: var(--ink); width: 55%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocks[data-n="3"] table { font-size: 21px; } .blocks[data-n="3"] th { font-size: 17px; }
.blocks[data-n="3"] .bar { grid-template-columns: minmax(0, 1.25fr) 1fr 64px; font-size: 22px; gap: 14px; }
.blocks[data-n="3"] .list li { font-size: 23px; }
.blocks[data-n="3"] .block-title { font-size: 20px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: baseline; font-size: 26px; line-height: 1.3; }
.list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-soft); transform: translateY(-3px); }
.list li.bad::before { background: var(--bad); } .list li.warn::before { background: var(--warn); }
.tag { display: inline-block; margin-left: 12px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 18px; white-space: nowrap; }
.bars { display: grid; gap: 15px; }
.bar { display: grid; grid-template-columns: 300px 1fr 150px; gap: 18px; align-items: center; font-size: 24px; }
.bar-label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 14px; border-radius: 999px; background: var(--glass-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-dark), var(--blue-soft)); min-width: 4px; }
.bar-value { text-align: right; font-weight: 600; white-space: nowrap; }
.empty { align-self: center; justify-self: center; text-align: center; color: var(--ink-3); font-size: 34px; grid-row: 1 / -1; }

.bottom { display: flex; justify-content: space-between; align-items: center; }
.dots { display: flex; gap: 10px; }
.dot { appearance: none; border: 0; cursor: pointer; height: 8px; width: 34px; border-radius: 999px; background: var(--glass-2); padding: 0; }
.dot[aria-current="true"] { background: var(--blue-soft); width: 62px; }
.dot:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 4px; }
.stamp { color: var(--ink-3); font-size: 19px; }

@media (prefers-reduced-motion: no-preference) {
  .body.swap { animation: rise .32s cubic-bezier(.22,.61,.36,1); }
  .dot { transition: width .25s, background .25s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
