/*
 * Оформление сайта cenovod.ru (BTPR-902) — стиль «Садовод» приложения (BTPR-942),
 * вёрстка по макетам, утверждённым владельцем 06.10.2026: главная — 3б с заголовком
 * из 3а, телефон — первый экран варианта 2 (`miniapp/docs/site.md`, «Вид страниц»).
 *
 * Цвета, шрифт и радиусы — ТОЛЬКО переменные из токенов приложения
 * (`miniapp/frontend/src/styles/tokens.css`, правило `miniapp/docs/design.md`
 * §1.1). Файл токенов не копируется в репозиторий: в образ бэкенда его кладёт
 * Dockerfile, сайт отдаёт его как `/static/styles/tokens.css`, а шрифт — как
 * `/static/assets/fonts/…` (пути в токенах относительные и сходятся).
 *
 * Размеры текста — в rem: крупный шрифт в настройках браузера увеличивает текст
 * сайта. Окно приложения на первом экране — иллюстрация в px внутри `zoom`.
 *
 * Классы смысловые, а не Tailwind: страницы рендерит сервер, и оформлению не
 * нужно пересобираться при каждой правке шаблона.
 */
@import url("styles/tokens.css");

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  --gut: 24px;
  --lift: 0 30px 60px -30px var(--c-overlay), 0 2px 8px var(--c-shadow);
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  /* Длинное слово при крупном шрифте на узком экране переносится, а не вылезает за край. */
  overflow-wrap: break-word;
}

a {
  color: var(--c-accent);
}

img {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.wrap {
  width: min(1200px, 100% - 2 * var(--gut));
  margin: 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.875rem, 1.1rem + 2.6vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.625rem, 1rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin: 0;
}

.lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--c-muted);
}

.small,
.note {
  font-size: 0.9375rem;
  color: var(--c-muted);
}

.note {
  margin-top: 16px;
}

.num {
  font-variant-numeric: tabular-nums;
}

.ic {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Знак ──────────────────────────────────────────────────────────────── */
.mark {
  flex: none;
}

/* Знак стоит на светлой плашке (как на макетах): так он читается и на тёмно-зелёной полосе. */
.brand .mark {
  background: var(--c-page);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.mark-loop {
  fill: none;
  stroke: var(--c-primary);
  stroke-width: 2;
  stroke-linecap: round;
}

.mark-tag {
  fill: var(--c-primary);
  fill-rule: evenodd;
}

.mark-line {
  fill: none;
  stroke: var(--c-on-primary);
  stroke-width: 4.2;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
}

.mark-head {
  fill: var(--c-on-primary);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Кнопки и метки ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 3.375rem;
  padding: 0.5rem 1.75rem;
  border-radius: var(--radius-control);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn-sm {
  min-height: 2.75rem;
  padding: 0.375rem 1.125rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
}

.btn-xl {
  min-height: 4rem;
  width: 100%;
  max-width: 28rem;
  font-size: 1.1875rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border: 1.5px solid var(--c-line);
  color: var(--c-ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--c-accent);
}

.btn-light {
  background: var(--c-on-deep);
  color: var(--c-deep);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-accent);
  font-weight: 600;
  font-size: 0.9375rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 2.125rem;
  padding: 0 0.875rem;
  border-radius: 999px;
  background: var(--c-drop-bg);
  color: var(--c-drop-ink);
  font-weight: 800;
  font-size: 1.0625rem;
  white-space: nowrap;
}

.pill.up {
  background: var(--c-rise-bg);
  color: var(--c-rise-ink);
}

/* ── Шапка ─────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 2;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 48px;
  min-height: 88px;
}

.nav {
  display: flex;
  gap: 4px 30px;
  font-size: 1rem;
  font-weight: 600;
}

.nav a {
  color: var(--c-muted);
  text-decoration: none;
  padding: 10px 0;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--c-accent);
}

.header-actions {
  margin-left: auto;
}

/* ── Первый экран главной (3б) ─────────────────────────────────────────── */
/* Окно приложения намеренно уходит за правый край экрана — обрезается здесь, а не
   прокруткой страницы. */
.hero {
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 36px 0 64px;
}

.hero h1 {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
  line-height: 1.06;
  margin: 16px 0 18px;
}

.hero-cta {
  margin-top: 30px;
}

.hero-note {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--c-muted);
}

.ways {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  font-size: 0.9375rem;
  color: var(--c-muted);
}

.ways .ic {
  color: var(--c-accent);
  margin-top: 0.15em;
}

.hero-vis {
  position: relative;
  padding: 44px 0 44px 44px;
}

.hero-vis::before {
  content: "";
  position: absolute;
  inset: 0 -260px 0 0;
  background: var(--c-soft);
  border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
}

/* Сообщение бота в Telegram */
.tg {
  background: var(--c-surface);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-2xs);
  padding: 14px 18px 12px;
  box-shadow: var(--lift);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--c-ink);
}

