/* Аналитика для админов: те же бумага и чернила; графики по правилам dataviz — тонкие метки, скругление 4px только на конце,
   2px зазоры цвета фона, подписи текстовыми цветами (не цветом серии), у каждого графика — таблица. Только светлая тема. */
.insights {
  overflow: auto;
  --series-1: #1a8f72;   /* слот 1: зелёный под бренд (проверен валидатором вместе со слотами 2–3) */
  --series-2: #2a78d6;
  --series-3: #eb6834;
  --deemph: #c9cec9;
  --grid: #e9ece9;
  --axis: #c5ccc6;
  --whisker: #7d8883;
  scroll-padding-top: 130px;
}
.insights .top { position: sticky; top: 0; z-index: 20; }
.ins-title { font-weight: 600; font-size: 16px; }
.admin-pill { background: var(--marker); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 600; vertical-align: 3px; }
.role-tabs { display: inline-flex; gap: 2px; background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: 8px;
  overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.role-tabs::-webkit-scrollbar { display: none; }
.role-tabs button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.role-tabs button:hover { color: var(--ink); }
.role-tabs button.on { background: var(--paper); color: var(--pen-2); font-weight: 600; box-shadow: 0 1px 2px rgba(30, 39, 36, .12); }
.back-link { margin-left: auto; color: var(--pen); font-weight: 500; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.ins-filters { position: sticky; top: var(--top-h); z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 24px;
  background: var(--page); border-bottom: 1px solid var(--line); }
.ins-filters select { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); padding: 0 28px 0 10px; font-size: 13.5px;
  color: var(--ink-2); max-width: 210px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366716c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.ins-filters select.on { border-color: var(--pen); background-color: var(--pen-tint); color: var(--pen-2); }
.ins-filters .reset { border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13.5px; }
.ins-filters .count { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.ins-filters .count b { color: var(--ink); }

.ins-main { max-width: 1240px; margin: 0 auto; padding: 18px 24px 60px; transition: opacity .2s; }
.ins-main.loading { opacity: .55; }
.ins-note { color: var(--muted); margin: 0 0 10px; font-size: 14px; max-width: 900px; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; font-size: 13.5px; }
.toc a { color: var(--pen); text-decoration: none; font-weight: 500; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sec-h { font-size: 20px; letter-spacing: -.01em; margin: 36px 0 12px; }
.caveat { background: var(--marker-soft); border: 1px solid #f1dc8f; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 13.5px;
  color: var(--ink-2); line-height: 1.6; }
.caveat b { color: var(--ink); }
.caveat .tbtn { margin: 2px 0 2px 6px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; }
.kpi .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.ch { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ch h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.35; text-wrap: balance; }
.ch p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 760px; }
.ch .tools { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: var(--paper); padding: 4px 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--pen-tint); color: var(--pen-2); font-weight: 600; }
.tbtn { border: 1px solid var(--line-2); background: var(--paper); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tbtn:hover { border-color: var(--pen); color: var(--pen-2); }
.tbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.foot { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
.empty-chart { color: var(--muted); font-size: 13.5px; padding: 18px 0; }
.grp-h { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 6px; }
.grp-h + * { margin-bottom: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.split h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* легенда и ключи */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 12px; }
.legend.after { margin: 10px 0 0; }
.legend span { display: inline-flex; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; flex-shrink: 0; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.legend .dot.pen { background: var(--series-1); }
.legend .k-box { width: 18px; height: 10px; background: var(--series-1); }
.legend .k-whisk { width: 18px; height: 8px; border-radius: 0; background: linear-gradient(var(--whisker), var(--whisker)) center / 100% 2px no-repeat;
  border-left: 2px solid var(--whisker); border-right: 2px solid var(--whisker); }
.legend .k-iqr { width: 18px; height: 6px; border-radius: 3px; background: rgba(26, 143, 114, .35); }
.legend .k-ref { width: 0; height: 14px; border-radius: 0; border-left: 2px dashed var(--whisker); margin-left: 4px; margin-right: 8px; }
.legend .k-tier { width: 0; height: 14px; border-radius: 0; border-left: 1px solid var(--axis); margin-left: 4px; margin-right: 8px; }

/* горизонтальные полосы: подпись — полоса — значение у конца */
.bars { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); row-gap: 8px; column-gap: 12px; align-items: center; }
.bars .bl { font-size: 13.5px; color: var(--ink-2); line-height: 1.25; overflow-wrap: anywhere; }
.bars .bt { position: relative; height: 22px; display: flex; align-items: center; }
.bars .b { height: 14px; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; outline: none; cursor: default; }
.bars .b:hover, .bars .b:focus-visible { filter: brightness(1.12); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--series-1); }
.bars .bv { margin-left: 8px; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.bars .bv span { color: var(--muted); }

/* общий каркас «подпись — дорожка — значение»: ящики, медиана+размах, точки по регионам */
.prow, .xaxis { display: grid; grid-template-columns: minmax(130px, 24%) minmax(0, 1fr) 132px; column-gap: 14px; align-items: center; }
.plot.narrow .prow, .plot.narrow .xaxis { grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) 70px; }
.prow { min-height: 34px; }
.prow .pl { font-size: 13.5px; color: var(--ink-2); line-height: 1.25; }
.prow .pt { position: relative; height: 34px; }
.prow .pv { font-size: 12.5px; text-align: right; white-space: nowrap; }
.prow .pv span { color: var(--muted); }
.prow.small .bx, .prow.small .wh, .prow.small .iqr { opacity: .45; }
.prow.small .pv span { color: #9a6b00; }
/* C-level (CTO, CPO, CMO, CRO) — первой строкой и отделён от остальных */
.prow.clevel .pl, .stacks .sl.clevel, .heat .hr-l.clev { font-weight: 650; color: var(--ink); }
.csep { height: 0; border-top: 1px dashed var(--line-2); margin: 6px 0 8px; }
.stacks .csep { grid-column: 1 / -1; margin: 2px 0 4px; }
.heat .clev { margin-bottom: 10px; }
.vdot { position: absolute; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--series-1);
  box-shadow: 0 0 0 2px #fff; outline: none; }
.vdot:hover, .vdot:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--series-1); }
.vgrid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.xaxis .ticks { position: relative; height: 20px; border-top: 1px solid var(--axis); margin-top: 2px; }
.xaxis .ticks span { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.xaxis .ticks span:first-child { transform: none; }
.wh { position: absolute; top: 16px; height: 2px; background: var(--whisker); }
.wh::before, .wh::after { content: ""; position: absolute; top: -4px; width: 2px; height: 10px; background: var(--whisker); }
.wh::before { left: 0; }
.wh::after { right: 0; }
.bx { position: absolute; top: 10px; height: 14px; background: var(--series-1); border-radius: 3px; outline: none; }
.bx:hover, .bx:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--series-1); }
.md { position: absolute; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.md.pen { background: var(--series-1); pointer-events: auto; outline: none; }
.md.pen:hover, .md.pen:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--series-1); }
.iqr { position: absolute; top: 14px; height: 6px; border-radius: 3px; background: rgba(26, 143, 114, .35); }
.conn { position: absolute; top: 16px; height: 2px; background: var(--line-2); }
.mk { position: absolute; top: 12px; width: 10px; height: 10px; margin-left: -5px; box-shadow: 0 0 0 2px #fff; outline: none; }
.legend .mk { position: static; margin: 0 7px 0 1px; box-shadow: none; }
.mk.circle { border-radius: 50%; }
.mk.square { border-radius: 2px; }
.mk.diamond { transform: rotate(45deg) scale(.88); border-radius: 1px; }
.mk:hover, .mk:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink-2); z-index: 2; }

