/* Сайт аналитики — оформление. Шрифт Onest, палитра из макета Claude Design: графит, салатовый акцент, коралловый минус —
   на 15% спокойнее макета (насыщенность ниже, светлота та же).
   Тема по умолчанию — как в системе; ручной выбор хранится в браузере (data-theme на <html>). */
:root {
  --bg: #DEE2E7; --sf: #FFFFFF; --sf2: #EEF0F3; --ink: #0E1013; --mu: #5A606B; --ln: #E1E4E8;
  --ac: #CBF062; --aci: #0E1013; --pos: #3B7B29; --neg: #C9493B; --wrn: #A16827;
  /* салатовый по светлоте равен светлому фону и на нём теряется: точки, рамки и тонкие линии — тёмно-зелёным (--acs),
     у салатовой кнопки на фоне страницы — тёмная рамка (--acb). В тёмной теме салатовый виден и так */
  --acs: #3B7B29; --acb: #0E1013;
  --nav: #0E1013; --navt: #B4B9C2; --navA: #FFFFFF; --navAt: #0E1013;
  --bar0: #D9DDE3; --ovl: rgba(14, 16, 19, .38); --sh: 0 14px 30px -14px rgba(14, 16, 19, .45);
  --mwb: #B5467F; --moz: #2F6FE0; --mym: #B98312;  /* площадки: WB, Ozon, Яндекс Маркет — различимы и при цветовой слепоте */
  /* закругления — весь сайт на этих пяти размерах: сделать круглее или строже — поменять здесь */
  --r-card: 12px;  /* карточки, плитки, панели */
  --r-ctl: 8px;    /* кнопки, поля, блоки внутри карточек */
  --r-tag: 6px;    /* метки, чипы, пункты меню, строки при наведении, фото товаров */
  --r-bar: 3px;    /* столбцы и полосы графиков */
  --r-dot: 2px;    /* образцы цвета в подписях к графикам */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B0C0E; --sf: #17191D; --sf2: #24272D; --ink: #F2F3F5; --mu: #9BA0AA; --ln: #2A2D33;
  --ac: #CBF062; --aci: #0B0C0E; --pos: #CBF062; --neg: #F37669; --wrn: #F7B862;
  --acs: #CBF062; --acb: transparent;
  --nav: #24272D; --navt: #B4B9C2; --navA: #F2F3F5; --navAt: #0B0C0E;
  --bar0: #2E3238; --ovl: rgba(0, 0, 0, .6); --sh: 0 14px 30px -14px rgba(0, 0, 0, .55);
  --mwb: #C85C95; --moz: #5A8FF0; --mym: #B58720;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.4 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acs); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, .tl, .tc, .note, .sub, .qu, .kv .c, .ch .r, .task .tt, .headline, .wbox, .sup .sm, .legend, .hb .r .l,
.pill, .tag, .fh, .an li, .lead { text-wrap: balance; }
p, .why, .explain, .fb p, .fb .pc, .ans, .an p, .note-it p, .verdict, .calc .out { text-wrap: pretty; }
.wseg { display: inline-block; }  /* смысловой кусок строки: переносится целиком, а не посередине */
.mu { color: var(--mu); }
.pos { color: var(--pos); } .neg { color: var(--neg); } .wrn { color: var(--wrn); }
.nw { white-space: nowrap; }
.hide { display: none !important; }
.mt { margin-top: 16px; }
.g > * { margin-top: 0 !important; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.only-m { display: none !important; }
.an-card + .an-card { margin-top: 16px; }

/* ---------- каркас ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 32px 56px; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.logo { font: 700 17px/1 'Onest', sans-serif; letter-spacing: .14em; text-decoration: none; }
.logo.two { font-size: 24px; line-height: 1.04; letter-spacing: -.01em; }  /* название в две строки (учебная копия) */
.logo.two span, .ph .brand span { color: var(--pos); }  /* выделенное слово названия — зелёным из палитры */
.logo.two span { font-size: calc(var(--k, 1) * 1em); }
.navrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.caps { display: flex; gap: 2px; padding: 5px; border-radius: calc(var(--r-ctl) + 4px); background: var(--nav); min-width: 0;
  overflow-x: auto; scrollbar-width: none; }
.caps::-webkit-scrollbar { display: none; }
.caps a, .caps button { flex: none; padding: 13px 16px; border-radius: var(--r-ctl); color: var(--navt); background: none; border: 0;
  font: 500 14px/1 'Onest', sans-serif; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.caps a:hover:not(.on), .caps button:hover:not(.on) { color: var(--navA); }
.caps a.on { background: var(--navA); color: var(--navAt); font-weight: 600; padding: 13px 20px; }
.caps button.on { color: var(--navAt); font-weight: 600; }  /* «ещё» на телефоне, когда открыт раздел не из нижнего меню */
@media (min-width: 1200px) and (max-width: 1439px) {  /* девять разделов в одну строку на небольшом ноутбуке */
  .top { gap: 12px; }
  .top .caps a { padding: 13px 10px; font-size: 13px; }
  .top .caps a.on { padding: 13px 14px; }
}
.ai-btn { flex: none; width: 52px; height: 52px; border-radius: calc(var(--r-ctl) + 4px); border: 2px solid var(--acb); background: var(--ac); color: var(--aci);
  font: 700 15px/1 'Onest', sans-serif; display: flex; align-items: center; justify-content: center; position: relative;
  transition: transform .15s; }
.ai-btn:hover { transform: scale(1.04); }
.ai-btn .cnt { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-tag);
  background: var(--neg); color: #fff; font: 700 13px/1 'Onest', sans-serif; border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center; font-variant-numeric: lining-nums tabular-nums; }
.status { display: flex; align-items: center; gap: 8px; font: 500 12px/1.2 'Onest', sans-serif; color: var(--mu);
  background: none; border: 0; padding: 8px 0; text-align: right; white-space: nowrap; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--acs); }
.dot.old { background: var(--neg); }
.menu { position: absolute; right: 32px; top: 76px; z-index: 45; background: var(--sf); border-radius: var(--r-card); padding: 8px;
  box-shadow: var(--sh); min-width: 240px; }
.menu .mh { font: 500 12px/1 'Onest', sans-serif; color: var(--mu); padding: 10px 12px 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px;
  border: 0; background: none; border-radius: var(--r-tag); text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--sf2); }
.menu .on::after { content: '✓'; color: var(--pos); font-weight: 700; }

/* ---------- заголовок страницы и период ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin: 36px 0 20px; flex-wrap: wrap; }
.ph .brand { display: none; }
.ph h1 { font: 700 44px/1 'Onest', sans-serif; letter-spacing: -.025em; }
.ph .sub { font: 400 15px/1.3 'Onest', sans-serif; color: var(--mu); margin-top: 10px; }
.ph .mstat, .ph .mright { display: none; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--mu); text-decoration: none; font: 500 14px/1 'Onest', sans-serif;
  margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.per { display: flex; align-items: center; gap: 8px; }
.rb { width: 44px; height: 44px; flex: none; border-radius: var(--r-ctl); border: 0; background: var(--sf); color: var(--mu);
  display: flex; align-items: center; justify-content: center; font: 500 20px/1 'Onest', sans-serif; }
.rb:hover:not(:disabled) { color: var(--ink); }
.rb:disabled { opacity: .35; cursor: default; }
.pb { height: 44px; border: 0; border-radius: var(--r-ctl); background: var(--sf); padding: 0 20px; display: flex; align-items: center; gap: 10px;
  font: 500 15px/1 'Onest', sans-serif; white-space: nowrap; }
.pb .mu { font-size: 12px; }
.phr { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }  /* справа в заголовке: налоги и период */
/* переключатель из двух положений («С налогами / Без налогов»): необычное положение — салатовым, чтобы было заметно */
.sw { display: flex; gap: 2px; height: 44px; padding: 4px; background: var(--sf); border-radius: var(--r-ctl); }
.sw button { border: 0; background: none; padding: 0 14px; border-radius: calc(var(--r-ctl) - 3px); color: var(--mu);
  font: 500 14px/1 'Onest', sans-serif; white-space: nowrap; transition: background .15s, color .15s; }
.sw button:hover:not(.on) { color: var(--ink); }
.sw button.on { background: var(--sf2); color: var(--ink); }
.sw.alt button.on { background: var(--ac); color: var(--aci); }
.pop { position: absolute; z-index: 45; background: var(--sf); border-radius: var(--r-card); padding: 8px; box-shadow: var(--sh); min-width: 260px; }
.pop button { display: flex; width: 100%; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 0; background: none;
  border-radius: var(--r-tag); font-size: 14px; text-align: left; }
.pop button:hover { background: var(--sf2); }
.pop button .mu { font-size: 13px; }
.pop .on { font-weight: 600; }
.pop .custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px 6px; border-top: 1px solid var(--ln); margin-top: 6px; }
.pop .custom label { font-size: 12px; color: var(--mu); display: grid; gap: 4px; }
.pop .custom .btn { grid-column: 1 / -1; }