.tg-from {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--c-accent);
  margin-bottom: 6px;
}

.ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-primary);
  flex: none;
}

.tg-title {
  font-weight: 800;
  font-size: 1.125rem;
}

.tg-price {
  margin-top: 4px;
}

.tg-price b {
  font-size: 1.25rem;
}

.tg-price s,
.board-price s,
.pc-price s {
  color: var(--c-muted);
  margin-left: 6px;
}

.tg-meta {
  margin-top: 6px;
  color: var(--c-muted);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 12px;
}

.tg-meta span {
  white-space: nowrap;
}

/* График цены */
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart text {
  font-family: var(--font-sans);
  font-size: 14px;
  fill: var(--c-muted);
}

.chart .g {
  stroke: var(--c-line);
  stroke-width: 1.5;
}

.chart .flat {
  stroke: var(--c-chart-flat);
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
}

.chart .drop {
  stroke: var(--c-down);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
}

.chart .dot {
  fill: var(--c-drop-bg);
  stroke: var(--c-down);
  stroke-width: 4;
}

.chart .lbl {
  fill: var(--c-ink);
  font-weight: 700;
  font-size: 16px;
}

.chart .link {
  stroke: var(--c-muted);
  stroke-width: 2;
  stroke-dasharray: 3 6;
  fill: none;
  stroke-linecap: round;
}

/* Целевая цена и плитки цен */
.target {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-target-soft);
  border-radius: var(--radius-lg);
  padding: 12px 12px 12px 16px;
  font-size: 1rem;
  color: var(--c-ink);
}

.t-ico {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  border: 3px solid var(--c-target);
  display: grid;
  place-items: center;
}

.t-ico::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-target);
}

.t-val {
  margin-left: auto;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tiles div {
  background: var(--c-soft);
  border-radius: var(--radius-card);
  padding: 12px 10px;
  text-align: center;
}

.tiles span {
  display: block;
  font-size: 0.875rem;
  color: var(--c-muted);
}

.tiles b {
  font-size: 1.3125rem;
  white-space: nowrap;
}

/* Окно браузера с экраном «Товары» — иллюстрация, все размеры внутри — в px макета. */
.win {
  position: relative;
  width: 860px;
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--lift);
  border: 1px solid var(--c-line);
  font-size: 16px;
  line-height: 1.55;
}

.win-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--c-page);
  border-bottom: 1px solid var(--c-line);
}

.win-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c-line);
}

.win-bar .url {
  margin-left: 14px;
  height: 26px;
  flex: 1;
  max-width: 340px;
  border-radius: var(--radius-xs);
  background: var(--c-surface);
  font-size: 13px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.win-zoom {
  zoom: 0.5972;
}

.win .app {
  width: 1440px;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 940px;
}

.win .ic {
  width: 22px;
  height: 22px;
}

.win .side {
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.win .brand {
  font-size: 25px;
  padding: 2px 10px 20px;
}

.win .addbtn {
  width: 100%;
  justify-content: flex-start;
  min-height: 50px;
  font-size: 16px;
  border-radius: var(--radius-control);
  padding: 0 16px;
  margin-bottom: 14px;
}

.win .nav-i {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-muted);
}

.win .nav-i.on {
  background: var(--c-soft);
  color: var(--c-accent);
}

.win .cnt {
  margin-left: auto;
  font-size: 14px;
  color: var(--c-muted);
}

.win .red {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--c-dot);
  color: var(--c-on-primary);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

.win .me {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--c-line);
}

.win .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}

.win .me b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.win .me span {
  font-size: 13px;
  color: var(--c-muted);
}

.win .work {
  display: grid;
  grid-template-columns: 470px 1fr;
  min-width: 0;
}