/* «леденцы» */
.lolli { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) 96px; column-gap: 12px; row-gap: 2px; align-items: center; }
.lrow { display: contents; }
.lrow .ll { font-size: 13.5px; color: var(--ink-2); line-height: 1.25; }
.lrow .lt { position: relative; height: 26px; }
.lrow .stem { position: absolute; top: 12px; left: 0; height: 2px; background: var(--whisker); }
.lrow .ldot { position: absolute; top: 7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--series-1);
  box-shadow: 0 0 0 2px #fff; outline: none; }
.lrow .ldot:hover, .lrow .ldot:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--series-1); }
.lrow .lref { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--axis); }
.lrow .lv { font-size: 12.5px; text-align: right; white-space: nowrap; }
.lrow .lv span { color: var(--muted); }

/* 100% stacked: зазор 2px цветом фона между сегментами */
.stacks { display: grid; grid-template-columns: minmax(130px, 24%) minmax(0, 1fr) 92px; column-gap: 14px; row-gap: 8px; align-items: center; }
.stacks .sl { font-size: 13.5px; color: var(--ink-2); }
.stacks .st { display: flex; gap: 2px; height: 22px; }
.stacks .sg { height: 100%; min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; outline: none;
  overflow: hidden; white-space: nowrap; }
.stacks .sg:last-child { border-radius: 0 4px 4px 0; }
.stacks .sg:hover, .stacks .sg:focus-visible { filter: brightness(1.1); }
.stacks .sn { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }

/* тепловые карты */
.heat-scroll { overflow-x: auto; }
.heat { display: grid; gap: 2px; }
.heat .hh { font-size: 11.5px; color: var(--muted); line-height: 1.25; padding: 0 2px 6px; display: flex; flex-direction: column; justify-content: flex-end;
  text-align: center; overflow-wrap: anywhere; }
