/* ==========================================================
   KickIQ — дизайн-токены и компоненты
   Тема: светлая по умолчанию; тёмная — [data-theme="dark"]
   или системная тёмная тема, если data-theme не задан.
   В Telegram Mini App ставьте data-theme из Telegram.WebApp.colorScheme.
   ========================================================== */

:root, [data-theme="light"] {
  /* Цвета — светлая */
  --c-bg: #F6F5F1;
  --c-card: #FFFFFF;
  --c-text: #1A1A1A;
  --c-text-2: #6B6A66;
  --c-line: #ECEAE4;
  --c-line-strong: #E2E0D9;
  --c-accent: #0F5A3F;
  --c-accent-text: #0F5A3F;
  --c-accent-soft: #E6EFEA;
  --c-on-accent: #FFFFFF;
  --c-prob-1: #CFCCC4;
  --c-prob-2: #E4E2DB;
  --c-prob-line: #9A988F;
  --c-range: #9CC2AF;
  --c-track: #ECEAE4;
  --c-emblem: #EFEDE7;
  --c-photo: #ECEAE3;
  --c-done: #F1EFEA;
  --c-grabber: #DAD8D1;
  --c-scrim: rgba(26, 26, 20, 0.32);
  --c-glass: rgba(255, 255, 255, 0.72);
  --c-glass-border: rgba(26, 26, 26, 0.07);

  /* Тени */
  --shadow-card: 0 1px 2px rgba(26, 26, 20, 0.04), 0 10px 30px rgba(26, 26, 20, 0.05);
  --shadow-control: 0 1px 2px rgba(26, 26, 20, 0.06), 0 4px 12px rgba(26, 26, 20, 0.04);
  --shadow-glass: 0 10px 30px rgba(26, 26, 20, 0.10), inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.12);

  /* Шрифты */
  --f-display: 'Noto Serif Display', Georgia, serif;
  --f-serif: 'Source Serif 4', Georgia, serif;
  --f-ui: 'Onest', system-ui, -apple-system, sans-serif;

  /* Радиусы */
  --r-card: 22px;
  --r-inner: 18px;
  --r-tile: 16px;
  --r-sheet: 28px;
  --r-pill: 999px;

  /* Отступы (шаг 4) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px;
  --gutter: 16px;          /* поля экрана телефона */
  --section-gap: 28px;     /* между секциями главной */
  --card-pad: 20px;

  /* Линии */
  --hair: 1px;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
}

[data-theme="dark"] {
  --c-bg: #1E1F1B;
  --c-card: #282A25;
  --c-text: #EEECE6;
  --c-text-2: #A9A79F;
  --c-line: #383A33;
  --c-line-strong: #3E4039;
  --c-accent: #3FA77A;
  --c-accent-text: #5DBB8F;
  --c-accent-soft: #2D3B32;
  --c-on-accent: #0E1A13;
  --c-prob-1: #55574F;
  --c-prob-2: #3E4039;
  --c-prob-line: #8C8A82;
  --c-range: #3E6B55;
  --c-track: #34362F;
  --c-emblem: #34362F;
  --c-photo: #2F312B;
  --c-done: #34362F;
  --c-grabber: #4A4C45;
  --c-scrim: rgba(0, 0, 0, 0.5);
  --c-glass: rgba(44, 46, 40, 0.72);
  --c-glass-border: rgba(238, 236, 230, 0.10);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-control: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #1E1F1B; --c-card: #282A25; --c-text: #EEECE6; --c-text-2: #A9A79F;
    --c-line: #383A33; --c-line-strong: #3E4039; --c-accent: #3FA77A; --c-accent-text: #5DBB8F;
    --c-accent-soft: #2D3B32; --c-on-accent: #0E1A13; --c-prob-1: #55574F; --c-prob-2: #3E4039;
    --c-prob-line: #8C8A82; --c-range: #3E6B55; --c-track: #34362F; --c-emblem: #34362F;
    --c-photo: #2F312B; --c-done: #34362F; --c-grabber: #4A4C45; --c-scrim: rgba(0, 0, 0, 0.5);
    --c-glass: rgba(44, 46, 40, 0.72); --c-glass-border: rgba(238, 236, 230, 0.10);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.22);
    --shadow-control: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
    --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 8px; }

