@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --hdr-h: 68px;
  --pitch:     #0a1f0a;
  --gold:      #f5c518;
  --gold2:     #e0ad00;
  --green-acc: #2ecc71;
  --text:      rgba(255,255,255,.93);
  --muted:     rgba(255,255,255,.60);
  --muted2:    rgba(255,255,255,.38);
  --stroke:    rgba(255,255,255,.10);
  --stroke2:   rgba(255,255,255,.06);
  --r8:  8px;
  --r12: 12px;
  --r16: 16px;
  --glow-gold:  0 0 0 1px rgba(245,197,24,.3), 0 0 20px rgba(245,197,24,.15);
  --glow-green: 0 0 0 1px rgba(46,204,113,.3), 0 0 20px rgba(46,204,113,.15);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--pitch);
  -webkit-font-smoothing: antialiased;
  /* Единственное место где блокируем горизонтальный скролл */
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
body.is-locked { overflow: hidden; }

/* ФОНОВЫЙ DIV — важно position:fixed и width:100vw вместо 100% */
.bg-stadium {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg-stadium::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,80,20,.55) 0%, transparent 70%),
    linear-gradient(180deg, #061206 0%, #0a1f0a 40%, #0d2b0d 100%);
}
.bg-stadium::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Crect width='80' height='80' fill='none' stroke='%2300ff44' stroke-width='0.4'/%3E%3C/svg%3E");
  background-size: 80px 80px;
}

/* ═══ HEADER ═══════════════════════════════════════════════════ */
.hdr { position: sticky; top: 0; z-index: 50; }
.hdr__bar {
  height: var(--hdr-h);
  background: rgba(4,10,4,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245,197,24,.15);
}
.hdr__container {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
}
.hdr__grid {
  height: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
}
.burger {
  width: 44px; height: 44px;
  border-radius: var(--r8);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 5px;
  transition: background .18s, border-color .18s;
}
.burger:hover { background: rgba(245,197,24,.08); border-color: rgba(245,197,24,.3); }
.burger__line { width: 18px; height: 2px; background: var(--gold); border-radius: 999px; }

.hdr__nav { display: flex; justify-content: center; }
.nav { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-item {}
.nav-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--r8);
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .16s, background .16s, border-color .16s;
}
.nav-link:hover, .nav-link--active {
  color: var(--gold);
  background: rgba(245,197,24,.08);
  border-color: rgba(245,197,24,.2);
}

.hdr__logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-text { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 2px; color: var(--gold); line-height: 1; }
.logo-text span { color: var(--green-acc); }

.hdr__actions { display: flex; align-items: center; gap: 10px; }
.langSwitch { display: flex; align-items: center; gap: 4px; }
.langSwitch--header .langSwitch__link {
  padding: 5px 9px;
  border-radius: var(--r8);
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.langSwitch--header .langSwitch__link:hover,
.langSwitch--header .langSwitch__link.is-active {
  color: var(--gold);
  border-color: rgba(245,197,24,.3);
  background: rgba(245,197,24,.08);
}

/* ═══ BUTTONS ═══════════════════════════════════════════════════ */
.btn {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--r8);
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .8px;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .14s, box-shadow .14s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  border-color: var(--gold2);
  background: linear-gradient(160deg, var(--gold), var(--gold2));
  color: #0a1a00;
  font-weight: 700;
}
.btn--primary:hover { box-shadow: var(--glow-gold); }
.btn--ghost {
  border-color: rgba(46,204,113,.35);
  background: rgba(46,204,113,.06);
  color: var(--green-acc);
}
.btn--ghost:hover { box-shadow: var(--glow-green); }

