:root {
  --bg: #F4F1E8;
  --surface: #FBF9F3;
  --line: #DCD7CA;
  --line-strong: #B9B3A3;
  --ink: #1D211B;
  --muted: #5C5F55;
  --accent: #0E6B4A;
  --accent-soft: #DDEBDF;
  --warn: #8A5A12;

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-text: "Golos Text", system-ui, sans-serif;
  --f-num: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-text); }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: color 150ms var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- шапка ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { font: 700 19px/1 var(--f-display); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.logo:hover { color: var(--ink); }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); padding: 20px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.age { margin-left: auto; font: 500 12px/1 var(--f-text); border: 1px solid var(--ink); padding: 4px 6px; border-radius: 4px; }
@media (max-width: 760px) { .nav { display: none; } }

/* ---------- заголовок раздела ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.crumbs a { text-decoration: none; }
.page-head { padding: 32px 0 24px; }
.page-head h1 { font: 400 clamp(28px, 3.6vw, 44px)/1.12 var(--f-display); letter-spacing: -0.025em; margin: 0 0 12px; max-width: 20em; }
.page-head .sub { color: var(--muted); margin: 0; font-size: 15px; }
.page-head .sub b { color: var(--ink); font-weight: 500; }

/* поиск — главный элемент: FinSearch */
.search { position: relative; margin: 24px 0 0; max-width: 720px; }
.search input {
  width: 100%; font: 400 21px/1 var(--f-text); color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: 8px;
  padding: 18px 20px 18px 56px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }
.search svg { position: absolute; left: 20px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2; pointer-events: none; }

/* ---------- фильтры ---------- */
.filters { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.filters .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; color: var(--muted); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.tabs .c { font-size: 12px; opacity: 0.7; margin-left: 4px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0;
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  padding-right: 32px;
}
.chips button { flex: none; border: 1px solid var(--line-strong); background: none; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; transition: border-color 150ms var(--ease); }
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.sort { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; }

/* ---------- карточка акции: купон с отрывным корешком ---------- */
.promos { display: grid; gap: 16px; padding: 24px 0 64px; }
.promo {
  display: grid; grid-template-columns: 1fr 232px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  position: relative;
}
.promo-main { padding: 24px 32px 24px 24px; min-width: 0; }
.promo-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; }
.bk { font: 700 15px/1 var(--f-display); letter-spacing: -0.01em; }
.who { color: var(--muted); }
.flag { font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 4px; }
.amount { font: 700 clamp(32px, 4vw, 44px)/1 var(--f-display); letter-spacing: -0.03em; margin: 0 0 8px; }
.amount .pre { font: 400 16px/1 var(--f-text); letter-spacing: 0; color: var(--muted); margin-right: 8px; vertical-align: 0.5em; }
.amount .cur { font-weight: 400; font-size: 0.6em; margin-left: 4px; color: var(--muted); }
.promo h3 { font: 500 18px/1.35 var(--f-text); margin: 0 0 16px; max-width: 36em; }
.terms { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; font-size: 14px; }
.terms div { display: flex; flex-direction: column; }
.terms dt { color: var(--muted); font-size: 12px; }
.terms dd { margin: 0; font-weight: 500; }
.promo details { margin-top: 16px; font-size: 15px; }
.promo summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; width: max-content; }
.promo details ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); max-width: 44em; }
.promo details li { margin-bottom: 4px; }