.win .list {
  border-right: 1px solid var(--c-line);
  padding: 26px 24px;
  background: var(--c-page);
  min-width: 0;
}

.win .list-h {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

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

.win .shop {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-accent);
  font-weight: 700;
  font-size: 15px;
}

.win .shop.on {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.win .ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
}

.win .seg {
  display: inline-flex;
  border: 1.5px solid var(--c-accent);
  border-radius: 999px;
  padding: 3px;
}

.win .seg span {
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.win .seg .on {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.win .ctrl-r {
  display: flex;
  align-items: center;
  gap: 10px;
}

.win .slots {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.win .bar {
  height: 6px;
  border-radius: 999px;
  background: var(--c-soft);
  margin-top: 6px;
  width: 150px;
  overflow: hidden;
}

.win .bar i {
  display: block;
  height: 100%;
  background: var(--c-accent);
}

.win .bar .w25 { width: 25%; }
.win .bar .w50 { width: 50%; }
.win .bar .w75 { width: 75%; }
.win .bar .w100 { width: 100%; }

.win .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--c-line);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--c-surface);
}

.win .icon-btn .ic {
  width: 20px;
  height: 20px;
}

.win .tog {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  margin-bottom: 16px;
}

.win .sw {
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: var(--c-primary);
  position: relative;
  flex: none;
}

.win .sw::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-knob);
}

.win .item {
  display: flex;
  gap: 14px;
  background: var(--c-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 10px;
}

.win .item.sel {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px var(--c-soft);
}

.win .ph {
  width: 78px;
  height: 78px;
  border-radius: var(--radius-control);
  flex: none;
}

.win .it-b {
  flex: 1;
  min-width: 0;
}

.win .it-name {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.win .dots {
  color: var(--c-muted);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.win .it-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.win .it-price b {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.win .was {
  font-size: 13px;
  color: var(--c-muted);
}

.win .pill.sm {
  min-height: 26px;
  font-size: 14px;
  padding: 0 10px;
}

.win .it-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.win .goal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  background: var(--c-target);
  color: var(--c-target-ink);
  font-size: 13px;
  font-weight: 800;
  margin-top: 6px;
}

.win .goal::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
}

.win .since {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 6px;
}

.win .oos {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1.5px solid var(--c-line);
  font-size: 13px;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
}

.win .detail {
  padding: 28px 40px 40px;
  background: var(--c-surface);
  min-width: 0;
}

.win .d-top {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.win .d-ph {
  width: 132px;
  height: 132px;
  flex: none;
  border-radius: var(--radius-lg);
}

.win .d-info {
  flex: 1;
  min-width: 0;
}

.win .d-shop {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  color: var(--c-muted);
}

.win .instock {
  display: inline-flex;
  height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  background: var(--c-soft);
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 700;
}

.win .d-name {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin: 6px 0 8px;
  letter-spacing: -0.01em;
}

.win .d-meta {
  font-size: 15px;
  color: var(--c-muted);
}

.win .d-meta b {
  color: var(--c-ink);
  font-weight: 600;
}

.win .cp {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--c-accent);
  vertical-align: middle;
}

.win .cp .ic {
  width: 18px;
  height: 18px;
}

.win .d-menu {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--c-line);
  display: grid;
  place-items: center;
  color: var(--c-muted);
  font-weight: 800;
  flex: none;
}

.win .d-price {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 2px;
}

.win .d-price .now {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.win .d-price s {
  font-size: 22px;
  color: var(--c-muted);
}

.win .d-price .pill {
  min-height: 38px;
  font-size: 19px;
  padding: 0 16px;
}

.win .d-date {
  color: var(--c-muted);
  font-size: 15px;
}

.win .i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c-accent);
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}

.win .target {
  margin: 20px 0 12px;
  font-size: 17px;
}

.win .tiles span {
  font-size: 14px;
}

.win .tiles b {
  font-size: 21px;
}

.win .chart-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 6px;
}

.win .chart-t {
  font-size: 22px;
  font-weight: 700;
}

.win .tabs {
  display: flex;
  gap: 8px;
}

.win .tabs span {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--c-page);
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-muted);
}