/* ═══ OVERLAY + SIDE ════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  z-index: 70;
}
.side {
  position: fixed; top: 0; left: 0;
  height: 100svh;
  width: 300px;
  max-width: calc(100vw - 56px);
  z-index: 80;
  background: linear-gradient(180deg, #061206 0%, #0a1f0a 100%);
  border-right: 1px solid rgba(245,197,24,.15);
  transform: translateX(-105%);
  transition: transform .22s ease;
  overflow: hidden;
}
.side.is-open { transform: translateX(0); }
.side__top {
  height: 68px; padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--stroke2);
}
.side__close {
  width: 40px; height: 40px;
  border-radius: var(--r8);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  position: relative;
  display: grid; place-items: center;
  transition: background .16s, border-color .16s;
}
.side__close:hover { background: rgba(245,197,24,.08); border-color: rgba(245,197,24,.3); }
.xline {
  position: absolute; width: 18px; height: 2px;
  background: var(--gold); border-radius: 999px;
}
.xline:nth-child(1) { transform: rotate(45deg); }
.xline:nth-child(2) { transform: rotate(-45deg); }
.side__content { padding: 20px 14px; overflow: auto; height: calc(100svh - 68px); }
.side__list { list-style: none; display: grid; gap: 4px; }
.side__link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r12);
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-weight: 500; font-size: 15px;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.side__link:hover, .side__link--active {
  color: var(--gold);
  background: rgba(245,197,24,.06);
  border-color: rgba(245,197,24,.18);
}
.side .langSwitch__link {
  padding: 7px 14px;
  border-radius: var(--r8);
  font-family: 'Oswald', sans-serif;
  font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  border: 1px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.side .langSwitch__link.is-active {
  color: var(--gold); border-color: rgba(245,197,24,.3); background: rgba(245,197,24,.08);
}

/* ═══ ОБЁРТКА СТРАНИЦЫ ══════════════════════════════════════════ */
/* Единый контейнер — всё внутри него */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  /* Критично: не позволяем контенту выходить за ширину */
  width: 100%;
}

/* ═══ HERO ══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r16);
  border: 1px solid rgba(245,197,24,.2);
  margin: 24px 0 0;
  min-height: 240px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 70% at 25% 50%, rgba(0,100,30,.5) 0%, transparent 70%),
    linear-gradient(135deg, #051505 0%, #0f2b0f 50%, #0a1a0a 100%);
}
.hero__field-svg {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  opacity: .12; width: 260px; height: 180px; flex-shrink: 0;
}
.hero__content { position: relative; z-index: 2; padding: 32px 36px; flex: 1; min-width: 0; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(245,197,24,.12); border: 1px solid rgba(245,197,24,.25);
  font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 14px;
}
.hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(30px, 5vw, 58px);
  letter-spacing: 2px; line-height: .95; color: #fff;
  margin: 0 0 14px;
}
.hero__title .gold { color: var(--gold); }
.hero__title .green { color: var(--green-acc); }
.hero__sub { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 22px; max-width: 420px; }
.hero__cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.hero__stats {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 10px; z-index: 2;
}
.stat-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r12); padding: 12px 18px; text-align: center;
}
.stat-card__num {
  font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: var(--gold);
  line-height: 1; display: block;
}
.stat-card__label { font-size: 10px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ═══ LIVE STRIP ════════════════════════════════════════════════ */
.live-strip {
  height: 48px;
  display: flex; align-items: center;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(245,197,24,.12);
  border-radius: var(--r12);
  padding: 0 14px;
  margin: 16px 0 24px;
  /* Критично: contain изолирует переполнение дочерних элементов */
  contain: paint;
  overflow: hidden;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase; color: #ff4444;
  white-space: nowrap; flex-shrink: 0;
  padding-right: 14px; border-right: 1px solid var(--stroke); margin-right: 14px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #ff4444;
  animation: blink 1.2s ease infinite; flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

.live-scroll {
  display: flex; align-items: center; gap: 28px;
  white-space: nowrap; font-size: 13px;
  animation: marquee 30s linear infinite;
  /* Важно: will-change не создаёт новый stacking context для overflow */
}
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

.live-match { display: inline-flex; align-items: center; gap: 7px; font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 13px; }
.live-score {
  background: rgba(245,197,24,.15); border: 1px solid rgba(245,197,24,.3);
  border-radius: 4px; padding: 1px 7px; font-weight: 700; color: var(--gold); font-size: 12px;
}

/* ═══ SECTION HEAD ══════════════════════════════════════════════ */
.sec-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.sec-head__title { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 1.5px; color: #fff; }
.sec-head__line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(245,197,24,.3), transparent); }
.sec-head__badge {
  font-family: 'Oswald', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold);
  background: rgba(245,197,24,.10); border: 1px solid rgba(245,197,24,.25);
  border-radius: 999px; padding: 3px 10px;
}