.stub {
  border-left: 2px dashed var(--line-strong);
  padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  position: relative;
}
/* вырезы купона на линии отрыва */
.stub::before, .stub::after {
  content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.stub::before { top: -11px; clip-path: inset(50% 0 0 0); }
.stub::after { bottom: -11px; clip-path: inset(0 0 50% 0); }
.left { font-size: 14px; color: var(--muted); }
.left b { display: block; font: 700 24px/1.1 var(--f-display); color: var(--ink); letter-spacing: -0.02em; }
.left.soon b { color: var(--warn); }
.left.ended b { color: var(--muted); }
.btn {
  display: block; text-align: center; background: var(--accent); color: var(--surface);
  font: 500 16px/1 var(--f-text); padding: 16px; border-radius: 6px; text-decoration: none;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.btn:hover { color: var(--surface); background: #0A5A3D; transform: translateY(-1px); }
.btn:active { transform: none; }
.ad { font-size: 11px; line-height: 1.4; color: var(--muted); margin: 0; }
.promo.is-ended { opacity: 0.72; }
.promo.is-ended .btn { background: var(--line-strong); pointer-events: none; }

@media (max-width: 760px) {
  .promo { grid-template-columns: 1fr; }
  .promo-main { padding: 20px 16px; }
  .stub { border-left: 0; border-top: 2px dashed var(--line-strong); padding: 16px; flex-direction: row; align-items: center; }
  .stub::before, .stub::after { top: -11px; bottom: auto; left: auto; clip-path: inset(0 0 0 50%); }
  .stub::before { left: -11px; }
  .stub::after { right: -11px; clip-path: inset(0 50% 0 0); }
  .stub .btn { flex: 1; }
  .stub .ad { display: none; }
}

.empty { text-align: center; padding: 64px 16px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.empty p { margin: 0 0 16px; color: var(--muted); }
.empty button { border: 1px solid var(--ink); background: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; }
.demo-note { background: #F3E3C3; color: #5C3B07; font-size: 13px; text-align: center; padding: 8px 16px; margin: 0; }

/* ---------- секции ниже каталога ---------- */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
.block h2 { font: 400 clamp(24px, 2.6vw, 32px)/1.2 var(--f-display); letter-spacing: -0.02em; margin: 0 0 24px; }
.block .intro-p { color: var(--muted); max-width: 44em; margin: -8px 0 32px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(s); display: block; font: 700 32px/1 var(--f-display); color: var(--accent); margin-bottom: 12px; }
.steps b { display: block; font-weight: 500; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.tbl-wrap { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r { width: 48px; color: var(--muted); }
td.n { font: 700 15px/1.2 var(--f-display); white-space: nowrap; }
td.c { text-align: right; }
td.c a { font-weight: 500; color: var(--accent); white-space: nowrap; }
th.c { text-align: right; }

.prose { max-width: 720px; }
.prose h3 { font: 500 21px/1.3 var(--f-text); margin: 32px 0 8px; }
.prose p, .prose li { color: #3A3D35; font-size: 17px; line-height: 1.65; }

.faq details { border-top: 1px solid var(--line); max-width: 860px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 500; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--f-text); color: var(--accent); transition: transform 150ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 20px; max-width: 44em; }

.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guides a { display: block; padding: 24px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; transition: border-color 150ms var(--ease); }
.guides a:hover { border-color: var(--ink); color: var(--ink); }
.guides .meta { font-size: 12px; color: var(--muted); display: block; margin-bottom: 12px; }
.guides h3 { font: 500 18px/1.3 var(--f-text); margin: 0 0 8px; }
.guides p { color: var(--muted); margin: 0; font-size: 15px; }
@media (max-width: 860px) { .guides { grid-template-columns: 1fr; } }

/* ---------- подвал ---------- */
.foot { background: var(--ink); color: #CFCBBE; padding: 48px 0; font-size: 14px; }
.foot .wrap { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot .logo { color: var(--surface); display: inline-block; margin-bottom: 16px; }
.foot .logo span { color: #7FC8A6; }
.foot p { margin: 0 0 12px; max-width: 40em; }
.foot strong { color: var(--surface); font-weight: 500; }
.foot nav { display: grid; gap: 8px; align-content: start; }
.foot nav b { color: var(--surface); font-weight: 500; margin-bottom: 4px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--surface); }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } }

/* ---------- статья ---------- */
.article { padding: 32px 0 96px; }
.article .wrap { max-width: 760px; }
.article h1 { font: 400 clamp(28px, 3.6vw, 44px)/1.12 var(--f-display); letter-spacing: -0.025em; margin: 0 0 24px; }
.article .lead { font-size: 20px; color: var(--muted); margin: 0 0 40px; }
.article h2 { font: 400 26px/1.25 var(--f-display); letter-spacing: -0.015em; margin: 56px 0 16px; }
.article p, .article li { font-size: 18px; line-height: 1.7; }
.article li { margin-bottom: 8px; }
.article .formula { font-family: var(--f-num); font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; padding: 16px 20px; margin: 24px 0; overflow-x: auto; }
.article .formula b { color: var(--accent); }
.article table { margin: 24px 0; border: 1px solid var(--line); background: var(--surface); }
.article td.num, .article th.num { text-align: right; }
.article .next { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.code { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.code b { font: 400 14px/1 var(--f-num); color: var(--ink); background: var(--bg); border: 1px dashed var(--line-strong); padding: 4px 8px; border-radius: 4px; margin-left: 4px; }
.chips .c { font-size: 12px; color: var(--muted); margin-left: 6px; }
.chips button[aria-pressed="true"] .c { color: var(--accent); }
td.c a.none { color: var(--muted); font-weight: 400; pointer-events: none; text-decoration: none; }

/* ---------- матч дня ---------- */
.page-head.has-match .wrap { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.match { background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; padding: 20px; }
.m-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; }
.m-top b { font: 700 13px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; }
.live { display: inline-flex; align-items: center; gap: 6px; color: #A3261B; font-weight: 500; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #A3261B; animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.soon-pill { color: var(--muted); }
.m-league { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.m-teams { margin: 0 0 12px; display: grid; gap: 2px; }
.m-teams span { font: 700 22px/1.2 var(--f-display); letter-spacing: -0.02em; }
.m-teams span + span::before { content: "— "; color: var(--muted); font-weight: 400; }
.m-when { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.m-when b { color: var(--ink); font-weight: 500; }
.m-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; text-align: center; }
@media (max-width: 900px) { .page-head.has-match .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- статьи по видам спорта ---------- */
.guides.with-img a { padding: 0 0 24px; overflow: hidden; }
.guides.with-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin-bottom: 16px; }
.guides.with-img .meta, .guides.with-img h3, .guides.with-img p { padding: 0 20px; }
.article .cover { margin: 0 0 32px; }
.article .cover img { display: block; width: 100%; height: auto; border-radius: 8px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin: 56px 0 0; }
.cta p { margin: 0; font-size: 16px; color: var(--muted); }
.cta p b { display: block; color: var(--ink); font-weight: 500; font-size: 18px; margin-bottom: 4px; }
.cta .btn { flex: none; padding: 14px 24px; }
@media (max-width: 600px) { .cta { flex-direction: column; align-items: stretch; } }

section[id], #promos { scroll-margin-top: 80px; }

/* ---------- прогнозы ---------- */
.pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pg { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; transition: border-color 150ms var(--ease), transform 150ms var(--ease); }
.pg:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.pg-meta { font-size: 13px; color: var(--muted); }
.pg-teams { font: 700 20px/1.2 var(--f-display); letter-spacing: -0.02em; }
.pg-teams i { font-style: normal; font-weight: 400; color: var(--muted); }
.pg-when { font-size: 14px; color: var(--muted); }
.pg-pick { margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--line-strong); font-weight: 500; }
.pg-pick small { display: block; font-size: 12px; font-weight: 400; color: var(--accent); margin-bottom: 2px; }
@media (max-width: 900px) { .pg-grid { grid-template-columns: 1fr; } }
.st { font-size: 13px; color: var(--muted); }
.st.live { color: #A3261B; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.st.live i { width: 8px; height: 8px; border-radius: 50%; background: #A3261B; animation: pulse 1.6s var(--ease) infinite; }
.st.done { color: var(--ink); font-weight: 500; }

.mcard { background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; padding: 24px; margin: 0 0 32px; }
.mcard-teams { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 0 0 12px; font: 700 clamp(26px, 4vw, 40px)/1.1 var(--f-display); letter-spacing: -0.03em; }
.mcard-teams i { font-style: normal; font-weight: 400; color: var(--muted); }
.article .mcard p { font-size: 15px; margin: 0 0 8px; }
.article .mcard .mcard-teams { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; }

.pick { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin: 48px 0 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 24px; }
.article .pick p { margin: 0; }
.article .pick .pick-label { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.article .pick .pick-main { font: 700 24px/1.25 var(--f-display); letter-spacing: -0.02em; margin-bottom: 8px; }
.article .pick .pick-alt { font-size: 15px; color: var(--muted); }
.pick-act { display: grid; gap: 8px; text-align: center; }
.pick-link { font-size: 14px; color: var(--accent); font-weight: 500; }
@media (max-width: 600px) { .pick { grid-template-columns: 1fr; } }
.article .disclaimer { font-size: 13px; color: var(--muted); margin: 0 0 32px; }
.article .sources li { font-size: 15px; }

/* ---------- новости ---------- */
.news { max-width: 860px; }
.news-item { padding: 20px 0; border-top: 1px solid var(--line); }
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.tag { color: var(--accent); font-weight: 500; }
.news-item h3 { font: 500 19px/1.35 var(--f-text); margin: 0 0 6px; }
.news-item h3 a { text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.src { font-size: 13px; white-space: nowrap; }
.news-tabs { display: inline-flex; margin-top: 24px; }

/* ---------- многостраничная часть ---------- */
.home-head h1 { font-size: clamp(30px, 4vw, 52px); }
.home-head h1 b { font-weight: 700; color: var(--accent); }
.block.first { border-top: 0; padding-top: 8px; }
.pad-b { padding-bottom: 96px; }
.sec-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.sec-top h2 { margin: 0; }
.sec-top a { font-size: 15px; font-weight: 500; color: var(--accent); white-space: nowrap; text-decoration: none; }
.sec-top a::after { content: " →"; }
.sec-top a:hover { text-decoration: underline; }
a.bk { text-decoration: none; }
a.bk:hover { color: var(--accent); }

/* подборки: плитки-ярлыки */
.sets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sets a { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 120px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; transition: border-color 150ms var(--ease), transform 150ms var(--ease); }
.sets a:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.sets b { font: 700 16px/1.25 var(--f-display); letter-spacing: -0.01em; }
.sets span { font-size: 14px; color: var(--muted); }
.sets a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sets a[aria-current] span { color: #CFCBBE; }
.sets a:first-child { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.sets a:first-child span { color: var(--accent-soft); }
@media (max-width: 900px) { .sets { grid-template-columns: repeat(2, 1fr); } .sets a { min-height: 96px; } }

/* букмекеры: сетка */
.bk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bk-grid a { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; transition: border-color 150ms var(--ease); }
.bk-grid a:hover { border-color: var(--ink); color: var(--ink); }
.bk-grid b { font: 700 16px/1.2 var(--f-display); letter-spacing: -0.01em; }
.bk-grid span { grid-row: 2; font-size: 13px; color: var(--muted); }
.bk-grid em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 13px; font-weight: 500; color: var(--accent); }
@media (max-width: 900px) { .bk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .bk-grid { grid-template-columns: 1fr; } }
td.n a { text-decoration: none; }