/* ---------- сетка и карточки ---------- */
#main > * + * { margin-top: 16px; }
#main > .sec { margin-top: 40px; }
.g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1200px) { .g.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }  /* пять плиток в ряд */
/* две колонки блоков разной высоты: каждый блок — по своему содержимому, колонки не тянут друг друга */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cols.l2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col > * { margin: 0 !important; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: 1 / -1; }
.card { background: var(--sf); border-radius: var(--r-card); padding: 26px; min-width: 0; position: relative; }
.card.flat { background: transparent; padding: 0; }
.card.col { display: flex; flex-direction: column; }
a.card { text-decoration: none; display: block; transition: background .15s; }
a.card:hover { background: color-mix(in srgb, var(--sf) 92%, var(--ink)); }
.ch { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ch h3 { font: 600 19px/1.2 'Onest', sans-serif; display: flex; align-items: center; gap: 10px; }
.ch h3 .adot { width: 8px; height: 8px; border-radius: 50%; background: var(--acs); flex: none; }
.ch .r { font: 500 13px/1.3 'Onest', sans-serif; color: var(--mu); }
.ch a.r { text-decoration: none; }
.ch a.r:hover { color: var(--ink); }
.sec { font: 600 22px/1.2 'Onest', sans-serif; letter-spacing: -.01em; margin: 40px 0 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec .mu { font: 400 14px/1.3 'Onest', sans-serif; }
.lead { font: 400 14px/1.5 'Onest', sans-serif; color: var(--mu); max-width: 760px; }
.note { font: 400 13px/1.45 'Onest', sans-serif; color: var(--mu); }
.empty { color: var(--mu); padding: 24px 0; }

/* ---------- плитки и цифры ---------- */
.tile { padding: 22px; display: flex; flex-direction: column; }
.tl { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 500 15px/1.2 'Onest', sans-serif; color: var(--mu); }
.tv { font: 700 clamp(30px, 2.8vw, 40px)/1 'Onest', sans-serif; letter-spacing: -.03em; margin-top: 14px; white-space: nowrap; }
.tv small, .hv small { font: 500 16px/1 'Onest', sans-serif; color: var(--mu); letter-spacing: 0; margin-left: 4px; }
.tc { font: 400 13px/1.35 'Onest', sans-serif; color: var(--mu); margin-top: 8px; }
.tc b { color: var(--ink); font-weight: 600; }
.tc b.neg { color: var(--neg); } .tc b.pos { color: var(--pos); }
.tile .tl { align-items: baseline; }
.dlx { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }  /* изменение и с чем сравниваем */
.dlx small { font: 400 11px/1.1 'Onest', sans-serif; color: var(--mu); white-space: nowrap; }
.sp { display: block; width: 100%; height: 40px; margin-top: auto; padding-top: 16px; overflow: visible; }
/* мини-график в плитке: даты по краям, подсказка у каждого дня */
.spw { position: relative; margin-top: auto; padding-top: 16px; }
.spw .sp { margin-top: 0; padding-top: 0; }
.sp-hit { position: absolute; inset: 0; display: flex; }
.sp-hit div { flex: 1; }
.spw .lc-cur { top: 16px; bottom: auto; height: 40px; }
.spw.bare { margin: 0; padding: 0; }
.spw.bare .lc-cur { top: 0; height: 100%; }
.sp-x { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font: 400 11px/1 'Onest', sans-serif; color: var(--mu); }
.sp polyline, .sp path { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dl { font: 600 14px/1 'Onest', sans-serif; white-space: nowrap; }
.dl.pos { color: var(--pos); } .dl.neg { color: var(--neg); } .dl.mu { color: var(--mu); }
.hrow { display: flex; align-items: baseline; gap: 12px 18px; margin-top: 14px; flex-wrap: wrap; }
.hv { font: 700 clamp(44px, 4.7vw, 68px)/1 'Onest', sans-serif; letter-spacing: -.045em; white-space: nowrap; }
.hrow .dl { font-size: 15px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; }
.kv .k { font: 500 13px/1.2 'Onest', sans-serif; color: var(--mu); }
.kv .v { font: 700 24px/1.1 'Onest', sans-serif; letter-spacing: -.02em; margin-top: 6px; white-space: nowrap; }
.kv .v small { font: 500 13px/1 'Onest', sans-serif; color: var(--mu); letter-spacing: 0; margin-left: 3px; }
.kv .c { font: 400 12px/1.35 'Onest', sans-serif; color: var(--mu); margin-top: 4px; }

/* ---------- прибыль по дням от нуля: график занимает свободную высоту карточки ---------- */
.zb { --zg: 10px; display: flex; gap: var(--zg); margin-top: 26px; flex: 1 1 auto; min-height: 150px; }
.zb .c { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zb .up { flex: var(--u) 1 var(--ub); min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.zb .dn { flex: var(--n) 1 var(--nb); min-height: 0; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--ln);
  margin: 0 calc(var(--zg) / -2); padding: 0 calc(var(--zg) / 2); }  /* ноль — сплошной линией через промежутки */
.zb .c:first-child .dn { margin-left: 0; padding-left: 0; }
.zb .c:last-child .dn { margin-right: 0; padding-right: 0; }
.zb i { display: block; flex: none; border-radius: var(--r-bar); min-height: 3px; }
.zb .v { text-align: center; font: 600 12px/1 'Onest', sans-serif; white-space: nowrap; }
.zb .v.off { visibility: hidden; }
.zb .d { text-align: center; font: 400 12px/1 'Onest', sans-serif; color: var(--mu); margin-top: 8px; white-space: nowrap; }
.zb .c.na .d { opacity: .5; }
.zb .c.old i { opacity: .38; }  /* дни до выбранного периода */
.zb .c.old .v { opacity: .6; }
.zb .c:hover i { filter: brightness(1.12); }

/* из чего сложилась прибыль — ровная сетка */
.pmini { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.pmini div { background: var(--sf2); border-radius: var(--r-ctl); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pmini span { font: 500 12px/1.1 'Onest', sans-serif; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmini b { font: 600 15px/1 'Onest', sans-serif; white-space: nowrap; }

/* ---------- ИИ: дела на сегодня ---------- */
.tasks { display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--ln); align-items: start; }
.task:first-child { border-top: 0; padding-top: 4px; }
.ring { width: 22px; height: 22px; border-radius: var(--r-tag); border: 2px solid var(--acs); background: transparent; padding: 0; margin-top: 0;
  display: flex; align-items: center; justify-content: center; color: var(--aci); font: 700 13px/1 'Onest', sans-serif; }
.ring.on { background: var(--ac); }
.ring.on::after { content: '✓'; }
.task .tt { font: 600 16px/1.3 'Onest', sans-serif; display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.task .tt a { text-decoration: none; }
.task .tt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.task .fx { font: 700 15px/1.3 'Onest', sans-serif; color: var(--pos); white-space: nowrap; text-align: right; min-width: 56px; }
.task .why { grid-column: 2 / -1; margin-top: 8px; background: var(--sf2); border-radius: var(--r-ctl); padding: 10px 14px;
  font: 400 13px/1.45 'Onest', sans-serif; color: var(--mu); }
.task.done .tt, .task.done .fx { color: var(--mu); }
.task.done .tt span:first-child { text-decoration: line-through; }
.tag { flex: none; font: 500 12px/1 'Onest', sans-serif; color: var(--mu); background: var(--sf2); border-radius: var(--r-tag); padding: 6px 10px;
  text-decoration: none; white-space: nowrap; }
.lvl { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }
.lvl.crit { background: var(--neg); } .lvl.warn { background: var(--wrn); } .lvl.info { background: var(--mu); } .lvl.good { background: var(--acs); }

/* ---------- чипы, плашки ---------- */
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { font: 500 13px/1 'Onest', sans-serif; padding: 9px 12px; border-radius: var(--r-tag); color: var(--mu); background: none; border: 0; white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--sf2); color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 'Onest', sans-serif; padding: 6px 10px; border-radius: var(--r-tag);
  background: var(--sf2); color: var(--mu); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.crit { color: var(--neg); } .pill.warn { color: var(--wrn); } .pill.good { color: var(--pos); }
.pill.ac { color: var(--ink); } .pill.ac::before { background: var(--acs); }
.pill.plain::before { display: none; }
.wbox { display: flex; align-items: center; gap: 10px; background: var(--sf2); border-radius: var(--r-ctl); padding: 14px 16px; margin-top: 18px;
  font: 500 14px/1.3 'Onest', sans-serif; text-decoration: none; }
.wbox .rd { width: 8px; height: 8px; border-radius: 50%; background: var(--neg); flex: none; }
.wbox .ok { width: 8px; height: 8px; border-radius: 50%; background: var(--acs); flex: none; }
.wbox span:nth-child(2) { flex: 1; }
.wbox .ar { color: var(--mu); }
a.wbox:hover .ar { color: var(--ink); }
.seg { display: flex; gap: 3px; height: 12px; margin: 18px 0 16px; }
.seg i { display: block; border-radius: var(--r-bar); min-width: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font: 400 12px/1.2 'Onest', sans-serif; color: var(--mu); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: var(--r-dot); display: inline-block; }
.rows { display: flex; flex-direction: column; }
.rows .r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.rows .r .l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rows .r i { width: 8px; height: 8px; border-radius: var(--r-dot); flex: none; }
.rows .r b { font-weight: 600; white-space: nowrap; }

/* ---------- графики ---------- */
/* столбцы: сумма над каждым (над минусом — под ним), период под каждым; лишнее прячет fitCharts */
.vb { position: relative; --pt: 0px; --pb: 0px; }
.vb.vals { --pt: 20px; }
.vb.vals.neg { --pb: 20px; }
.vb-plot { position: relative; display: flex; align-items: stretch; gap: var(--gap, 6px); height: var(--h, 220px); padding: var(--pt) 0 var(--pb); }
.vb-col { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.vb-up, .vb-dn { display: flex; justify-content: center; gap: 3px; min-height: 0; }
.vb-up { align-items: flex-end; }
.vb-dn { align-items: flex-start; }
.vb-col i { display: block; flex: 1 1 0; max-width: var(--bw, 44px); border-radius: var(--r-bar) var(--r-bar) 0 0; position: relative; transition: height .25s ease-out; }
.vb-dn i { border-radius: 0 0 var(--r-bar) var(--r-bar); }
.vb.thin .vb-col i { border-radius: 2px 2px 0 0; }
.vb.thin .vb-dn i { border-radius: 0 0 2px 2px; }
.vb-col:hover i { filter: brightness(1.12); }
.vb-col i > .bv { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 5px; font: 600 11px/1 'Onest', sans-serif;
  color: var(--ink); white-space: nowrap; pointer-events: none; }
.vb-col i > .bv.s2 { color: var(--mu); font-weight: 500; }
.vb-dn i > .bv { bottom: auto; top: 100%; margin: 5px 0 0; }
.vb-col i > .bv.off { display: none; }
.vb-zero { position: absolute; left: 0; right: 0; top: calc(var(--pt) + (100% - var(--pt) - var(--pb)) * var(--z)); border-top: 1px solid var(--ln);
  pointer-events: none; }
.vb-g { position: absolute; left: 0; right: 0; top: var(--pt); border-top: 1px dashed var(--ln); pointer-events: none; }
.vb-g span { position: absolute; right: 0; top: -16px; font: 400 11px/1 'Onest', sans-serif; color: var(--mu); background: var(--sf); padding-left: 4px; }
.vb-x { display: flex; gap: var(--gap, 6px); margin-top: 8px; font: 400 11px/1 'Onest', sans-serif; color: var(--mu); }
.vb-x span { flex: 1; min-width: 0; display: flex; justify-content: center; white-space: nowrap; }
.vb-x span.off { visibility: hidden; }
.vb-x em { font-style: normal; }
.lc .vb-x { position: relative; display: block; height: 14px; margin-top: 10px; }
.lc .vb-x span { position: absolute; top: 0; transform: translateX(-50%); display: block; }
.lc .vb-x span:first-child { transform: none; }
.lc .vb-x span:last-child { transform: translateX(-100%); }
.lc { position: relative; }
.lc svg { display: block; width: 100%; height: var(--h, 200px); overflow: visible; }
.lc polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.lc .area { stroke: none; opacity: .12; }
.lc-hit { position: absolute; inset: 0 0 24px 0; display: flex; }
.lc-hit div { flex: 1; }
.lc-cur { position: absolute; top: 0; bottom: 24px; width: 1px; background: var(--ln); pointer-events: none; display: none; }
.lc-y { position: absolute; right: 0; font: 400 11px/1 'Onest', sans-serif; color: var(--mu); background: var(--sf); padding-left: 4px; }
.hb { display: flex; flex-direction: column; gap: 12px; }
.hb .r { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px;
  text-decoration: none; }
.hb .r .l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hb .r .l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .trw { position: relative; }
.hb .tr { height: 10px; border-radius: var(--r-bar); background: var(--sf2); overflow: hidden; }
.hb .tr i { display: block; height: 100%; border-radius: var(--r-bar); opacity: .55; transition: width .25s ease-out, opacity .15s; }  /* спокойнее, при наведении — ярче */
.hb .r:hover .tr i, .hb.strong .tr i { opacity: 1; }
.hb .mark { position: absolute; top: -14px; bottom: -14px; width: 3px; margin-left: -1.5px; background: var(--neg); border-radius: 2px; }  /* сливается в линию через строки */
.hb .mark em { position: absolute; bottom: 100%; left: 0; margin-bottom: 6px; font: 600 12px/1 'Onest', sans-serif;
  font-style: normal; color: var(--neg); white-space: nowrap; }  /* подпись идёт от черты вправо, у правого края — влево */
.hb .mark.rt em { left: auto; right: 0; }
.hb .mark.mid em { left: 50%; transform: translateX(-50%); }  /* черта посередине: подпись по центру, чтобы не вылезала за край */
.hb.mk { padding-top: 26px; }
.hb .v { font-weight: 600; white-space: nowrap; text-align: right; min-width: 64px; }
.hb .v small { color: var(--mu); font-weight: 400; margin-left: 4px; }
a.r:hover .l span { text-decoration: underline; text-underline-offset: 3px; }
#tip { position: fixed; z-index: 70; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: var(--r-ctl); padding: 10px 12px;
  font: 500 12px/1.45 'Onest', sans-serif; box-shadow: var(--sh); opacity: 0; transition: opacity .12s; max-width: 260px; }
#tip.on { opacity: 1; }
#tip b { font-weight: 700; }
#tip .t { font-weight: 600; margin-bottom: 4px; }
#tip i { display: inline-block; width: 8px; height: 8px; border-radius: var(--r-dot); margin-right: 6px; }

/* ---------- таблицы ---------- */
.tw { overflow-x: auto; margin: 0 -26px; padding: 0 26px; scrollbar-width: thin; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { font: 500 12px/1.25 'Onest', sans-serif; color: var(--mu); text-align: right; padding: 0 10px 10px; white-space: nowrap;
  vertical-align: bottom; user-select: none; }
.t th[data-k] { cursor: pointer; }
.t th[data-k]:hover { color: var(--ink); }
.t th.on { color: var(--ink); }
.t td { padding: 11px 10px; border-top: 1px solid var(--ln); text-align: right; white-space: nowrap; vertical-align: middle; }
.t th:first-child, .t td:first-child { text-align: left; padding-left: 0; }
.t th:last-child, .t td:last-child { padding-right: 0; }
.t td.wrap { white-space: normal; min-width: 180px; }
.t tr.link { cursor: pointer; }
.t tr.link:hover td { background: var(--sf2); }
.t tr.link:hover td:first-child { border-radius: var(--r-tag) 0 0 var(--r-tag); }
.t tr.link:hover td:last-child { border-radius: 0 var(--r-tag) var(--r-tag) 0; }
.t tfoot td { font-weight: 600; }
.t .dl { font-size: 12px; margin-left: 6px; }
.art { display: flex; align-items: center; gap: 12px; min-width: 0; }
.art b { font-weight: 600; }
.art .ti { font: 400 12px/1.2 'Onest', sans-serif; color: var(--mu); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.th { width: 40px; height: 40px; border-radius: var(--r-tag); object-fit: cover; background: var(--sf2); flex: none; cursor: zoom-in; display: block; }
.th.sm { width: 32px; height: 32px; }
.th.xs { width: 26px; height: 26px; border-radius: 4px; }
.csv { display: inline-flex; margin-top: 14px; font: 500 13px/1 'Onest', sans-serif; color: var(--mu); text-decoration: none; }
.csv:hover { color: var(--ink); }

/* ---------- списки: котировки, отзывы, поставки ---------- */
.q { display: grid; grid-template-columns: minmax(0, 1fr) 60px auto; gap: 12px; align-items: center; padding: 13px 0;
  border-top: 1px solid var(--ln); text-decoration: none; }
.q:first-child { border-top: 0; padding-top: 2px; }
.q .qn { font: 500 15px/1.2 'Onest', sans-serif; }
.q .qu { font: 400 12px/1.3 'Onest', sans-serif; color: var(--mu); margin-top: 3px; }
.q svg { width: 60px; height: 26px; }
.q svg polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.q .qv { font: 600 16px/1 'Onest', sans-serif; text-align: right; white-space: nowrap; }
.q .qd { font: 600 12px/1 'Onest', sans-serif; text-align: right; margin-top: 5px; white-space: nowrap; }
.fb { padding: 16px 0; border-top: 1px solid var(--ln); }
.fb:first-child { border-top: 0; padding-top: 2px; }
.fb .fh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--mu); }
.fb .fh b { color: var(--ink); font-weight: 600; font-size: 14px; }
.stars { color: var(--wrn); letter-spacing: 1px; font-size: 13px; }
.stars.lo { color: var(--neg); }
.fb p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.fb .pc { margin-top: 6px; font-size: 13px; color: var(--mu); line-height: 1.45; }
.fb .ans { margin-top: 10px; background: var(--sf2); border-radius: var(--r-ctl); padding: 10px 14px; font-size: 13px; line-height: 1.45; color: var(--mu); }
.sup { padding: 16px 0; border-top: 1px solid var(--ln); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.sup:first-child { border-top: 0; padding-top: 2px; }
.sup .sh { font: 600 15px/1.3 'Onest', sans-serif; }
.sup .sm { font-size: 13px; color: var(--mu); margin-top: 4px; }
.sup .sg { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.steps { display: flex; gap: 4px; margin-top: 10px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--sf2); }
.steps i.on { background: var(--acs); }
.ship { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }  /* мало позиций — растягиваются на всю ширину */
.ship .it { background: var(--sf2); border-radius: var(--r-ctl); padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.ship .it .top2 { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.ship .it .n { font: 700 28px/1 'Onest', sans-serif; letter-spacing: -.02em; }
.ship .it .n small { font: 500 13px/1 'Onest', sans-serif; color: var(--mu); letter-spacing: 0; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud span { font: 500 13px/1 'Onest', sans-serif; padding: 8px 12px; border-radius: var(--r-tag); background: var(--sf2); }
.tagcloud span b { font-weight: 600; margin-left: 6px; }
.tagcloud .neg { color: var(--neg); }

/* ---------- страница артикула ---------- */
.ahero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.ahero img { width: 220px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-ctl); background: var(--sf2); cursor: zoom-in; display: block; }
.ahero h1 { font: 700 44px/1 'Onest', sans-serif; letter-spacing: -.025em; }
.ahero .ttl { color: var(--mu); margin-top: 10px; font-size: 15px; }
.ahero .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.price .pv { font: 700 40px/1 'Onest', sans-serif; letter-spacing: -.03em; }
.price .po { color: var(--mu); text-decoration: line-through; font-size: 16px; }

/* ---------- формы ---------- */
.inp { background: var(--sf2); border: 1px solid transparent; border-radius: var(--r-ctl); padding: 10px 12px; width: 100%; min-width: 0; }
.inp:focus { outline: 2px solid var(--acs); outline-offset: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ac); color: var(--aci); border: 0;
  border-radius: var(--r-ctl); padding: 13px 20px; font: 600 14px/1 'Onest', sans-serif; text-decoration: none; white-space: nowrap; }
.btn.sec { background: var(--sf2); color: var(--ink); }
.btn:disabled { opacity: .5; }
.calc { display: grid; gap: 12px; }
.calc label { display: grid; gap: 6px; font-size: 13px; color: var(--mu); }
.calc .out { background: var(--sf2); border-radius: var(--r-ctl); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.calc .out b { font-size: 18px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.formgrid label { display: grid; gap: 6px; font-size: 13px; color: var(--mu); }
.ctl { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.ctl label { display: grid; gap: 6px; font-size: 13px; color: var(--mu); }
.ctl .inp { width: 150px; }
.sim input { width: 90px; text-align: right; padding: 8px 10px; }
.verdict { margin-top: 16px; background: var(--sf2); border-radius: var(--r-ctl); padding: 14px 16px; font-size: 14px; line-height: 1.5; }

/* ---------- свёртки ---------- */
details.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '›'; font: 500 22px/1 'Onest', sans-serif; color: var(--mu); transform: rotate(90deg); transition: transform .2s; flex: none; }
details.fold[open] > summary::after { transform: rotate(-90deg); }
details.fold > summary h3 { font: 600 19px/1.2 'Onest', sans-serif; }
details.fold[open] > summary { margin-bottom: 16px; }
details.more { margin-top: 14px; }
details.more > summary { list-style: none; cursor: pointer; color: var(--mu); font: 500 13px/1 'Onest', sans-serif; display: inline-flex; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '▾'; }
details.more[open] > summary::after { content: '▴'; }
details.more > div { margin-top: 10px; }
.explain { font: 400 13px/1.55 'Onest', sans-serif; color: var(--mu); }
.explain + .explain { margin-top: 8px; }
.explain b { color: var(--ink); font-weight: 600; }

/* ---------- разбор ---------- */
.an { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; }
.an .num { width: 56px; height: 56px; border-radius: var(--r-ctl); background: var(--sf2); display: flex; align-items: center; justify-content: center;
  font: 700 22px/1 'Onest', sans-serif; }
.an:first-child .num { background: var(--ac); color: var(--aci); }
.an h3 { font: 600 20px/1.25 'Onest', sans-serif; }
.an p { margin-top: 10px; font-size: 15px; line-height: 1.55; }
.an ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.an li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.an li::before { content: ''; width: 8px; height: 8px; border-radius: var(--r-dot); background: var(--acs); margin: 6px 0 0 3px; }  /* метка пункта, не галочка */
.an .go { display: inline-flex; margin-top: 14px; }
.note-it { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--ln); }
.note-it:first-child { border-top: 0; padding-top: 2px; }
.note-it h4 { font: 600 16px/1.3 'Onest', sans-serif; }
.note-it p { font-size: 14px; line-height: 1.5; color: var(--mu); margin-top: 6px; }
.note-it .area { font: 500 12px/1 'Onest', sans-serif; color: var(--mu); margin-bottom: 6px; }

/* ---------- панели: ИИ справа, листы снизу ---------- */
.ovl { position: fixed; inset: 0; background: var(--ovl); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ovl.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); background: var(--sf); border-radius: var(--r-card);
  z-index: 41; transform: translateX(calc(100% + 24px)); transition: transform .28s cubic-bezier(.2, .8, .2, 1); overflow-y: auto;
  padding: 24px; overscroll-behavior: contain; }
.drawer.on { transform: none; }
.drawer .dh { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.drawer .dh h2 { font: 700 26px/1.1 'Onest', sans-serif; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.x { width: 40px; height: 40px; border-radius: var(--r-ctl); border: 0; background: var(--sf2); color: var(--mu); font: 400 22px/1 'Onest', sans-serif; flex: none; }
.x:hover { color: var(--ink); }
.headline { font: 600 18px/1.4 'Onest', sans-serif; margin-bottom: 18px; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--sf); border-radius: var(--r-card) var(--r-card) 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--ln); margin: 0 auto 14px; }
.sheet h3 { font: 600 17px/1.2 'Onest', sans-serif; margin: 6px 4px 12px; }
.sheet .list a, .sheet .list button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 14px;
  border: 0; background: none; border-radius: var(--r-tag); text-decoration: none; font-size: 16px; text-align: left; }
.sheet .list a:hover, .sheet .list button:hover { background: var(--sf2); }
.sheet .list .on { font-weight: 600; }
.sheet .list .on::after { content: '✓'; color: var(--pos); font-weight: 700; margin-left: 12px; }
.sheet .list button { justify-content: flex-start; }
.sheet .list button .mu { margin-left: auto; font-weight: 400; }
.sheet .custom .btn { grid-column: 1 / -1; }
.sheet .custom label { font-size: 13px; color: var(--mu); display: grid; gap: 6px; }
.sheet .seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--sf2); border-radius: var(--r-ctl); padding: 4px; margin: 0 4px 10px; }
.sheet .seg3 button { border: 0; background: none; border-radius: var(--r-tag); padding: 11px 6px; font-size: 14px; }
.sheet .seg3 button.on { background: var(--sf); font-weight: 600; }

/* ---------- мобильное меню снизу ---------- */
.mnav { display: none; }
.zoom { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; z-index: 80; cursor: zoom-out; padding: 16px; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: var(--r-ctl); object-fit: contain; }
.sk { background: var(--sf2); border-radius: var(--r-tag); animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 50% { opacity: .55; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px;
  border-radius: var(--r-ctl); font: 500 14px/1 'Onest', sans-serif; z-index: 90; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.act { pointer-events: auto; cursor: pointer; background: var(--ac); color: var(--aci); }


/* ---------- отклик на наведение и нажатие ---------- */
:root { --ease: cubic-bezier(.2, .8, .2, 1); }
a, button, .q, .card, .chip, .tag, .rb, .pb, .btn, .th, .wbox, tr, .hb .r { -webkit-tap-highlight-color: transparent; }
a.card, a.tile { transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(14, 16, 19, .35); background: var(--sf); }
a.card:active { transform: translateY(-1px) scale(.995); }
a.card .tl span:first-child::after, a.card .ch h3::after { content: ' ›'; opacity: 0; display: inline-block; transform: translateX(-4px);
  transition: opacity .2s, transform .2s var(--ease); color: var(--mu); }
a.card:hover .tl span:first-child::after, a.card:hover .ch h3::after { opacity: 1; transform: none; }
.q { position: relative; border-radius: var(--r-tag); transition: background .15s, box-shadow .15s; }
a.q:hover { background: var(--sf2); box-shadow: 0 0 0 8px var(--sf2); border-top-color: transparent; }
a.q:hover + .q { border-top-color: transparent; }
a.q:active { background: color-mix(in srgb, var(--sf2) 80%, var(--ink)); box-shadow: 0 0 0 8px color-mix(in srgb, var(--sf2) 80%, var(--ink)); }
a.q .qn, .hb a.r .l span { transition: transform .2s var(--ease); display: inline-block; }
a.q:hover .qn { transform: translateX(3px); }
.hb a.r { border-radius: var(--r-tag); transition: background .15s, box-shadow .15s; }
.hb a.r:hover { background: var(--sf2); box-shadow: 0 0 0 6px var(--sf2); }
.hb a.r:hover .tr { background: var(--sf); }
.hb a.r:hover .l span { transform: translateX(3px); text-decoration: none; }
.t tr.link td { transition: background .15s; }
.t tr.link:hover .art b { text-decoration: underline; text-underline-offset: 3px; }
.tag { transition: background .15s, color .15s; }
a.tag:hover { background: var(--ink); color: var(--bg); }
.chip { transition: background .15s, color .15s; }
.chip:hover:not(.on) { background: color-mix(in srgb, var(--sf2) 55%, transparent); }
.rb, .pb, .x { transition: background .15s, color .15s, transform .15s; }
.rb:hover:not(:disabled), .pb:hover, .x:hover { background: var(--sf2); color: var(--ink); }
.rb:active:not(:disabled), .pb:active, .chip:active, .btn:active, .ai-btn:active, .x:active, .tbtn:active { transform: scale(.95); }
.btn { transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(.96); }
.ring { transition: background .15s, transform .15s; }
.ring:hover { background: color-mix(in srgb, var(--ac) 30%, transparent); transform: scale(1.08); }
.ring.on:hover { background: var(--ac); }
.task { transition: opacity .2s; }
.th { transition: transform .2s var(--ease), box-shadow .2s; }
.th:hover { transform: scale(1.08); box-shadow: 0 8px 18px -8px rgba(14, 16, 19, .45); }
.ahero img { transition: transform .3s var(--ease); }
.ahero img:hover { transform: scale(1.02); }
a.wbox { transition: background .15s; }
a.wbox:hover { background: color-mix(in srgb, var(--sf2) 85%, var(--ink)); }
a.wbox .ar { transition: transform .2s var(--ease); }
a.wbox:hover .ar { transform: translateX(4px); color: var(--ink); }
.ship a.it { transition: transform .2s var(--ease), background .15s; }
.ship a.it:hover { transform: translateY(-3px); background: color-mix(in srgb, var(--sf2) 85%, var(--ink)); }
.vb-col::before { content: ''; position: absolute; inset: -4px -2px; border-radius: 4px; background: var(--sf2); opacity: 0; transition: opacity .15s; z-index: -1; }
.vb-col:hover::before { opacity: .7; }
.zb .c { position: relative; border-radius: 4px; transition: background .15s; }
.zb .c:hover { background: var(--sf2); }
.csv { transition: color .15s; }
.caps { position: relative; }
.caps .ind { position: absolute; top: 5px; bottom: 5px; left: 0; border-radius: var(--r-ctl); background: var(--navA); z-index: 0;
  transition: transform .35s var(--ease), width .35s var(--ease); pointer-events: none; }
.caps .ind.still { transition: none; }
.caps a, .caps button { position: relative; z-index: 1; }
.caps.slide a.on { background: transparent; }
.tbtn { width: 44px; height: 44px; flex: none; border-radius: var(--r-ctl); border: 0; background: var(--sf); color: var(--ink); display: inline-flex;
  align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.tbtn:hover { background: var(--sf2); }
.tbtn svg { width: 20px; height: 20px; }
.status { cursor: pointer; border-radius: var(--r-ctl); padding: 8px 12px; margin-right: -12px; transition: background .15s, color .15s; }
.status:hover { background: var(--sf); color: var(--ink); }
.status.busy .dot, .mstat.busy .dot { animation: blink .8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hright { justify-self: end; display: flex; align-items: center; gap: 8px; }
.tlink { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 4px; transition: color .15s; }
.tlink .ar { opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--ease); color: var(--mu); }
.tlink:hover { color: var(--ink); }
.tlink:hover .ar { opacity: 1; transform: none; }
/* сегодня: что заказывают — крупно, с названием товара */
.today-top { margin-top: 16px; display: flex; flex-direction: column; }
.tt-r { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; text-decoration: none;
  border-top: 1px solid var(--ln); border-radius: var(--r-tag); transition: background .15s, box-shadow .15s; }
.tt-r:first-child { border-top: 0; padding-top: 0; }
.tt-r:hover { background: var(--sf2); box-shadow: 0 0 0 6px var(--sf2); border-top-color: transparent; }
.tt-r:hover + .tt-r { border-top-color: transparent; }
.tt-n, .tt-v { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-n b, .tt-v b { font: 600 14px/1.2 'Onest', sans-serif; white-space: nowrap; }
.tt-n small, .tt-v small { font: 400 12px/1.2 'Onest', sans-serif; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-v { text-align: right; }
/* отзывы на обзоре: несколько последних */
.rvl { margin-top: 18px; display: flex; flex-direction: column; }
.rvt { font: 500 12px/1 'Onest', sans-serif; color: var(--mu); margin-bottom: 4px; }
.rvi { padding: 10px 0; border-top: 1px solid var(--ln); }
.rvt + .rvi { border-top: 0; }
.rvi .rh { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--mu); }
.rvi .rh b { color: var(--ink); font-weight: 600; font-size: 13px; }
.rvi p { margin-top: 5px; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* лидеры по заказам: название товара, график шире и левее, над ним — даты */
.q.ld { grid-template-columns: minmax(170px, 36%) minmax(0, 1fr) 112px; gap: 18px; }
.q.ld .art > div { min-width: 0; }
.q.ld .qn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q.ld .qn span { font: 400 12px/1 'Onest', sans-serif; color: var(--mu); margin-left: 8px; }
.q.ld .qu { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q.ld .spw svg { width: 100%; height: 34px; display: block; }
.q.lh { padding: 0 0 10px; font: 400 11px/1.3 'Onest', sans-serif; color: var(--mu); align-items: end; }
.q.lh > span:last-child { text-align: right; white-space: nowrap; }
.q.lh .sp-x { margin-top: 0; }
.hright .out { font: 500 12px/1 'Onest', sans-serif; color: var(--mu); text-decoration: none; padding: 8px 4px; }
.hright .out:hover { color: var(--ink); }

/* ---------- анимации при открытии раздела ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
main.enter .ph { animation: fade .35s ease-out both; }
main.enter .card, main.enter > .chips { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes growh { from { height: 0; } }  /* растёт высота, а не масштаб — подпись суммы едет вместе с верхом столбца */
main.enter .vb-col i, main.soft .vb-col i { animation: growh .55s var(--ease) both; animation-delay: calc(var(--j, 0) * 18ms + 120ms); }
main.enter .zb i, main.soft .zb i { animation: growh .5s var(--ease) both; animation-delay: calc(var(--j, 0) * 40ms + 150ms); }
main.enter .vb-col .bv, main.soft .vb-col .bv, main.enter .zb .v, main.soft .zb .v { animation: fade .3s ease-out both; animation-delay: calc(var(--j, 0) * 18ms + 420ms); }
main.enter .hb .tr i, main.soft .hb .tr i, main.enter .seg i, main.soft .seg i { transform-origin: left; animation: growx .6s var(--ease) both; animation-delay: .15s; }
@keyframes reveal { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -2% -10% 0); } }
main.enter .sp, main.soft .sp, main.enter .q svg, main.soft .q svg, main.enter .lc svg, main.soft .lc svg {
  animation: reveal .9s var(--ease) both; animation-delay: .15s; }
html.theming, html.theming * { transition: background-color .3s, color .3s, border-color .3s, fill .3s, stroke .3s !important; }

/* ---------- планшет ---------- */
@media (max-width: 1199px) {
  .wrap { padding: 20px 24px 48px; }
  .top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo status" "nav nav"; row-gap: 14px; }
  .top .logo { grid-area: logo; }
  .top .hright { grid-area: status; }
  .top .navrow { grid-area: nav; }
  .top .caps { flex: 1; }
  .menu { top: 58px; right: 24px; }
  .g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g.g5 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .s2, .s3, .s4 { grid-column: 1 / -1; }
  .cols, .cols.l2 { display: flex; flex-direction: column; align-items: stretch; }
  .cols > .col { display: contents; }
  .cols > .col > * { order: var(--o, 0); }
  .ph h1, .ahero h1 { font-size: 40px; }
}

/* ---------- телефон ---------- */
@media (max-width: 767px) {
  :root { --r-card: 10px; }
  body { font-size: 15px; }
  .wrap { padding: 14px 12px calc(110px + env(safe-area-inset-bottom)); }
  .top { display: none; }
  .ph { margin: 6px 4px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 12px; }
  .ph .brand { display: block; font: 600 12px/1 'Onest', sans-serif; letter-spacing: .14em; color: var(--mu); margin-bottom: 8px; }
  body:has(.logo.two) .ph .brand { font: 700 17px/1 'Onest', sans-serif; letter-spacing: -.01em; color: var(--ink); margin-bottom: 12px; }
  .ph h1 { font-size: 34px; letter-spacing: -.02em; }
  .ph .sub { font-size: 14px; margin-top: 8px; }
  .ph .mstat { display: flex; align-items: center; gap: 6px; font: 500 12px/1 'Onest', sans-serif; color: var(--mu); background: none; border: 0;
    padding: 6px 4px; }
  .ph .phr { grid-column: 1 / -1; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; }
  .ph .phr .sw { order: 2; height: 40px; }  /* на телефоне — под периодом, во всю ширину */
  .ph .phr .sw button { flex: 1; }
  .ph .per .pb { flex: 1; justify-content: center; }
  .ph .per .pb .nw { overflow: hidden; text-overflow: ellipsis; }
  .g { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .g:has(> .tile) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .tl { font-size: 13px; flex-direction: column; align-items: flex-start; row-gap: 5px; }
  .tile .dlx { align-items: flex-start; text-align: left; gap: 3px; }
  .tile .tl .dl { font-size: 12px; }
  .tile .tv { font-size: clamp(22px, 7vw, 28px); margin-top: 10px; }
  .tile .tv small { font-size: 13px; }
  .tile .tc { font-size: 12px; }
  .hb .r .l span { white-space: normal; overflow: visible; line-height: 1.25; }
  #main > * + * { margin-top: 10px; }
  #main > .sec { margin-top: 28px; }
  .cols, .col { gap: 10px; }
  .card { padding: 16px; }
  .tile { padding: 16px; }
  .ch { margin-bottom: 14px; }
  .ch h3 { font-size: 17px; }
  .sec { font-size: 19px; margin: 28px 4px 12px; }
  .tw { margin: 0 -16px; padding: 0 16px; }
  .hv { font-size: 34px; letter-spacing: -.03em; }
  .tv { font-size: 30px; }
  .zb { --zg: 6px; margin-top: 18px; }
  .zb .v { font-size: 11px; }
  .task .tt { font-size: 15px; }
  .task .tt .tag { display: none; }
  .ch .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; margin: 0 -16px; padding: 0 16px; }
  .ch .chips::-webkit-scrollbar { display: none; }
  .ch .chips .chip { flex: none; }
  .an { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .an .num { width: 40px; height: 40px; font-size: 17px; }
  .an h3 { font-size: 17px; }
  .an p { font-size: 14px; }
  .ahero { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
  .ahero img { width: 110px; }
  .ahero h1 { font-size: 30px; }
  .ahero .ttl { font-size: 13px; }
  .price .pv { font-size: 28px; }
  .hb .r { grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto; gap: 10px; font-size: 13px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .kv .v { font-size: 20px; }
  .ship { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ship .it { padding: 14px; }
  .ship .it .n { font-size: 24px; }
  a.q:hover { box-shadow: 0 0 0 6px var(--sf2); }
  .q.ld { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 12px; }
  .q.ld .qn span { display: none; }
  .q.lh .sp-x > span:nth-child(2) { display: none; }
  .ph .mright { display: flex; align-items: center; gap: 6px; align-self: start; margin-top: 12px; }
  .ph .mright .tbtn { width: 38px; height: 38px; }
  .mnav { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; gap: 8px; align-items: center; }
  .mnav .caps { flex: 1; justify-content: space-between; box-shadow: var(--sh); overflow: visible; }
  .mnav .caps a, .mnav .caps button { flex: 1; padding: 14px 6px; text-align: center; font-size: 14px; }
  .mnav .caps a.on { padding: 14px 6px; }
  .mnav .ai-btn { width: 54px; height: 54px; box-shadow: var(--sh); }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 90vh; border-radius: var(--r-card) var(--r-card) 0 0; transform: translateY(105%);
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .menu, .pop { display: none; }
  .only-m { display: block !important; }
  a.only-m { display: flex !important; }
  .only-d { display: none !important; }
  .mt { margin-top: 10px; }
  .an-card + .an-card { margin-top: 10px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- вход ---------- */
body.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: min(400px, 100%); background: var(--sf); border-radius: var(--r-card); padding: 32px 28px; display: grid; gap: 14px; }
.login-card .logo { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.login-card h1 { font: 700 34px/1 'Onest', sans-serif; letter-spacing: -.02em; margin-bottom: 8px; }
.login-card label { font: 500 13px/1 'Onest', sans-serif; color: var(--mu); }
.login-card .inp { padding: 14px 16px; font-size: 16px; }
.login-card .btn { padding: 16px 20px; font-size: 15px; margin-top: 6px; }
.login-card .err { color: var(--neg); font-size: 14px; }
.login-card .hint { color: var(--mu); font-size: 12px; text-align: center; }