.win .tabs span.on {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.win .tabs .cal {
  width: 38px;
  padding: 0;
  justify-content: center;
  background: var(--c-soft);
  color: var(--c-accent);
}

.win .cal .ic {
  width: 18px;
  height: 18px;
}

/* Карточка товара с падением цены — первый экран на узком экране (вариант 2) */
.pcard {
  display: none;
  position: relative;
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  padding: 16px 16px 18px;
  box-shadow: var(--lift);
  color: var(--c-ink);
}

.pc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-head > div {
  min-width: 0;
}

.pc-ph {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-control);
  flex: none;
}

.pc-shop {
  font-size: 0.8125rem;
  color: var(--c-muted);
}

.pc-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.pc-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 14px 0 6px;
}

.pc-price b {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pc-price s {
  margin-left: 0;
}

.pc-price .pill {
  margin-left: auto;
  font-size: 1rem;
}

.pc-chart text {
  font-size: 11px;
}

.pc-chart .flat {
  stroke-width: 4;
}

.pc-chart .drop {
  stroke-width: 4.5;
}

.pc-chart .dot {
  stroke-width: 3;
}

.pc-tg {
  position: relative;
  margin: 6px 0 0 auto;
  width: min(100%, 18.5rem);
  box-shadow: 0 10px 30px -12px var(--c-overlay), 0 1px 4px var(--c-shadow);
}

/* ── Разделы ───────────────────────────────────────────────────────────── */
.sec {
  padding-top: clamp(56px, 8vw, 120px);
}

/* Сразу под первым экраном — ближе, как на макете 3б */
.hero + .sec {
  padding-top: 40px;
}

.sec-s {
  padding-top: 40px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

.more {
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.can {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.can .card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.can .card p {
  color: var(--c-muted);
  font-size: 1rem;
}

.can .card.hl {
  background: var(--c-soft);
  border-color: transparent;
}

.can .big {
  white-space: nowrap;
  font-size: 3.375rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--c-accent);
}

/* Карточка с графиком (вариант 2) */
.board {
  background: var(--c-surface);
  border-radius: var(--radius-2xl);
  padding: 32px 40px 30px;
  box-shadow: var(--lift);
}

.board-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.board-ph {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-card);
  flex: none;
}

.board-title {
  flex: 1;
  min-width: 14rem;
}

.board-title .name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.board-price {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-price .now {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.board-price s {
  font-size: 1.25rem;
  white-space: nowrap;
}

.board .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 12px;
}

.board .tabs span {
  min-height: 2.25rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--c-page);
  display: inline-flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-muted);
}

.board .tabs span.on {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.chart-box {
  position: relative;
}

.board-tg {
  position: absolute;
  left: 45.5%;
  top: 27%;
  width: min(330px, 34%);
}

.board-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--c-line);
}

.board-foot .tiles {
  flex: 1 1 26rem;
  max-width: 520px;
}

.board-foot .target {
  margin-left: auto;
  flex: 0 1 430px;
}

/* Цены */
.prices {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  align-items: stretch;
}

.plan {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.plan.prem {
  border: 2px solid var(--c-accent);
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.plan-big {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.plan,
.can .card,
.acard,
.paper,
.pcard {
  hyphens: auto;
}

.plan-big small {
  white-space: nowrap;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0;
}

/* Отметка «Премиум пока не продаётся» — цветом предупреждения, как «Все места заняты» в приложении. */
.plan-off {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--c-warn-soft);
  color: var(--c-warn);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.plan-limit {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--c-accent);
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 32px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-soft);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.2em + 5px);
  width: 8px;
  height: 5px;
  border-left: 2.5px solid var(--c-accent);
  border-bottom: 2.5px solid var(--c-accent);
  transform: rotate(-45deg);
}

/* Сроки и цены приходят из базы: сетка на любое число ячеек */
.terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  gap: 10px;
}

.term {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  background: var(--c-page);
}

.term span {
  display: block;
  font-size: 0.875rem;
  color: var(--c-muted);
}

.term b {
  font-size: 1.375rem;
  white-space: nowrap;
}

.plan .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Статьи на главной */
.arts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

/* Рубрик бывает меньше трёх — колонки по их числу, без пустого места справа. */
.arts-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.arts-1 {
  grid-template-columns: minmax(0, 36rem);
}

.rub {
  border-top: 3px solid var(--c-accent);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
}

.rub-name {
  font-size: 1.4375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-decoration: none;
}

.rub-desc {
  color: var(--c-muted);
  font-size: 1rem;
  margin: 8px 0 14px;
}

