/* ==========================================================
   LENTA.km.ua — "neon ribbon" pop-brutalist theme
   ========================================================== */
:root {
  --ink: #160a33;
  --ink-2: #3b2d63;
  --paper: #fff7e8;
  --card: #ffffff;
  --pink: #ff2d87;
  --yellow: #ffd60a;
  --cyan: #00c2ff;
  --violet: #6a2cff;
  --orange: #ff7a1a;
  --lime: #b6ff3b;
  --radius: 20px;
  --border: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 45, 135, .16) 0, transparent 34%),
    radial-gradient(circle at 92% 22%, rgba(0, 194, 255, .18) 0, transparent 30%),
    radial-gradient(circle at 70% 96%, rgba(255, 214, 10, .22) 0, transparent 36%),
    radial-gradient(rgba(22, 10, 51, .09) 1.2px, transparent 1.3px);
  background-size: auto, auto, auto, 22px 22px;
  background-attachment: fixed, fixed, fixed, scroll;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); border: var(--border); border-radius: 12px;
  padding: 8px 14px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px dashed var(--pink); outline-offset: 3px; }

/* ---------- Header ---------- */
.top { position: relative; z-index: 5; padding-top: 18px; }
.top__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  background: var(--card); border: var(--border); border-radius: 26px;
  box-shadow: var(--shadow); padding: 14px 18px;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; gap: 6px; flex-shrink: 0; }