.heat .hh span { font-size: 11px; color: var(--muted); opacity: .8; }
.heat .hr-l { font-size: 13px; color: var(--ink-2); line-height: 1.2; display: flex; flex-direction: column; justify-content: center; padding-right: 8px; }
.heat .hr-l span { font-size: 11.5px; color: var(--muted); }
.heat .hc { height: 38px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600;
  border-radius: 3px; outline: none; }
.heat .hc:hover, .heat .hc:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink-2); position: relative; z-index: 1; }
.heat .hc.none { background: #f4f6f4; color: var(--axis); font-weight: 400; }
.heat .hc.small { font-style: italic; font-weight: 500; }
.hlegend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hlegend .ramp { display: inline-flex; gap: 2px; }
.hlegend .ramp i { width: 18px; height: 10px; border-radius: 2px; }
.hlegend span:first-child { margin-right: 4px; color: var(--ink-2); }

/* гистограммы — малые множества с общими шкалами */
.hpanels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.hp-h { display: flex; flex-direction: column; margin-bottom: 8px; }
.hp-h b { font-size: 13.5px; font-weight: 600; }
.hp-h span { font-size: 12px; color: var(--muted); }
.hp-plot { position: relative; height: 150px; border-bottom: 1px solid var(--axis);
  background: linear-gradient(var(--grid), var(--grid)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--grid), var(--grid)) 0 50% / 100% 1px no-repeat; }
.hp-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 1px; }
.hcol { flex: 1 1 0; background: var(--series-1); border-radius: 2px 2px 0 0; min-width: 0; }
.hcol:hover { filter: brightness(1.15); }
.mline { position: absolute; top: -4px; bottom: 0; width: 0; border-left: 2px solid var(--ink); pointer-events: none; }
.mline span { position: absolute; top: 4px; left: 4px; font-size: 11px; color: var(--ink-2); white-space: nowrap; background: rgba(255, 255, 255, .88);
  padding: 0 3px; border-radius: 3px; }
.hp-axis { position: relative; height: 18px; }
.hp-axis span { position: absolute; top: 3px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.hp-axis span:first-child { transform: none; }

/* столбцы */
.cols { display: flex; align-items: stretch; gap: 6px; height: 200px; padding-top: 4px; }
.cc { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.cwrap { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; border-bottom: 1px solid var(--axis); position: relative; }
.cbar { background: var(--series-1); border-radius: 4px 4px 0 0; outline: none; max-width: 56px; width: 100%; margin: 0 auto; }
.cbar:hover, .cbar:focus-visible { filter: brightness(1.12); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--series-1); }
.cv { text-align: center; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cl { text-align: center; font-size: 11.5px; color: var(--muted); padding-top: 5px; line-height: 1.2; overflow-wrap: anywhere; }

/* treemap */
.tree { position: relative; }
.tcell { position: absolute; background: var(--series-1); border-radius: 4px; color: #fff; padding: 7px 9px; overflow: hidden; outline: none;
  display: flex; flex-direction: column; gap: 2px; }
.tcell:hover, .tcell:focus-visible { filter: brightness(1.1); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--series-1); z-index: 1; }
.tcell b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.tcell span { font-size: 12px; opacity: .92; }

/* вафля */
.waffle-wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.waffle { display: grid; grid-template-columns: repeat(10, 17px); grid-auto-rows: 17px; gap: 2px; }
.waffle i { border-radius: 3px; }
.waffle i:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink-2); }
.wlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; min-width: 200px; }
.wlegend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.wlegend i { width: 12px; height: 12px; border-radius: 3px; }
.wlegend .wl { color: var(--ink-2); }
.wlegend b { }
.wlegend .wn { color: var(--muted); font-size: 12px; min-width: 40px; text-align: right; }

/* воронка */
.funnel { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); column-gap: 12px; row-gap: 10px; align-items: center; }
.frow { display: contents; }
.frow .fl { font-size: 13.5px; color: var(--ink-2); line-height: 1.25; }
.frow .ft { position: relative; }
.frow .fb { height: 18px; border-radius: 0 4px 4px 0; outline: none; }
.frow .fb:hover, .frow .fb:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink-2); }
.frow .fv { grid-column: 2; font-size: 12.5px; margin-top: -6px; }
.frow .fv span { color: var(--muted); }