.art {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--c-line);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
  text-decoration: none;
}

.art:hover,
.rub-name:hover {
  color: var(--c-accent);
}

/* Призыв в конце страницы */
.final {
  margin-top: clamp(56px, 8vw, 120px);
  background-color: var(--c-deep);
  color: var(--c-on-deep);
  border-radius: var(--radius-2xl);
  padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 40px;
  background-image: linear-gradient(color-mix(in srgb, var(--c-on-deep) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--c-on-deep) 5%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}

.final > div {
  flex: 1 1 16rem;
  min-width: 0;
  hyphens: auto;
}

.final h2 {
  font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.5rem);
}

.final p {
  color: var(--c-deep-muted);
  margin-top: 10px;
  font-size: 1.125rem;
}

/* ── Страницы-тексты, статьи, 404 ──────────────────────────────────────── */
.page-head {
  padding: 24px 0 32px;
}

.page-head .lead {
  margin-top: 14px;
  max-width: 44rem;
}

.crumbs {
  font-size: 0.9375rem;
  color: var(--c-muted);
  margin-bottom: 14px;
}

.doc {
  padding-top: 16px;
}

/* Колонка чтения (статья, документ) — по центру контейнера: прижатая влево,
   на широком экране она оставляла справа пустое поле в треть ширины. */
.doc > .paper {
  margin-inline: auto;
}

.paper {
  max-width: 860px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 48px);
}

.paper > h1 {
  margin-bottom: 20px;
}

.paper > .prose > :first-child {
  margin-top: 0;
}

.prose {
  overflow-wrap: anywhere;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose h1 {
  font-size: 1.875rem;
  margin: 0 0 14px;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 32px 0 12px;
}

.prose h3 {
  font-size: 1.1875rem;
  margin: 24px 0 8px;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-control);
}

.prose blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--c-accent);
  background: var(--c-soft);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

.prose table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 16px 0;
}