.screen {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 var(--gutter) calc(120px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  position: relative;
}
.screen--tight { gap: var(--s-6); }

/* ---------- Типографика ---------- */
.t-h1      { font-family: var(--f-display); font-weight: 500; font-size: 40px; line-height: 1.04; letter-spacing: -0.02em; }
.t-h1-sm   { font-family: var(--f-display); font-weight: 500; font-size: 32px; line-height: 1.1;  letter-spacing: -0.02em; }
.t-h2      { font-family: var(--f-display); font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.t-h3      { font-family: var(--f-display); font-weight: 500; font-size: 22px; line-height: 1.15; }
.t-num-xl  { font-family: var(--f-display); font-weight: 400; font-size: 76px; line-height: 0.95; letter-spacing: -0.03em; }
.t-num-xl .pct { font-size: 44px; vertical-align: 0.48em; margin-left: 2px; }
.t-num-l   { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 0.9; }
.t-num-m   { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.t-num-s   { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.15; }
.t-lead    { font-family: var(--f-serif); font-size: 17px; line-height: 1.45; color: var(--c-text-2); }
.t-body    { font-family: var(--f-serif); font-size: 16px; line-height: 1.55; }
.t-body-sm { font-family: var(--f-serif); font-size: 15px; line-height: 1.45; }
.t-team    { font-family: var(--f-serif); font-size: 17px; font-weight: 500; }
.t-team-sm { font-family: var(--f-serif); font-size: 16px; }
.t-ui      { font-family: var(--f-ui); font-size: 15px; font-weight: 500; }
.t-btn     { font-family: var(--f-ui); font-size: 16px; font-weight: 600; }
.t-caption { font-family: var(--f-ui); font-size: 13px; color: var(--c-text-2); }
.t-micro   { font-family: var(--f-ui); font-size: 12px; color: var(--c-text-2); }
.t-overline{ font-family: var(--f-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--c-text-2); }
.accent { color: var(--c-accent-text); }

/* ---------- Карточки ---------- */
.card {
  background: var(--c-card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 22px var(--card-pad);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.card--list { padding: 4px 18px; gap: 0; }
.tile { background: var(--c-bg); border-radius: var(--r-tile); padding: 14px; }

.section { display: flex; flex-direction: column; gap: var(--s-3); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px; }

/* ---------- Кнопки ---------- */
.btn {
  height: 50px; border-radius: 25px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-ui); font-size: 16px; font-weight: 600;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast), background-color var(--t-base);
  -webkit-tap-highlight-color: transparent;
}
.btn--lg { height: 52px; border-radius: 26px; }
.btn--sm { height: 44px; border-radius: 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--soft    { background: var(--c-accent-soft); color: var(--c-accent-text); }
.btn--outline { border: var(--hair) solid var(--c-line); color: var(--c-text); background: transparent; }
.btn--ghost   { color: var(--c-text-2); }
.btn:active   { transform: scale(0.97); opacity: 0.88; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn__label { opacity: 0; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.btn { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 44px; height: 44px; border-radius: 22px;
  background: var(--c-card); box-shadow: var(--shadow-control);
  display: inline-flex; align-items: center; justify-content: center; color: var(--c-text);
}
.icon-btn:active { transform: scale(0.94); }

.link { font-size: 15px; font-weight: 600; color: var(--c-accent-text); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

/* ---------- Бейджи ---------- */
.badge-demo {
  font-family: var(--f-ui); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-text-2); border: var(--hair) solid var(--c-line); border-radius: 6px; padding: 2px 6px; white-space: nowrap;
}
.badge-demo--inline { font-size: 10px; padding: 0 3px; border-radius: 4px; }
.badge-conf {
  font-size: 12px; font-weight: 600; color: var(--c-accent-text);
  background: var(--c-card); border-radius: var(--r-pill); padding: 4px 10px;
}
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: var(--c-bg); }
.pill--accent { background: var(--c-accent-soft); color: var(--c-accent-text); }

/* ---------- Чипы дней ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 20px; white-space: nowrap;
  background: var(--c-card); border: var(--hair) solid var(--c-line); color: var(--c-text);
  font-size: 15px; font-weight: 600;
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base);
}
.chip[aria-selected="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.chip:active { transform: scale(0.96); }

/* ---------- Эмблемы ---------- */
.emblem { border-radius: 50%; background: var(--c-emblem); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.emblem img { width: 100%; height: 100%; object-fit: contain; }
.emblem--l { width: 56px; height: 56px; font-family: var(--f-serif); font-weight: 600; font-size: 17px; color: var(--c-text-2); }
.emblem--s { width: 20px; height: 20px; }
.league-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--c-emblem); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--c-text-2); }

/* ---------- Карточка матча ---------- */
.match-card { gap: 20px; padding: 22px 20px 20px; }
.teams { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.teams__mid { padding-bottom: 26px; }
.hero-prob { display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* Шкала вероятности П1/Х/П2 */
.prob-bar { display: flex; gap: 3px; height: 8px; }
.prob-bar > span { border-radius: 4px; background: var(--c-prob-2); }
.prob-bar > .is-1 { background: var(--c-prob-1); }
.prob-bar > .is-fav { background: var(--c-accent); }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.outcome { display: flex; flex-direction: column; gap: 2px; }
.outcome:nth-child(2) { align-items: center; }
.outcome:nth-child(3) { align-items: flex-end; }
.outcome.is-fav .t-caption, .outcome.is-fav .t-num-s { color: var(--c-accent-text); }
.outcome.is-fav .t-caption { font-weight: 600; }

/* «Как посчитано» */
.why { border-top: var(--hair) solid var(--c-line); padding-top: 4px; }
.why__toggle { width: 100%; height: 48px; display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; }
.why__toggle > span { display: flex; align-items: center; gap: 10px; }
.why__chev { transition: transform var(--t-base) var(--ease-out); }
.why[data-open="true"] .why__chev { transform: rotate(180deg); }
.why__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease-out); }
.why[data-open="true"] .why__body { grid-template-rows: 1fr; }
.why__body > ol { overflow: hidden; min-height: 0; }
.reasons { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.why .reasons { padding: 0; transition: padding var(--t-slow) var(--ease-out); }
.why[data-open="true"] .reasons { padding: 4px 0 8px; }
.reasons li { display: flex; gap: 12px; align-items: flex-start; }
.num-dot { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--c-accent-soft); color: var(--c-accent-text); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Блок «Ставка ИИ» */
.ai-pick { background: var(--c-accent-soft); border-radius: var(--r-inner); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ai-pick__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ai-pick__market { font-family: var(--f-serif); font-size: 21px; font-weight: 600; line-height: 1.2; }

/* Строка матча */
.match-row {
  display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px;
  min-height: 72px; padding: 12px 0; border-top: var(--hair) solid var(--c-line);
  transition: background-color var(--t-fast);
}
.match-row:first-child { border-top: 0; }
.match-row:active { background: var(--c-bg); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.match-row__time { display: flex; flex-direction: column; gap: 2px; }
.match-row__teams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.match-row__team { display: flex; align-items: center; gap: 8px; }
.match-row__team span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-row__prob { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.match-row__prob b { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1; color: var(--c-accent-text); }

/* Сводка «три значения» */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: var(--hair) solid var(--c-line); border-radius: var(--r-tile); }
.trio > div { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.trio > div + div { border-left: var(--hair) solid var(--c-line); }

/* ---------- Футер-строка ---------- */
.disclaimer { font-size: 12px; color: var(--c-text-2); text-align: center; letter-spacing: 0.01em; }
.spacer { flex-grow: 1; }

/* ---------- Нижнее меню (стеклянная капсула) ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(362px, calc(100% - 28px)); height: 66px; padding: 5px;
  border-radius: 33px; background: var(--c-glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--c-glass-border); box-shadow: var(--shadow-glass);
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); z-index: 50;
}
.tab {
  border-radius: 28px; color: var(--c-text-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em;
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base);
}
.tab .i-fill { display: none; }
.tab[aria-current="page"] { background: var(--c-accent-soft); color: var(--c-accent-text); font-weight: 600; }
.tab[aria-current="page"] .i-line { display: none; }
.tab[aria-current="page"] .i-fill { display: block; }
.tab:active { transform: scale(0.94); }
/* Внутренние детали залитых иконок закрашиваются цветом подложки */
.tab .knock { fill: var(--c-accent-soft); stroke: var(--c-accent-soft); }

/* ---------- Шторка ---------- */
.scrim { position: fixed; inset: 0; background: var(--c-scrim); z-index: 80; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-width: 390px; margin: 0 auto;
  background: var(--c-card); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-sheet);
  padding: 10px 20px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 20px;
  animation: sheet-in var(--t-slow) var(--ease-out);
}
[data-theme="dark"] .sheet { background: var(--c-card); }
.sheet__grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--c-grabber); align-self: center; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================
   Дополнение, партия 2: компьютер, новые компоненты
   ========================================================== */

:root {
  --nav-h: 52px;
  --page-max: 1200px;
  --page-pad: 40px;
  --grid-gap: 24px;
}

/* ---------- Верхняя навигация (только компьютер) ---------- */
.topnav { display: none; }

/* ---------- Подсказка ---------- */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip__btn { width: 20px; height: 20px; border-radius: 10px; color: var(--c-text-2); display: inline-flex; align-items: center; justify-content: center; }
.tip__btn:hover, .tip__btn:focus-visible { color: var(--c-accent-text); }
.tip__bubble {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px);
  width: 240px; padding: 12px 14px; border-radius: 14px; z-index: 30;
  background: var(--c-text); color: var(--c-bg);
  font-family: var(--f-ui); font-size: 13px; line-height: 1.45; font-weight: 400; text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.tip__bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--c-text); }
.tip:hover .tip__bubble, .tip:focus-within .tip__bubble, .tip[data-open="true"] .tip__bubble { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------- Бейджи уверенности ---------- */
.conf { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.conf::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.conf--high { background: var(--c-accent); color: var(--c-on-accent); }
.conf--mid  { background: var(--c-accent-soft); color: var(--c-accent-text); }
.conf--low  { background: transparent; color: var(--c-text-2); box-shadow: inset 0 0 0 1px var(--c-line-strong); }

/* ---------- Пустое состояние ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 24px; }
.empty__icon { width: 56px; height: 56px; border-radius: 28px; background: var(--c-bg); color: var(--c-text-2); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.card .empty__icon { background: var(--c-bg); }

/* ---------- Скелетон загрузки ---------- */
.skel { background: var(--c-line); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent); transform: translateX(-100%); animation: skel 1.4s var(--ease-out) infinite; }
[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent); }
@keyframes skel { to { transform: translateX(100%); } }

/* ---------- Сегментный выбор П1/Х/П2 ---------- */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; padding: 4px; border-radius: 16px; background: var(--c-bg); }
.seg button { height: 44px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--c-text); transition: background-color var(--t-base) var(--ease-out), color var(--t-base); }
.seg button[aria-pressed="true"] { background: var(--c-card); color: var(--c-accent-text); box-shadow: var(--shadow-control); }

/* ---------- Переключатель ---------- */
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--c-line-strong); position: relative; flex: none; transition: background-color var(--t-base) var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: transform var(--t-base) var(--ease-out); }
.switch[aria-checked="true"] { background: var(--c-accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ---------- Строки настроек / списка ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-top: 1px solid var(--c-line); }
.list-row:first-child { border-top: 0; }

/* ---------- Таблица данных ---------- */
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.dtable th, .dtable td { padding: 14px 8px; text-align: right; white-space: nowrap; }
.dtable th:first-child, .dtable td:first-child { padding-left: 0; }
.dtable th:last-child, .dtable td:last-child { padding-right: 0; }
.dtable thead th { font-size: 12px; font-weight: 500; color: var(--c-text-2); padding-top: 4px; padding-bottom: 10px; }
.dtable .l { text-align: left; }
.dtable tbody tr { border-top: 1px solid var(--c-line); }
.dtable tr.is-ai { background: var(--c-accent-soft); }
.dtable tr.is-ai td:first-child { border-radius: 12px 0 0 12px; padding-left: 10px; }
.dtable tr.is-ai td:last-child { border-radius: 0 12px 12px 0; padding-right: 10px; }
.scroll-x { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

/* ---------- Сетки страниц ---------- */
.grid-2, .grid-3, .grid-main { display: flex; flex-direction: column; gap: var(--section-gap); }
.only-desktop { display: none !important; }

/* ==========================================================
   Компьютер: от 1024 px
   ========================================================== */
@media (min-width: 1024px) {
  body { font-size: 16px; }
  .only-desktop { display: revert !important; }
  .only-phone { display: none !important; }
  .tabbar { display: none; }

  .topnav {
    display: block; position: sticky; top: 0; z-index: 60;
    height: var(--nav-h);
    background: color-mix(in srgb, var(--c-bg) 80%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--c-line);
  }
  .topnav__in { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); height: 100%; display: flex; align-items: center; gap: 32px; }
  .topnav__brand { font-family: var(--f-display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; margin-right: auto; }
  .topnav__links { display: flex; gap: 28px; }
  .topnav__links a { font-size: 13px; font-weight: 500; color: var(--c-text-2); transition: color var(--t-base); }
  .topnav__links a:hover { color: var(--c-text); }
  .topnav__links a[aria-current="page"] { color: var(--c-text); font-weight: 600; }
  .topnav .btn { height: 34px; border-radius: 17px; font-size: 13px; padding: 0 14px; margin-left: 8px; }

  .screen, .screen--tight {
    max-width: var(--page-max); padding: 40px var(--page-pad) 48px; gap: 40px;
  }
  .t-h1 { font-size: 64px; line-height: 1.02; }
  .t-h1-sm { font-size: 48px; line-height: 1.06; }
  .t-h2 { font-size: 32px; }
  .t-num-xl { font-size: 96px; }
  .t-num-xl .pct { font-size: 54px; }
  .t-lead { font-size: 20px; }
  .card { padding: 28px; border-radius: 26px; }
  .card--list { padding: 6px 24px; }
  .match-row:active { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .match-row:hover { background: var(--c-bg); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .btn:hover { filter: brightness(1.06); }

  .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--grid-gap); align-items: start; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--grid-gap); align-items: stretch; }
  .grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
  .sticky-col { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: var(--grid-gap); }
  .disclaimer { padding-top: 8px; border-top: 1px solid var(--c-line); padding: 20px 0 0; }

  /* Шторка → окно по центру */
  .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 480px; max-width: none; transform: translate(-50%, -50%); border-radius: 28px; padding: 32px; animation: modal-in var(--t-slow) var(--ease-out); }
  .sheet__grabber { display: none; }
  @keyframes modal-in { from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