/* рассеяние */
.sc-frame { position: relative; padding: 30px 0 0 44px; }
.sc-ylab { position: absolute; left: 0; top: 2px; font-size: 11.5px; color: var(--muted); }
.sc-plot { position: relative; border-left: 1px solid var(--axis); border-bottom: 1px solid var(--axis); cursor: crosshair; }
.sc-hgrid { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.sc-ytick { position: absolute; left: -8px; transform: translate(-100%, -50%); font-size: 11.5px; color: var(--muted); }
.sc-tier { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--axis); }
.sc-icp { position: absolute; top: 0; bottom: 0; background: var(--marker-soft); opacity: .55; pointer-events: none; }
.legend .k-icp { width: 18px; height: 12px; border-radius: 2px; background: var(--marker-soft); border: 1px solid #f1dc8f; }
.sc-tlabel { position: absolute; top: -17px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.sc-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sc-lines line { stroke: var(--whisker); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.sc-rlabel { position: absolute; transform: translate(-100%, -130%); font-size: 11px; color: var(--ink-2); background: rgba(255, 255, 255, .85); padding: 0 3px;
  border-radius: 3px; white-space: nowrap; pointer-events: none; }
.sc-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--series-1); opacity: .45; pointer-events: none; }
.sc-ring { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255, 255, 255, .4);
  pointer-events: none; }
.sc-name { position: absolute; transform: translate(8px, -50%); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.sc-name.left { transform: translate(calc(-100% - 8px), -50%); }
.sc-xaxis { position: relative; height: 20px; margin-left: 44px; }
.sc-xaxis span { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); }
.sc-xlab { margin-left: 44px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* таблицы */
.tv-wrap { overflow-x: auto; }
table.tv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tv th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line-2); padding: 5px 6px; white-space: nowrap; }
table.tv td { border-bottom: 1px solid var(--line); padding: 5px 6px; vertical-align: top; }
table.tv td.num, table.tv th.num { text-align: right; }
table.sig td.co a { color: var(--pen-2); font-weight: 600; text-decoration: none; }
table.sig td.co a:hover { text-decoration: underline; }
table.sig td.titles { color: var(--ink-2); max-width: 340px; font-size: 12.5px; }
table.sig .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn { margin-top: 10px; border: 0; background: none; color: var(--pen); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.more-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
table.sig td.chips { min-width: 150px; }
.chip { display: inline-block; background: var(--pen-tint); color: var(--pen-2); border-radius: 6px; padding: 1px 7px; margin: 0 4px 3px 0; font-size: 12px;
  font-weight: 600; white-space: nowrap; }
.chip.weak { background: #f1f3f1; color: var(--ink-2); font-weight: 500; }

.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 10px 24px -10px rgba(30, 39, 36, .3); padding: 8px 10px; font-size: 13px; max-width: 300px; }
.tip b { display: block; font-size: 15px; }
.tip span { color: var(--muted); }

@media (max-width: 900px) {
  .grid, .split { grid-template-columns: 1fr; }
  .ins-filters { position: static; padding: 10px 16px; }
  .ins-filters select { max-width: none; flex: 1 1 140px; }
  .ins-main { padding: 14px 16px 50px; }
  .insights .top { position: static; flex-wrap: wrap; row-gap: 8px; }
  .role-tabs { order: 9; margin-left: 0; width: 100%; }
  .insights { scroll-padding-top: 10px; }
  .prow, .xaxis { grid-template-columns: 96px minmax(0, 1fr) 82px; column-gap: 10px; }
  .prow .pv span { display: none; }
  .stacks { grid-template-columns: 96px minmax(0, 1fr) 64px; column-gap: 10px; }
  .lolli { grid-template-columns: 96px minmax(0, 1fr) 60px; }
  .lrow .lv span { display: none; }
  .ch { flex-direction: column; }
  .ch .tools { margin-left: 0; justify-content: flex-start; max-width: 100%; }
  .ch .tools > div { max-width: 100%; }
}
@media (max-width: 560px) {
  /* узкий экран: подпись ряда — отдельной строкой над дорожкой, деления оси — через одно */
  .prow, .plot.narrow .prow { grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "l l" "t v"; }
  .prow .pl { grid-area: l; padding-top: 8px; }
  .prow .pt { grid-area: t; }
  .prow .pv { grid-area: v; }
  .xaxis, .plot.narrow .xaxis { grid-template-columns: minmax(0, 1fr) 64px; }
  .xaxis > div:first-child { display: none; }
  .xaxis .ticks span:nth-child(even) { display: none; }
  .stacks { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 4px; }
  .stacks .sl { grid-column: 1 / -1; padding-top: 6px; }
  .lolli { grid-template-columns: minmax(0, 1fr) 56px; }
  .lrow .ll { grid-column: 1 / -1; padding-top: 6px; }
  .hpanels { grid-template-columns: 1fr; }
  .waffle { grid-template-columns: repeat(10, 14px); grid-auto-rows: 14px; }
  .sc-name { display: none; }
  .sc-xaxis .minor { display: none; }
  .cols { gap: 3px; }
}

/* автономная страница: вместо фильтров — подпись снимка */
.snap-note { color: var(--ink-2); font-size: 13.5px; }