.prose th,
.prose td {
  border: 1px solid var(--c-line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.prose code {
  background: var(--c-soft);
  border-radius: var(--radius-2xs);
  padding: 1px 6px;
}

.prose .table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.prose .table-wrap table {
  margin: 0;
}

/* Обложка статьи — сама `<figure class="prose fig">`, а не вложенный рисунок: без второго
   селектора у неё оставались браузерные отступы по 40 px, и на телефоне она сжималась до трети
   колонки (06.10.2026). */
.prose .fig,
.prose.fig {
  margin: 16px 0;
  text-align: center;
}

.prose .fig img,
.prose.fig img {
  margin: 0 auto;
}

.prose .fig-portrait img {
  max-width: min(100%, 360px);
}

.prose figcaption {
  color: var(--c-muted);
  font-size: 0.875rem;
  margin-top: 6px;
}

.toc {
  margin: 0 0 24px;
  padding: 16px 20px;
  background: var(--c-page);
  border-radius: var(--radius-lg);
}

.toc-h {
  font-weight: 700;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.related {
  margin-top: 32px;
}

.related h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 20px;
}

.acard {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xl);
  padding: 24px;
}

/* Обложка — во всю ширину карточки сверху, обрезка по рамке карточки; кадр 16:9, чтобы карточки
   ряда были одной высоты при любых пропорциях исходника. */
.acard-with-cover {
  overflow: hidden;
}

.acard-cover {
  display: block;
  margin: -24px -24px 18px;
}

.acard-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.acard h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.acard h2 a {
  color: var(--c-ink);
  text-decoration: none;
}

.acard h2 a:hover {
  color: var(--c-accent);
}

.acard p:not(.note) {
  color: var(--c-muted);
  font-size: 1rem;
}

.nf {
  padding: 48px 0 24px;
}

.nf-code {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.nf .lead {
  margin-top: 14px;
}

.draft-banner {
  background: var(--c-soft);
  border-bottom: 1px solid var(--c-line);
  padding: 8px 0;
  font-size: 0.875rem;
}

/* ── Подвал ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: clamp(56px, 8vw, 120px);
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
}

.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: 32px 40px;
  padding: clamp(32px, 4vw, 56px) 0 clamp(24px, 3vw, 40px);
  font-size: 0.9375rem;
}

.foot a {
  display: block;
  margin-bottom: 10px;
  color: var(--c-ink);
  text-decoration: none;
}

.foot a:hover {
  color: var(--c-accent);
}

.foot .brand {
  display: inline-flex;
  margin-bottom: 0;
}

.foot-brand p {
  margin-top: 14px;
  color: var(--c-muted);
  max-width: 300px;
}

.foot-h {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
  font-weight: 700;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--c-line);
  font-size: 0.875rem;
  color: var(--c-muted);
}

.foot-legal {
  max-width: 40rem;
}

.foot-legal p {
  margin: 0 0 6px;
}

.foot-legal a {
  color: var(--c-muted);
}

/* ── Узкий экран ───────────────────────────────────────────────────────── */
@media (min-width: 960px) and (max-width: 1099px) {
  .hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }
}

@media (max-width: 1099px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 24px 0 48px;
  }

  .hero-text {
    max-width: 40rem;
  }

  .hero-vis {
    padding: 0;
  }

  .hero-vis::before,
  .win {
    display: none;
  }

  .pcard {
    display: block;
    max-width: 26rem;
  }

  .prices {
    grid-template-columns: minmax(0, 1fr);
  }

  .can {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arts {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .foot {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  }
}

@media (max-width: 759px) {
  body {
    --gut: 16px;
    font-size: 1rem;
  }

  .header-row {
    min-height: 64px;
    gap: 8px 16px;
  }

  .brand {
    font-size: 1.375rem;
  }

  /* Крупный шрифт на узком экране: заголовки не растут шире экрана — иначе слово
     «Отслеживание» рвётся посередине. */
  h1,
  .hero h1 {
    font-size: min(2rem, 9.5vw);
  }

  h2 {
    font-size: min(1.75rem, 8vw);
  }

  .plan {
    padding: 22px 20px;
  }

  .brand .mark {
    width: 34px;
    height: 34px;
  }

  .nav-how,
  .header-actions {
    display: none;
  }

  .nav {
    margin-left: auto;
    gap: 4px 18px;
    font-size: 0.9375rem;
  }

  /* Главная на телефоне: первый экран на тёмно-зелёной полосе, карточка с графиком
     наполовину на ней (первый экран варианта 2). */
  .home .site-header {
    background: var(--c-deep);
  }

  .home .site-header .brand,
  .home .site-header .nav a {
    color: var(--c-on-deep);
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
    padding: 12px 0 0;
  }

  .hero-text {
    display: contents;
  }

  .hero-grid::before {
    content: "";
    grid-area: 1 / 1 / 4 / 2;
    align-self: stretch;
    margin: -12px calc(-1 * var(--gut)) 0;
    background-color: var(--c-deep);
    background-image: linear-gradient(color-mix(in srgb, var(--c-on-deep) 5%, transparent) 1px, transparent 1px),
      linear-gradient(90deg, color-mix(in srgb, var(--c-on-deep) 5%, transparent) 1px, transparent 1px);
    background-size: 40px 40px;
  }

  .hero h1 {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    margin: 12px 0 14px;
    color: var(--c-on-deep);
  }

  .hero .lead {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    color: var(--c-deep-muted);
  }

  .hero-cta {
    grid-row: 3;
    grid-column: 1;
    position: relative;
    margin-top: 24px;
    padding-bottom: 7.5rem;
    text-align: center;
  }

  .hero-cta .btn-xl {
    max-width: none;
    background: var(--c-drop-bg);
    color: var(--c-drop-ink);
  }

  .hero-note {
    color: var(--c-deep-muted);
  }

  .hero-vis {
    grid-row: 4;
    grid-column: 1;
    margin-top: -6.5rem;
  }

  .pcard {
    max-width: none;
  }

  .hero-shops {
    grid-row: 5;
    grid-column: 1;
    margin-top: 20px;
  }

  .ways {
    grid-row: 6;
    grid-column: 1;
    margin-top: 14px;
  }

  .sec-board {
    display: none;
  }

  .can {
    grid-template-columns: minmax(0, 1fr);
  }

  .can .card {
    padding: 22px;
    border-radius: var(--radius-lg);
  }

  .can .big {
    font-size: min(2.75rem, 14vw);
  }

  .plan-big {
    font-size: 2.5rem;
  }

  .plan .btn,
  .final .btn {
    align-self: stretch;
    width: 100%;
  }

  .final {
    border-radius: var(--radius-xl);
  }

  .board-price .now {
    font-size: 2rem;
  }
}