.logo__band {
  position: relative; display: inline-block; padding: 6px 16px 7px;
  background: linear-gradient(100deg, var(--pink) 0 34%, var(--violet) 34% 67%, var(--cyan) 67%);
  border: var(--border); border-radius: 10px; transform: skewX(-10deg);
  box-shadow: 4px 4px 0 var(--yellow), 4px 4px 0 3px var(--ink);
}
.logo__band span {
  display: inline-block; transform: skewX(10deg);
  font-family: var(--font-display); font-weight: 900; font-size: 24px;
  letter-spacing: .04em; color: #fff; line-height: 1;
  text-shadow: 2px 2px 0 var(--ink);
}
.logo__tld { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); }
.top__tagline { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); flex: 1 1 200px; line-height: 1.35; }
.mainnav { display: flex; flex-wrap: wrap; gap: 6px; }
.mainnav a {
  text-decoration: none; font-weight: 700; font-size: 15px; padding: 7px 14px;
  border-radius: 999px; border: 2px solid transparent; transition: .15s;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { border-color: var(--ink); background: var(--yellow); }

.langs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.langs a {
  display: inline-grid; place-items: center; min-width: 46px; height: 40px; padding: 0 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; text-decoration: none;
  border: var(--border); border-radius: 12px; background: var(--card); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.langs a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: var(--lime); }
.langs a.is-active { background: var(--pink); color: #fff; }

/* Ticker ribbon */
.ticker {
  margin: 22px -20px 0; background: var(--ink); color: var(--yellow);
  border-block: 3px solid var(--ink); transform: rotate(-1.2deg);
  overflow: hidden; white-space: nowrap; box-shadow: 0 6px 0 var(--pink);
}
.ticker__track { display: inline-flex; gap: 22px; padding: 10px 0; animation: ticker 38s linear infinite; }
.ticker span { font-family: var(--font-display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.ticker b { color: var(--pink); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Layout ---------- */
.layout {
  display: grid; gap: 34px; margin-top: 40px; margin-bottom: 64px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1040px) {
  .layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 40px; }
  .side { position: sticky; top: 20px; }
}

/* ---------- Article ---------- */
.crumbs { font-size: 14px; font-weight: 600; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-2); }
.crumbs a { text-decoration: none; border-bottom: 2px solid var(--pink); }
.crumbs a:hover { color: var(--pink); }

.post {
  background: var(--card); border: var(--border); border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink); padding: 22px 18px 30px;
}
@media (min-width: 720px) { .post { padding: 40px 48px 48px; } }

.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.meta-date time { color: var(--ink); font-weight: 800; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px; line-height: 1.2; background: var(--yellow);
}
.chip--pink { background: var(--pink); color: #fff; }
.chip--cyan { background: var(--cyan); }
.chip--yellow { background: var(--yellow); }
.chip--orange { background: var(--orange); }
.chip--violet { background: var(--violet); color: #fff; }

.post__title {
  font-family: var(--font-display); font-weight: 900; line-height: 1.12;
  font-size: clamp(26px, 4.4vw, 50px); letter-spacing: -.015em; margin: 18px 0 26px;
  overflow-wrap: anywhere; hyphens: auto;
}
.page-home .post__title {
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
  display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.page-home .post__head { margin-bottom: 26px; }

.post__body > * { max-width: 760px; }
.post__body > .frame, .post__body > .table-wrap { max-width: none; }
.post__body p { margin: 0 0 1.15em; }
.post__body .lead { font-size: 1.14em; font-weight: 500; line-height: 1.65; }
.post__body .lead::first-letter {
  float: left; font-family: var(--font-display); font-weight: 900; font-size: 3.3em; line-height: .9;
  padding: 6px 10px; margin: 4px 12px 0 0; background: var(--pink); color: #fff; border: var(--border); border-radius: 14px;
}
.post__body h2 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2.6vw, 30px); line-height: 1.22;
  margin: 1.8em 0 .7em; position: relative; padding-left: 22px;
}
.post__body h2::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 9px; border-radius: 6px;
  background: linear-gradient(var(--pink), var(--violet), var(--cyan));
}
.post__body strong { background: linear-gradient(transparent 60%, rgba(255, 214, 10, .7) 60%); }
.post__body a { color: var(--violet); font-weight: 700; }

/* Lists */
.post__body ul, .post__body ol { padding: 0; margin: 0 0 1.4em; list-style: none; }
.post__body li { position: relative; padding-left: 40px; margin-bottom: .75em; }
.post__body ul > li::before {
  content: ""; position: absolute; left: 6px; top: .5em; width: 16px; height: 16px;
  background: var(--cyan); border: 2px solid var(--ink); transform: rotate(45deg); border-radius: 3px;
}
.post__body ol { counter-reset: n; }
.post__body ol > li { counter-increment: n; padding-left: 50px; }
.post__body ol > li::before {
  content: counter(n); position: absolute; left: 0; top: .05em; width: 34px; height: 34px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 15px; line-height: 1;
  background: var(--yellow); border: var(--border); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink);
}
.post__body ol > li:nth-child(2n)::before { background: var(--cyan); }
.post__body ol > li:nth-child(3n)::before { background: var(--lime); }

.post__body ul.pillars { display: grid; gap: 14px; }
@media (min-width: 720px) { .post__body ul.pillars { grid-template-columns: repeat(3, 1fr); max-width: none; } }
.post__body ul.pillars li {
  margin: 0; padding: 54px 16px 16px; border: var(--border); border-radius: 18px; background: #fff;
  box-shadow: 5px 5px 0 var(--ink); font-weight: 600; font-size: 16px; line-height: 1.5;
}
.post__body ul.pillars li::before {
  left: 16px; top: 16px; width: 26px; height: 26px; transform: rotate(45deg);
}
.post__body ul.pillars li:nth-child(1) { background: #ffe3f0; }
.post__body ul.pillars li:nth-child(1)::before { background: var(--pink); }
.post__body ul.pillars li:nth-child(2) { background: #dff6ff; }
.post__body ul.pillars li:nth-child(3) { background: #fff6c7; }
.post__body ul.pillars li:nth-child(3)::before { background: var(--yellow); }

/* Quotes */
.post__body blockquote {
  position: relative; margin: 2em 0; padding: 30px 24px 24px 24px;
  background: var(--yellow); border: var(--border); border-radius: 22px; box-shadow: 8px 8px 0 var(--violet), 8px 8px 0 3px var(--ink);
  font-weight: 600; font-size: 1.06em; transform: rotate(-.6deg);
}
.post__body blockquote:nth-of-type(2n) { background: var(--cyan); transform: rotate(.6deg); box-shadow: 8px 8px 0 var(--pink), 8px 8px 0 3px var(--ink); }
.post__body blockquote::before {
  content: "“"; position: absolute; top: -26px; left: 18px; width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 46px; line-height: 1; padding-top: 16px;
  background: var(--ink); color: var(--yellow); border-radius: 50%;
}
.post__body blockquote p { margin: 0; }
@media (min-width: 720px) { .post__body blockquote { padding: 34px 40px 28px; } }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; border: var(--border); border-radius: 18px; box-shadow: 6px 6px 0 var(--cyan), 6px 6px 0 3px var(--ink); background: #fff; }
.post__body table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; min-width: 520px; }
.post__body th, .post__body td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 2px solid #eee4ff; }
.post__body thead th { background: var(--ink); color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.post__body tbody tr:nth-child(2n) { background: #faf6ff; }
.post__body tbody td:first-child { font-weight: 800; }
.post__body tbody tr:last-child td { border-bottom: 0; }

/* ---------- Image frames: centred, never stretched ---------- */
.frame {
  margin: 1.6em 0 2em; padding: 10px; background: #fff; border: var(--border); border-radius: 24px;
  box-shadow: 10px 10px 0 var(--pink), 10px 10px 0 3px var(--ink);
}
.frame--cyan { box-shadow: 10px 10px 0 var(--cyan), 10px 10px 0 3px var(--ink); }
.frame--yellow { box-shadow: 10px 10px 0 var(--yellow), 10px 10px 0 3px var(--ink); }
.frame--orange { box-shadow: 10px 10px 0 var(--orange), 10px 10px 0 3px var(--ink); }
.frame--violet { box-shadow: 10px 10px 0 var(--violet), 10px 10px 0 3px var(--ink); }
.frame__media {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 16px; border: 2px solid var(--ink); background: var(--ink);
}
.frame__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.frame figcaption { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 10px 6px 2px; line-height: 1.45; }
.frame figcaption::before { content: "▲ "; color: var(--pink); font-size: 11px; vertical-align: 1px; }
.post__body > .frame:first-child { margin-top: 0; }

/* ---------- Sidebar ---------- */
.side__title { margin: 0 0 18px; font-family: var(--font-display); font-size: 20px; font-weight: 900; text-transform: uppercase; }
.side__title span {
  display: inline-block; background: var(--ink); color: var(--lime); padding: 8px 16px; border-radius: 12px; transform: rotate(-2deg);
  box-shadow: 4px 4px 0 var(--pink);
}
.side__list { display: grid; gap: 22px; }
@media (min-width: 640px) and (max-width: 1039px) { .side__list { grid-template-columns: repeat(2, 1fr); } }

.card { --c: var(--pink); }
.card--cyan { --c: var(--cyan); }
.card--yellow { --c: var(--yellow); }
.card--orange { --c: var(--orange); }
.card--violet { --c: var(--violet); }
.card__link {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--card);
  border: var(--border); border-radius: 22px; overflow: hidden; box-shadow: 7px 7px 0 var(--c), 7px 7px 0 3px var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card__link:hover, .card__link:focus-visible { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 11px 11px 0 var(--c), 11px 11px 0 3px var(--ink); }
.card__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: var(--border); background: var(--ink); }
.card__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .35s ease; }
.card__link:hover .card__frame img { transform: scale(1.05); }
.card__num {
  position: absolute; top: 10px; left: 10px; font-family: var(--font-display); font-weight: 900; font-size: 15px;
  background: var(--c); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 3px 9px;
}
.card--violet .card__num { color: #fff; }
.card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.card__meta .chip { font-size: 10.5px; padding: 3px 8px; }
.card__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.32; overflow-wrap: anywhere; }
.card__excerpt { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.card__more { margin-top: auto; font-weight: 800; font-size: 14px; color: var(--ink); align-self: flex-start; border-bottom: 3px solid var(--c); }

/* ---------- Footer ---------- */
.foot { position: relative; background: var(--ink); color: #f4efff; margin-top: 30px; }
.foot__ribbon {
  height: 18px;
  background: repeating-linear-gradient(-45deg, var(--pink) 0 22px, var(--yellow) 22px 44px, var(--cyan) 44px 66px, var(--violet) 66px 88px);
  border-block: 3px solid var(--ink);
}
.foot__grid { display: grid; gap: 34px; padding-top: 46px; padding-bottom: 34px; }
@media (min-width: 900px) { .foot__grid { grid-template-columns: 1.3fr 1fr 1.2fr; gap: 40px; } }
.foot h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; color: var(--yellow); }
.foot p { margin: 0; font-size: 15px; line-height: 1.65; color: #d9d0f2; }
.logo--foot { margin-bottom: 20px; }
.logo--foot .logo__tld { color: #fff; }
.foot__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot__nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: #fff; border-bottom: 2px solid transparent; }
.foot__nav a:hover { border-color: var(--pink); color: var(--yellow); }
.foot__adult {
  display: flex; gap: 18px; align-items: flex-start; background: #24154a; border: 3px solid var(--pink);
  border-radius: 22px; padding: 20px; box-shadow: 6px 6px 0 var(--pink);
}
.badge18 {
  flex-shrink: 0; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 6px solid #e8112d; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink);
}
.badge18 span { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--ink); letter-spacing: -.03em; }
.foot__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 2px dashed rgba(255, 255, 255, .25); padding-top: 22px; padding-bottom: 30px; font-size: 14px;
}
.foot__bottom p { font-size: 14px; }
.foot__langs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.langs--foot a { color: var(--ink); box-shadow: 3px 3px 0 var(--pink); border-color: #fff; }
.langs--foot a.is-active { background: var(--yellow); color: var(--ink); }
.totop { color: var(--lime); font-weight: 800; text-decoration: none; }
.totop:hover { text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 719px) {
  body { font-size: 17px; }
  .top__row { border-radius: 20px; padding: 12px 14px; gap: 12px; }
  .top__tagline { order: 3; flex-basis: 100%; }
  .mainnav { order: 4; }
  .langs--top { margin-left: auto; }
  .logo__band span { font-size: 20px; }
  .post { box-shadow: 6px 6px 0 var(--ink); border-radius: 22px; }
  .frame { padding: 6px; border-radius: 18px; box-shadow: 6px 6px 0 var(--pink), 6px 6px 0 3px var(--ink); }
  .frame--cyan { box-shadow: 6px 6px 0 var(--cyan), 6px 6px 0 3px var(--ink); }
  .frame--yellow { box-shadow: 6px 6px 0 var(--yellow), 6px 6px 0 3px var(--ink); }
  .frame--orange { box-shadow: 6px 6px 0 var(--orange), 6px 6px 0 3px var(--ink); }
  .frame--violet { box-shadow: 6px 6px 0 var(--violet), 6px 6px 0 3px var(--ink); }
  .frame__media { border-radius: 12px; }
  .foot__adult { flex-direction: column; }
}
@media (min-width: 1040px) { .mainnav { margin-left: auto; } .top__tagline { flex: 0 1 260px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .card__link, .card__frame img, .langs a { transition: none; }
}