/* ═══ GRID: контент + сайдбар ═══════════════════════════════════ */
.page {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  padding-bottom: 60px;
}

/* ═══ ARTICLE ═══════════════════════════════════════════════════ */
.article {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--stroke2);
  border-radius: var(--r16);
  padding: 28px;
  position: relative;
  overflow: hidden;
  /* Не позволяем контенту выходить за блок */
  min-width: 0;
}
.article::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--green-acc), transparent);
  opacity: .5;
}
.article h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: 1.5px; color: #fff; line-height: 1.05; margin: 0 0 18px;
}
.article h2 {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 18px;
  letter-spacing: .5px; text-transform: uppercase; color: var(--gold);
  margin: 32px 0 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(245,197,24,.2);
}
.article h3 { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 16px; color: var(--green-acc); margin: 22px 0 8px; }
.article p { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.80); margin: 0 0 14px; }
.article strong { color: var(--gold); font-weight: 600; }
.article em { color: var(--muted2); font-style: normal; font-size: 13px; }
.article a { color: var(--green-acc); text-decoration: underline; text-underline-offset: 3px; }

/* Таблицы — враппер со скроллом */
.article .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: var(--r12);
  border: 1px solid var(--stroke);
}
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.article thead tr { background: rgba(245,197,24,.10); }
.article thead th {
  padding: 11px 13px; text-align: left;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid rgba(245,197,24,.2);
  white-space: nowrap;
}
.article tbody tr { border-bottom: 1px solid var(--stroke2); transition: background .14s; }
.article tbody tr:hover { background: rgba(255,255,255,.04); }
.article tbody td { padding: 10px 13px; color: rgba(255,255,255,.82); vertical-align: middle; }
.article tbody tr:first-child td { color: var(--gold); font-weight: 600; }
.article iframe { border-radius: var(--r12); border: 1px solid var(--stroke); max-width: 100%; }

/* ═══ SIDEBAR ═══════════════════════════════════════════════════ */
.sidebar { display: grid; gap: 18px; position: sticky; top: calc(var(--hdr-h) + 16px); min-width: 0; }
.sb-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--stroke);
  border-radius: var(--r16); overflow: hidden;
}
.sb-card__head {
  padding: 13px 15px 11px; border-bottom: 1px solid var(--stroke2);
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 7px;
}
.sb-card__head::before { content: '▶'; font-size: 7px; color: var(--green-acc); }

