/* LeadSite — тёмная тема. Цвета бренда приходят из base.html: --primary, --accent, --bg. */
:root {
  --primary: #43d11b;
  --accent: #f5c518;
  --bg: #0d1016;
  --panel: color-mix(in srgb, var(--bg) 88%, #fff 12%);
  --panel-2: color-mix(in srgb, var(--bg) 80%, #fff 20%);
  --line: color-mix(in srgb, var(--bg) 75%, #fff 25%);
  --text: #f3f5f7;
  --muted: #9aa3ad;
  --on-primary: #08130a;
  --radius: 10px;
  --sidebar: 236px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.gated, body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { flex: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px;
  border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 16px; white-space: nowrap; transition: filter .15s, background .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-lg { height: 56px; padding: 0 44px; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); }
.icon-btn:hover { background: var(--panel-2); }

/* ---------- каркас ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar); flex: none; overflow-y: auto; padding: 16px 14px;
  background: color-mix(in srgb, var(--bg) 92%, #fff 8%); display: flex; flex-direction: column; gap: 12px; }
.sidebar > * { flex-shrink: 0; }   /* длинный список языков — прокрутка меню, а не сжатие кнопок */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 0 24px 24px; }
.only-mobile { display: none; }

.logo { font-weight: 900; font-size: 26px; letter-spacing: -.02em; color: #fff; line-height: 1; }
.logo img { max-height: 36px; width: auto; }
.logo-accent { color: var(--primary); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 8px; }

.promo { position: relative; display: block; padding: 14px 16px; min-height: 92px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, #0a2a5a), #0b1f3d 70%); }
.promo-small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.promo-big { display: block; font-size: 17px; font-weight: 900; text-transform: uppercase; line-height: 1.15; }
.promo-ic { position: absolute; right: 10px; bottom: 8px; color: var(--accent); opacity: .9; transform: rotate(-12deg); }

.pill { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-radius: var(--radius);
  background: var(--panel); font-weight: 800; text-transform: uppercase; font-size: 14px; color: var(--accent); }
.pill-ic { color: var(--primary); }
.pill:hover { background: var(--panel-2); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 10px 6px;
  border-radius: var(--radius); background: var(--panel); text-align: center; font-size: 13px; font-weight: 600; line-height: 1.2; border: 1px solid transparent; }
.tile .ic { color: var(--primary); }
.tile:hover { background: var(--panel-2); }
.tile.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--panel)); }
.tile-wide { grid-column: 1 / -1; flex-direction: row; min-height: 52px; gap: 10px; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.side-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; }
.side-link:hover { background: var(--panel); }
.lang-menu { display: block; height: auto; padding: 0; }
.lang-menu summary { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; cursor: pointer; list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.lang-menu[open] summary::after { content: "▴"; }
.lang-list { display: flex; flex-direction: column; padding: 0 6px 6px; }
.lang-list a { padding: 8px 10px; border-radius: 6px; font-size: 14px; color: #cfd5db; }
.lang-list a:hover { background: var(--panel); color: #fff; }
.lang-list a.on { color: var(--primary); font-weight: 700; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); color: #cfd5db; }
.socials a:hover, .footer-links a[aria-label]:hover { color: var(--primary); border-color: var(--primary); }
.badge18 { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 6px; border-radius: 6px; border: 2px solid #e5484d;
  color: #fff; font-weight: 900; font-size: 13px; }
.sidebar-foot > .badge18 { align-self: flex-start; }

/* ---------- верхняя панель ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); }
.tab { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 7px; color: var(--muted); font-weight: 700; }
.tab .ic { color: var(--muted); }
.tab:hover, .tab.on { background: var(--panel); color: #fff; }
.tab.on .ic { color: var(--primary); }
.search { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search input { width: 220px; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: inherit; }
.search input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

/* ---------- бегущая строка ---------- */
.ticker { display: flex; align-items: center; margin: 4px 0 16px; border-radius: var(--radius); background: var(--panel); overflow: hidden; height: 40px; }
.ticker-label { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 14px; background: var(--accent); color: #15120a;
  font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; flex: none; }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-run { display: inline-flex; gap: 40px; padding-left: 24px; white-space: nowrap; animation: run 40s linear infinite; font-size: 14px; font-weight: 600; }
.ticker-run a:hover { color: var(--primary); }
.ticker:hover .ticker-run { animation-play-state: paused; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- слайдер ---------- */
.hero { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 6; min-height: 340px; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 75%); }
.slide-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
  height: 100%; max-width: 620px; padding: 32px 48px; }
.slide-cat { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--primary); color: var(--on-primary);
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.slide h2 { font-size: clamp(26px, 3.4vw, 50px); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.slide p { margin: 0; color: #d6dbe0; font-size: 17px; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.hero-nav:hover { background: rgba(255,255,255,.25); }
.hero-nav.prev { left: 12px; } .hero-nav.next { right: 12px; }
.dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; }
.dots button { width: 16px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.3); }
.dots button.on { width: 26px; background: #fff; }

/* ---------- лобби (ряд категорий) ---------- */
.lobby { display: flex; gap: 6px; overflow-x: auto; padding: 22px 0 6px; scrollbar-width: none; }
.lobby::-webkit-scrollbar { display: none; }
.lobby-item { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 96px; font-size: 14px; font-weight: 600; color: #e6e9ec; text-align: center; }
.lobby-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: #cfd5db; }
.lobby-item:hover .lobby-ic, .lobby-item.on .lobby-ic { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--panel)); }
.lobby-item.on { color: var(--primary); }

/* ---------- блоки и карточки ---------- */
.block { margin-top: 28px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.block-head h2 { font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
.show-all { color: #e6e9ec; font-size: 15px; } .show-all:hover { color: var(--primary); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--panel); isolation: isolate; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; z-index: -1; }
.card:hover img { transform: scale(1.06); }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.9) 100%); }
.card-ph { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; color: var(--line);
  background: radial-gradient(circle at 30% 20%, var(--panel-2), var(--panel)); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.card-title { font-weight: 900; font-size: 18px; line-height: 1.12; text-transform: uppercase; letter-spacing: -.005em; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #c9cfd5; }
.flag { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 5px; background: var(--primary); color: var(--on-primary);
  font-size: 11px; font-weight: 900; text-transform: uppercase; }
.flag-new { background: var(--accent); color: #15120a; }

.page-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 22px; }
.page-head h1 { font-size: 30px; font-weight: 900; text-transform: uppercase; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 12px; background: var(--panel); border: 1px solid var(--primary); color: var(--primary); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; color: var(--muted); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- статья ---------- */
.story { max-width: 820px; margin: 8px auto 0; }
.story-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.story-head h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; }
.story-head time { color: var(--muted); font-size: 14px; }
.story-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin-bottom: 22px; }
.story-lead { font-size: 20px; font-weight: 600; color: #e6e9ec; margin: 0 0 18px; }
.story-body { font-size: 18px; line-height: 1.7; color: #d7dce1; }
.story-body h2, .story-body h3, .story-body h4 { color: #fff; margin: 1.6em 0 .5em; }
.story-body h2 { font-size: 26px; } .story-body h3 { font-size: 21px; }
.story-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.story-body img { height: auto; border-radius: 10px; margin: 18px 0; }
.story-body figure { margin: 22px 0; } .story-body figcaption { color: var(--muted); font-size: 14px; text-align: center; }
.story-body blockquote { margin: 22px 0; padding: 6px 20px; border-left: 4px solid var(--primary); color: #fff; font-size: 20px; font-style: italic; }
.story-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.story-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 16px; }
.story-body th, .story-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.story-body th { color: #fff; background: var(--panel); }
.preview-bar { margin: 8px 0 16px; padding: 10px 14px; border-radius: 8px; background: #3d3210; color: #ffe08a; font-weight: 600; }

/* ---------- политика (/policy/) ---------- */
.lang-pick { display: flex; flex-wrap: wrap; gap: 6px; max-width: 820px; margin: 0 auto 18px; }
.lang-pick a { padding: 5px 11px; border-radius: 16px; border: 1px solid var(--line); font-size: 13px; color: #cfd5db; }
.lang-pick a:hover, .lang-pick a.on { border-color: var(--primary); color: #fff; background: color-mix(in srgb, var(--primary) 16%, var(--bg)); }
.policy .story-body ul { padding-left: 22px; }
.policy .story-body li { margin: 6px 0; }
.unsub { margin-top: 32px; padding: 26px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); scroll-margin-top: 90px; }
.unsub h2 { font-size: 24px; font-weight: 900; }
.unsub p { color: #cfd5db; }
.unsub-form { display: flex; flex-wrap: wrap; gap: 10px; }
.unsub-form input[type=email] { flex: 1; min-width: 220px; height: 48px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; }
.unsub-form .btn { height: 48px; }
.notice { padding: 12px 16px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 18%, var(--panel)); color: #e9f9e2; }
.notice-bad { background: #3a1a1a; color: #ffb4ad; }

/* ---------- подписка и подвал ---------- */
.subscribe { margin: 36px 24px 0; padding: 32px; border-radius: 14px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center;
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 22%, var(--panel)), var(--panel) 60%); border: 1px solid var(--line); }
.subscribe h2 { font-size: 28px; font-weight: 900; text-transform: uppercase; }
.subscribe p { color: #cfd5db; margin: 8px 0 0; }
.subscribe-form { display: flex; flex-direction: column; gap: 12px; }
.sf-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.subscribe-form input[type=email], .subscribe-form input[type=text] { height: 48px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
.subscribe-form input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.chips legend { width: 100%; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.chips legend span { color: var(--muted); font-weight: 400; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1px solid var(--line); background: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .ic { color: var(--muted); }
.chip:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 18%, var(--bg)); }
.chip:has(input:checked) .ic { color: var(--primary); }
.chip:has(input:focus-visible) { outline: 2px solid var(--primary); }
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent-check input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--primary); }
.sf-error { margin: -4px 0 0; color: #ff7b72; font-size: 13px; font-weight: 600; }
.sf-submit { height: 50px; align-self: flex-start; padding: 0 36px; }
.subscribe-page { margin: 8px 0 0; }
.subscribe-page h1 { font-size: 30px; font-weight: 900; text-transform: uppercase; margin-top: 14px; }
.message { max-width: 560px; margin: 40px auto; padding: 36px 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.message h1 { font-size: 28px; font-weight: 900; }
.message p { margin: 0; color: #cfd5db; }
.message .message-small { font-size: 13px; color: var(--muted); }
.footer { padding: 28px 24px 36px; color: var(--muted); font-size: 14px; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; color: #e6e9ec; font-weight: 600; }
.footer-cats a:hover, .footer a:hover { color: var(--primary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); color: #e6e9ec; font-weight: 600; }
.footer-links .ic { color: var(--primary); }
.disclaimer { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.footer-small a { text-decoration: underline; }

/* ---------- 18+ ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(3,5,8,.86); backdrop-filter: blur(10px); }
.gate-box { width: 100%; max-width: 440px; padding: 32px 28px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gate-18 { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 4px solid #e5484d; font-size: 26px; font-weight: 900; margin: 6px 0; }
.gate-box h2 { font-size: 24px; font-weight: 900; }
.gate-box p { margin: 0; color: #cfd5db; }
.gate-box .gate-small { font-size: 12px; color: var(--muted); }
.gate-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .tabs { display: none; }
  .search input { width: 180px; }
}
@media (max-width: 900px) {
  .only-mobile { display: inline-grid; }
  .logo.only-mobile { display: block; font-size: 22px; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; width: 280px; }
  body.menu-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar .btn-primary { height: 40px; padding: 0 14px; font-size: 14px; }
  .search { margin-left: auto; }
  .search input { display: none; }
  .content { padding: 0 16px 16px; }
  .slide { aspect-ratio: 4 / 5; min-height: 0; max-height: 520px; }
  .slide::after { background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.92) 85%); }
  .slide-text { justify-content: flex-end; padding: 22px 20px 40px; gap: 10px; }
  .slide p { font-size: 15px; }
  .btn-lg { height: 48px; padding: 0 26px; font-size: 16px; }
  .hero-nav { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card-title { font-size: 15px; }
  .subscribe { margin: 28px 16px 0; padding: 22px; grid-template-columns: 1fr; }
  .footer { padding: 24px 16px 32px; }
  .story-lead { font-size: 18px; } .story-body { font-size: 17px; }
}
@media (max-width: 520px) {
  .sf-row { grid-template-columns: 1fr; }
  .sf-submit { align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-run { animation: none; }
  html { scroll-behavior: auto; }
}