.bookie-list { padding: 8px 0; }
.bookie-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 15px; border-bottom: 1px solid var(--stroke2);
  text-decoration: none; transition: background .14s;
}
.bookie-item:last-child { border-bottom: none; }
.bookie-item:hover { background: rgba(245,197,24,.04); }
.bookie-rank { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--muted2); min-width: 20px; }
.bookie-rank.top { color: var(--gold); }
.bookie-info { flex: 1; min-width: 0; }
.bookie-name { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookie-bonus { font-size: 10px; color: var(--green-acc); margin-top: 1px; }
.bookie-btn {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border-radius: var(--r8); font-family: 'Oswald', sans-serif; font-weight: 600;
  font-size: 10px; letter-spacing: .5px; text-transform: uppercase; text-decoration: none;
  background: linear-gradient(160deg, var(--gold), var(--gold2)); color: #0a1a00;
  white-space: nowrap; flex-shrink: 0;
  transition: opacity .14s, transform .14s;
}
.bookie-btn:hover { opacity: .88; transform: translateY(-1px); }

.match-list { padding: 0; }
.match-item { padding: 11px 15px; border-bottom: 1px solid var(--stroke2); }
.match-item:last-child { border-bottom: none; }
.match-league { font-size: 9px; font-family: 'Oswald', sans-serif; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--muted2); margin-bottom: 5px; }
.match-teams { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.match-team { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 13px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-team:last-child { text-align: right; }
.match-vs { font-family: 'Bebas Neue', sans-serif; font-size: 12px; color: var(--gold); letter-spacing: 1px; padding: 0 4px; flex-shrink: 0; }
.match-odds { display: flex; gap: 4px; margin-top: 7px; }
.odd-btn {
  flex: 1; text-align: center; padding: 5px; border-radius: 5px;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke);
  font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.odd-btn:hover { background: rgba(245,197,24,.12); border-color: rgba(245,197,24,.3); color: var(--gold); }
.odd-label { font-size: 8px; color: var(--muted2); display: block; }

/* ═══ FOOTER ════════════════════════════════════════════════════ */
.ft { margin-top: 40px; border-top: 1px solid rgba(245,197,24,.12); background: rgba(0,0,0,.4); }
.ft__container { max-width: 1240px; margin: 0 auto; padding: 40px 16px 28px; }
.ft__top { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 32px; align-items: start; margin-bottom: 32px; }
.ft__join { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.ft__list { list-style: none; display: grid; gap: 8px; }
.ft__link { font-size: 13px; text-decoration: none; color: var(--muted); transition: color .14s; }
.ft__link:hover { color: var(--gold); }
.ft__copy { font-size: 12px; color: var(--muted2); text-align: right; line-height: 1.7; }
.ft__legal { padding-top: 20px; border-top: 1px solid var(--stroke2); font-size: 11px; color: var(--muted2); line-height: 1.6; }

.toTop {
  position: fixed; bottom: 20px; right: 20px;
  width: 42px; height: 42px; border-radius: var(--r12);
  background: linear-gradient(160deg, var(--gold), var(--gold2));
  border: none; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(245,197,24,.3); z-index: 40;
  transition: transform .14s;
}
.toTop::before {
  content: ''; width: 9px; height: 9px;
  border-top: 2px solid #0a1a00; border-right: 2px solid #0a1a00;
  transform: rotate(-45deg) translate(1px, 1px);
}
.toTop:hover { transform: translateY(-2px); }

/* ═══ RESPONSIVE ════════════════════════════════════════════════ */

/* Планшет */
@media (max-width: 1024px) {
  .page { grid-template-columns: 1fr 260px; gap: 20px; }
  .hero__stats { right: 20px; }
}

/* Маленький планшет */
@media (max-width: 768px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; grid-template-columns: 1fr 1fr; }
  .hdr__nav { display: none; }
  .hdr__grid { grid-template-columns: 44px 1fr auto; }
  .hero__stats { display: none; }
  .hero__field-svg { display: none; }
  .ft__top { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* Мобильный */
@media (max-width: 480px) {
  :root { --hdr-h: 56px; }

  .hdr__grid { gap: 6px; }
  .logo-text { font-size: 20px; }

  .wrap { padding: 0 12px; }

  .hero { margin: 16px 0 0; border-radius: var(--r12); }
  .hero__content { padding: 20px 16px; }
  .hero__title { font-size: 30px; }
  .hero__sub { font-size: 13px; margin-bottom: 16px; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }

  .live-strip { height: 40px; margin: 12px 0 16px; }

  .page { gap: 14px; padding-bottom: 40px; }
  .sidebar { grid-template-columns: 1fr; }

  .article { padding: 16px; border-radius: var(--r12); }
  .article h1 { font-size: 20px; }
  .article h2 { font-size: 15px; }
  .article p { font-size: 14px; }

  .ft__top { grid-template-columns: 1fr; gap: 20px; }
  .ft__copy { text-align: left; }
  .ft__container { padding: 28px 12px 20px; }

  .btn { padding: 9px 14px; font-size: 12px; }
}

@media (max-width: 360px) {
  .wrap { padding: 0 10px; }
  .hero__title { font-size: 26px; }
  .article { padding: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   ВНУТРІШНІ СТОРІНКИ
   ═══════════════════════════════════════════════════════════════ */

/* ── Mini-hero (breadcrumb + заголовок сторінки) ── */
.page-hero {
  margin: 20px 0 0;
  padding: 22px 28px;
  border-radius: var(--r16);
  border: 1px solid rgba(245,197,24,.18);
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(0,90,20,.45) 0%, transparent 65%),
    linear-gradient(135deg, #051505 0%, #0f2b0f 60%, #0a1a0a 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--green-acc), transparent);
  opacity: .6;
}
.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 10px;
}
.page-hero__breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.page-hero__breadcrumb a:hover { color: var(--gold); }
.page-hero__breadcrumb span { color: var(--muted2); }
.page-hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
  margin: 0;
}
.page-hero__title .gold { color: var(--gold); }
.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245,197,24,.10);
  border: 1px solid rgba(245,197,24,.22);
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Обёртка страницы ── */
.wrap > .page {
  padding-top: 20px;
  padding-bottom: 60px;
}

.wrap > .page > main {
  min-width: 0;
}

/* ── Статья ── */
article.demo {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r16);
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 20px;
}
article.demo::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--green-acc), transparent);
  opacity: .5;
}

/* Типографіка */
article.demo h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 3.5vw, 36px);
  letter-spacing: 1.5px;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 18px;
}
article.demo h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 32px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,197,24,.2);
}
article.demo h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--green-acc);
  margin: 22px 0 8px;
}
article.demo p {
  font-size: 15px;
  line-height: 1.72;
  color: rgba(255,255,255,.82);
  margin: 0 0 14px;
}
article.demo strong { color: var(--gold); font-weight: 600; }
article.demo em { color: rgba(255,255,255,.40); font-style: normal; font-size: 13px; }
article.demo a { color: var(--green-acc); text-decoration: underline; text-underline-offset: 3px; }
article.demo ul,
article.demo ol { padding-left: 22px; margin: 0 0 14px; }
article.demo li {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.82);
  margin-bottom: 6px;
}
article.demo blockquote {
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  margin: 20px 0;
  background: rgba(245,197,24,.05);
  border-radius: 0 var(--r8) var(--r8) 0;
  font-size: 14px;
  color: rgba(255,255,255,.72);
}

/* Таблиці — обгортка зі скролом */
article.demo .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: var(--r12);
  border: 1px solid var(--stroke);
}
/* Таблиці без .table-wrap — авто-скрол через батько */
article.demo table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 20px 0;
  min-width: 480px;
}
/* Якщо таблиця не загорнута — додаємо скрол на саму таблицю */
article.demo > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
article.demo thead tr { background: rgba(245,197,24,.10); }
article.demo thead th {
  padding: 10px 12px;
  text-align: left;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(245,197,24,.2);
  white-space: nowrap;
}
article.demo tbody tr { border-bottom: 1px solid rgba(255,255,255,.06); transition: background .14s; }
article.demo tbody tr:hover { background: rgba(255,255,255,.03); }
article.demo tbody td { padding: 9px 12px; color: rgba(255,255,255,.82); vertical-align: middle; }
article.demo tbody tr:first-child td { color: var(--gold); font-weight: 600; }

article.demo figure { margin: 20px 0; }
article.demo img { max-width: 100%; border-radius: var(--r12); height: auto; }
article.demo iframe { max-width: 100%; border-radius: var(--r12); border: 1px solid rgba(255,255,255,.10); }

/* ── Адаптив внутрішніх сторінок ── */

/* Планшет широкий */
@media (max-width: 1024px) {
  .wrap > .page { grid-template-columns: 1fr 240px; gap: 18px; }
}

/* Планшет вузький → одна колонка, сайдбар вгорі двома картками в ряд */
@media (max-width: 768px) {
  .wrap > .page {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .wrap > .page .sidebar {
    position: static;
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .page-hero { padding: 18px 20px; }
  .page-hero__title { font-size: 28px; }
}

/* Мобільний */
@media (max-width: 480px) {
  .wrap > .page { padding-top: 0; padding-bottom: 40px; }
  .wrap > .page .sidebar {
    grid-template-columns: 1fr;
  }

  .page-hero {
    margin: 12px 0 0;
    padding: 16px;
    border-radius: var(--r12);
  }
  .page-hero__title { font-size: clamp(22px, 7vw, 30px); letter-spacing: 1px; }
  .page-hero__breadcrumb { font-size: 10px; }

  article.demo {
    padding: 16px;
    border-radius: var(--r12);
    margin-top: 14px;
  }
  article.demo h1 { font-size: 20px; }
  article.demo h2 { font-size: 15px; margin-top: 24px; }
  article.demo h3 { font-size: 14px; }
  article.demo p,
  article.demo li { font-size: 14px; line-height: 1.65; }
  article.demo table { min-width: 380px; }
}

@media (max-width: 360px) {
  .page-hero { padding: 14px; }
  article.demo { padding: 12px; }
  article.demo h1 { font-size: 18px; }
}
