/* Kracks — «Новини та активності» і сторінка матеріалу (2026-10-30).

   Рішення Олександра (полотно концептів, 2026-10-30):
   - список — сітка в 3 колонки, як каталог; широкі плитки закривають ряд без дірок (news.js);
   - обкладинка: фото → рендер смаку (матеріал про продукт) → «плакат» у кольорі типу:
     заголовок і метатеги на обкладинці, позаду тиснення логотипа темніше за фон;
     плакат тягнеться на висоту сусідів разом із їхнім підписом;
   - стаття — смуга в кольорі типу з тисненням логотипа (як у футері, з внутрішнім рисунком),
     текст колонкою, галерея сіткою з переглядом на весь екран.
   Без карток і рамок: плитки впритул (4 px), між рядами — місце під підпис.

   Сторінки збирає tools/build_news.py → news.html, article.html. */

* { box-sizing: border-box; }

:root {
  --nw-bg: #fff8ec;
  --nw-fg: #1d0f10;
  --nw-muted: #6f5c54;   /* 5.96:1 на кремовому */
  --nw-red: #a8141d;     /* мітка типу на кремовому: 7.2:1 */
  --nw-gutter: 16px;     /* сітка — як у каталозі, «Де купити» й футері */
  --nw-pad: var(--kr-gutter, clamp(20px, 4.2vw, 80px)); /* текстові блоки — як хедер */
  --nw-top: 88px;        /* висота хедера */
  --nw-gap: 4px;
  --nw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Кольори типу матеріалу: фон обкладинки-плаката й смуги статті.
   --t-face/-light/-shade — тиснення на смузі (грань світліша за фон, як у футері);
   --t-in-* — тиснення на плакаті (грань темніша за фон). */
[data-type='news'] {
  --t-bg: #a8141d;
  --t-fg: #ffffff;
  --t-muted: #f6d6d2;    /* 5.3:1 */
  --t-label: #ffd23f;    /* 5.1:1 */
  --t-face: #ac1720;
  --t-light: rgb(255 232 214 / 0.16);
  --t-shade: rgb(48 0 6 / 0.5);
  --t-in-face: #9b111a;
  --t-in-light: rgb(255 232 214 / 0.14);
  --t-in-shade: rgb(40 0 4 / 0.5);
}

[data-type='event'] {
  --t-bg: #1d0f10;
  --t-fg: #fff8ec;
  --t-muted: #b0a08f;    /* 7.3:1 */
  --t-label: #ffd23f;
  --t-face: #221213;     /* токени тиснення футера */
  --t-light: rgb(255 232 214 / 0.07);
  --t-shade: rgb(0 0 0 / 0.5);
  --t-in-face: #160a0b;
  --t-in-light: rgb(255 232 214 / 0.07);
  --t-in-shade: rgb(0 0 0 / 0.55);
}

[data-type='promo'] {
  --t-bg: #ffd23f;
  --t-fg: #1d0f10;
  --t-muted: #6b5414;    /* 5.0:1 */
  --t-label: #a8141d;    /* 5.1:1 */
  --t-face: #ffd546;
  --t-light: rgb(255 253 240 / 0.75);
  --t-shade: rgb(120 80 0 / 0.32);
  --t-in-face: #f4c42c;
  --t-in-light: rgb(255 253 240 / 0.7);
  --t-in-shade: rgb(120 80 0 / 0.3);
}

html,
body { background: var(--nw-bg); }

body {
  margin: 0;
  font-family: var(--kr-font-text);
  color: var(--nw-fg);
}

.knw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Тиснення логотипа: три шари з footer.html (силует, кепка, літери) ---------- */

.knw-emb {
  position: absolute;
  aspect-ratio: 224 / 193;
  pointer-events: none;
  user-select: none;
}

.knw-emb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--emb-face);
  /* спершу тінь, потім світло — як у kracks-footer.css */
  filter:
    drop-shadow(var(--emb-edge, 1px) var(--emb-edge, 1px) 0 var(--emb-shade))
    drop-shadow(calc(-1 * var(--emb-edge, 1px)) calc(-1 * var(--emb-edge, 1px)) 0 var(--emb-light));
}

/* ============================== Список ============================== */

.knw {
  color: var(--nw-fg);
  background: var(--nw-bg);
}

.knw-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--nw-top) + clamp(32px, 6vw, 96px)) var(--nw-gutter) clamp(88px, 10vw, 160px);
}

.knw-head {
  display: flex;
  align-items: last baseline;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4.4vw, 64px);
}

.knw-title {
  max-width: 9ch;
  margin: 0 0 0 -0.04em; /* оптичний край «Н» */
  font: 900 clamp(64px, 9.5vw, 168px) / 0.86 var(--kr-font-display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.knw-lead {
  max-width: 30ch;
  margin: 0;
  font: 400 clamp(19px, 1.5vw, 22px) / 1.45 var(--kr-font-text);
  color: var(--nw-muted);
}

/* ---------- Сітка ---------- */

.knw-grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(40px, 4.4vw, 64px) var(--nw-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* span-и ставить news.js: data-lg — 3 колонки, data-sm — 2 колонки */
.knw-grid > li[data-lg='wide'] { grid-column: span 2; }
.knw-grid > li[data-lg='full'] { grid-column: 1 / -1; }

.knw-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.knw-cover {
  position: relative;
  display: block;
  flex: none;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cover, #3a2a26);
}

/* широка — два кадри 4:3 і проміжок між ними (висота — як у сусіда); на весь ряд — 16:6 */
li[data-lg='wide'] .knw-cover { aspect-ratio: auto; }
li[data-lg='wide'] .knw-cover::before { content: ''; display: block; padding-top: calc((100% - var(--nw-gap)) * 3 / 8); }
li[data-lg='full'] .knw-cover { aspect-ratio: 16 / 6; }

/* плакат тягнеться до низу підпису сусідів; пропорція лишається мінімумом */
.knw-item--poster .knw-cover {
  flex: 1 0 auto;
  background: var(--t-bg);
}

.knw-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.8s var(--nw-ease);
}

.knw-item:hover .knw-photo { scale: 1.03; }

/* рендер смаку: кадр 864×1080 цілий, по висоті обкладинки — як у каталозі */
.knw-render {
  position: absolute;
  top: 0;
  left: var(--x, 50%);
  height: 100%;
  width: auto;
  translate: -50% 0;
  transition: translate 0.45s var(--nw-ease);
}

.knw-render--chips { transition-duration: 0.6s; }
.knw-item:hover .knw-render--tube { translate: -50% -3%; }
.knw-item:hover .knw-render--chips { translate: -50% -6%; }
li[data-lg='wide'] .knw-render--tube,
li[data-lg='full'] .knw-render--tube { --x: 38%; }
li[data-lg='wide'] .knw-render--chips,
li[data-lg='full'] .knw-render--chips { --x: 62%; }

/* ---------- Плакат ---------- */

.knw-item--poster .knw-emb {
  --emb-face: var(--t-in-face);
  --emb-light: var(--t-in-light);
  --emb-shade: var(--t-in-shade);
  top: 46%;
  right: -12%;
  height: 118%;
  translate: 0 -50%;
  transition: rotate 0.8s var(--nw-ease), scale 0.8s var(--nw-ease);
}

.knw-item--poster:hover .knw-emb { rotate: -3deg; scale: 1.03; }

.knw-poster {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(20px, 2vw, 28px);
  color: var(--t-fg);
}

.knw-ptitle {
  display: block;
  max-width: 16ch;
  font: 900 clamp(32px, 3vw, 44px) / 0.9 var(--kr-font-display);
  text-transform: uppercase;
  text-wrap: balance;
}

li[data-lg='wide'] .knw-ptitle,
li[data-lg='full'] .knw-ptitle { max-width: 20ch; font-size: clamp(44px, 4.4vw, 64px); }

.knw-pmeta {
  display: block;
  margin-top: 14px;
  font: 600 14px/1.2 var(--kr-font-text);
  color: var(--t-muted);
}

.knw-pmeta b { color: var(--t-label); }

/* ---------- Підпис під плиткою ---------- */

.knw-cap { display: block; padding: 20px 12px 0; }

.knw-meta {
  display: block;
  font: 600 14px/1.2 var(--kr-font-text);
  color: var(--nw-muted);
}

.knw-meta b,
.knw-pmeta b {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.knw-meta b { color: var(--nw-red); }

.knw-name {
  display: block;
  max-width: 20ch;
  margin-top: 10px;
  font: 900 clamp(28px, 2.4vw, 34px) / 0.95 var(--kr-font-display);
  text-transform: uppercase;
  text-wrap: balance;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
  transition: text-decoration-color 200ms ease;
}

li[data-lg='wide'] .knw-name,
li[data-lg='full'] .knw-name { max-width: 24ch; font-size: clamp(36px, 3.4vw, 48px); }

.knw-item:hover .knw-name { text-decoration-color: currentColor; }

.knw-item:focus-visible { outline: none; }
.knw-item:focus-visible .knw-cover { outline: 2px solid var(--nw-fg); outline-offset: 3px; }

.knw-empty {
  margin: 0;
  font: 400 20px/1.5 var(--kr-font-text);
  color: var(--nw-muted);
}

/* поява: плитки підіймаються по черзі */
@media (prefers-reduced-motion: no-preference) {
  .knw-grid > li { animation: knw-in 0.9s var(--nw-ease) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
}

@keyframes knw-in { from { opacity: 0; translate: 0 32px; } }

/* ============================== Стаття ============================== */

/* Смуга: колір типу. З «одним полотном» колір дає полотно (data-canvas-bg), без JS — сама секція. */
.kna-hero {
  position: relative;
  overflow: hidden;
  color: var(--t-fg);
  background: var(--t-bg);
}

.kna-hero .knw-emb {
  --emb-face: var(--t-face);
  --emb-light: var(--t-light);
  --emb-shade: var(--t-shade);
  --emb-edge: 1.5px;
  top: clamp(40px, 6vw, 96px);
  right: -4%;
  height: min(118vh, 980px);
  max-height: 120%;
}

.kna-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--nw-pad);
}

.kna-band { padding-top: calc(var(--nw-top) + clamp(24px, 4vw, 56px)); }

.kna-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 600 15px/1.3 var(--kr-font-text);
  color: var(--t-muted);
}

.kna-crumbs li + li::before { content: '›'; margin-right: 10px; }

.kna-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.kna-crumbs li { display: flex; align-items: center; }

.kna-meta {
  margin: clamp(24px, 3.4vw, 40px) 0 20px;
  font: 600 15px/1.3 var(--kr-font-text);
  color: var(--t-muted);
}

.kna-meta b {
  color: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kna-title {
  max-width: 7.6em; /* ch у вузькому Display замалий: заголовок ламався на 4 рядки */
  margin: 0 0 0 -0.03em;
  font: 900 clamp(56px, 8.4vw, 144px) / 0.86 var(--kr-font-display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

.kna-lead {
  max-width: 40ch;
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  font: 400 clamp(19px, 1.7vw, 24px) / 1.45 var(--kr-font-text);
}

/* обкладинка: на першому екрані, внизу смуги */
.kna-cover {
  position: relative;
  margin: clamp(40px, 5vw, 72px) 0 0;
  padding-bottom: clamp(24px, 3vw, 40px);
}

.kna-cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  background: #3a2a26;
}

/* матеріал про смак без фото: рендер на кольорі смаку */
.kna-cover-product {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--cover);
}

.kna-cover-product img {
  position: absolute;
  top: 0;
  height: 100%;
  width: auto;
  translate: -50% 0;
}

.kna-cover-product .knw-render--tube { left: 40%; }
.kna-cover-product .knw-render--chips { left: 60%; }

.kna-caption,
.kna-figure figcaption {
  margin-top: 12px;
  font: 600 clamp(20px, 1.8vw, 24px) / 1.1 var(--kr-font-hand);
}

.kna-caption { text-align: right; color: var(--t-muted); }

/* без обкладинки: смуга — плакат на перший екран. Коротша смуга лишала б під лідом порожній колір:
   полотно перетікає в кремовий, лише коли текст доходить до середини екрана */
.kna-hero:not(:has(.kna-cover)) { min-height: min(100svh, 1080px); }
.kna-hero:not(:has(.kna-cover)) .kna-band { padding-bottom: clamp(72px, 8vw, 112px); }

/* ---------- Текст ---------- */

.kna-body {
  color: var(--nw-fg);
  background: var(--nw-bg);
}

.kna-body .kna-inner { padding-block: clamp(56px, 6vw, 88px) 0; }

.kna-text {
  max-width: 680px;
  margin: 0 auto;
  font: 400 19px/1.65 var(--kr-font-text);
}

.kna-text > * { margin: 0 0 24px; }
.kna-text > :last-child { margin-bottom: 0; }

.kna-text h2 {
  margin: 56px 0 20px;
  font: 900 clamp(38px, 3.4vw, 48px) / 0.95 var(--kr-font-display);
  text-transform: uppercase;
}

.kna-text ul { padding-left: 1.2em; }
.kna-text li + li { margin-top: 8px; }

.kna-text a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.kna-quote { margin: 56px 0; padding: 0; }

.kna-quote p {
  margin: 0;
  font: 900 clamp(38px, 4.4vw, 60px) / 0.95 var(--kr-font-display);
  text-transform: uppercase;
  color: var(--nw-red);
}

.kna-quote footer {
  margin-top: 16px;
  font: 600 26px/1.1 var(--kr-font-hand);
  color: var(--nw-muted);
}

/* фото в тексті — ширше за колонку */
.kna-figure {
  max-width: 1040px;
  margin: 72px auto;
}

.kna-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #3a2a26;
}

.kna-figure figcaption { color: var(--nw-muted); }

/* ---------- Галерея: сітка з тією ж логікою широких плиток ---------- */

.kna-gal {
  max-width: 1040px;
  margin: clamp(88px, 9vw, 120px) auto 0;
}

.kna-gal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.kna-gal-head h2,
.kna-more-title {
  margin: 0;
  font: 900 clamp(38px, 3.4vw, 48px) / 0.95 var(--kr-font-display);
  text-transform: uppercase;
}

.kna-gal-head p {
  margin: 0;
  font: 600 15px/1.3 var(--kr-font-text);
  color: var(--nw-muted);
}

.kna-gal-grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--nw-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.kna-gal-grid > li[data-lg='wide'] { grid-column: span 2; }
.kna-gal-grid > li[data-lg='full'] { grid-column: 1 / -1; }

.kna-gal-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #3a2a26;
  cursor: zoom-in;
}

.kna-gal-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: scale 0.8s var(--nw-ease);
}

/* широка — два кадри 4:3 і проміжок, як плитка списку */
li[data-lg='wide'] .kna-gal-btn { position: relative; }
li[data-lg='wide'] .kna-gal-btn::before { content: ''; display: block; padding-top: calc((100% - var(--nw-gap)) * 3 / 8); }
li[data-lg='wide'] .kna-gal-btn img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
li[data-lg='full'] .kna-gal-btn img { aspect-ratio: 16 / 6; }
.kna-gal-btn:hover img { scale: 1.03; }

.kna-gal-btn:focus-visible { outline: 2px solid var(--nw-fg); outline-offset: 3px; }

/* ---------- Перегляд на весь екран ---------- */

.kna-lb {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff8ec;
  background: #120809;
}

.kna-lb::backdrop { background: #120809; }

.kna-lb[open] {
  display: grid;
  grid-template-rows: auto 1fr;
}

.kna-lb-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--nw-pad);
}

.kna-lb-count {
  margin-right: auto;
  font: 900 24px/1 var(--kr-font-display);
}

.kna-lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #1d0f10;
  background: #fff8ec;
  cursor: pointer;
}

.kna-lb-btn svg { width: 22px; height: 22px; }

.kna-lb-btn:focus-visible { outline: 2px solid #ffd23f; outline-offset: 3px; }

.kna-lb-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 var(--nw-pad) 24px;
  touch-action: pan-y;
}

.kna-lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Поділитися ---------- */

.kna-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  max-width: 680px;
  margin: 72px auto 0;
  font: 600 17px/1.2 var(--kr-font-text);
  color: var(--nw-muted);
}

.kna-share-btn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--nw-fg);
  font: 700 17px/1.2 var(--kr-font-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.kna-share-btn:focus-visible { outline: 2px solid var(--nw-fg); outline-offset: 3px; }

.kna-share-status { color: var(--nw-fg); }

/* ---------- Інші новини ---------- */

.kna-more {
  max-width: 1440px;
  margin: clamp(120px, 12vw, 160px) auto 0;
  padding: 0 var(--nw-gutter) clamp(88px, 10vw, 160px);
}

.kna-more-title { padding-inline: calc(var(--nw-pad) - var(--nw-gutter)); margin-bottom: 32px; }

/* ============================== Планшет і телефон ============================== */

@media (max-width: 1023px) {
  :root { --nw-top: 64px; }

  .knw-grid,
  .kna-gal-grid { --cols: 2; }
  .knw-grid > li[data-lg],
  .kna-gal-grid > li[data-lg] { grid-column: auto; }
  .knw-grid > li[data-sm='wide'],
  .kna-gal-grid > li[data-sm='wide'] { grid-column: 1 / -1; }

  /* спершу скидаємо desktop-розміри, потім ставимо мобільні */
  li[data-lg] .knw-cover { aspect-ratio: 3 / 4; }
  li[data-lg] .knw-cover::before { content: none; }
  li[data-sm='wide'] .knw-cover { aspect-ratio: 4 / 3; }
  li[data-lg] .knw-render { --x: 50%; }
  li[data-sm='wide'] .knw-render--tube { --x: 36%; }
  li[data-sm='wide'] .knw-render--chips { --x: 64%; }

  li[data-lg] .knw-ptitle { max-width: none; font-size: 26px; }
  li[data-sm='wide'] .knw-ptitle { font-size: clamp(36px, 6vw, 48px); }
  li[data-lg] .knw-name { font-size: 22px; }
  li[data-sm='wide'] .knw-name { font-size: clamp(30px, 5vw, 40px); }

  li[data-lg] .kna-gal-btn::before { content: none; }
  li[data-lg] .kna-gal-btn img { position: static; aspect-ratio: 1; height: auto; }
  li[data-sm='wide'] .kna-gal-btn img { aspect-ratio: 4 / 3; }

  .kna-cover-img,
  .kna-cover-product { aspect-ratio: 4 / 3; }
  .kna-cover { margin-inline: calc(-1 * var(--nw-pad)); }
  .kna-caption { padding-inline: var(--nw-pad); }
  .kna-hero .knw-emb { top: 72px; right: -30%; height: 72%; }
}

@media (max-width: 599px) {
  .knw-head { margin-bottom: 28px; }
  .knw-poster { padding: 14px; }
  li[data-lg] .knw-ptitle { font-size: 24px; }
  li[data-sm='wide'] .knw-ptitle { font-size: 40px; }
  li[data-lg] .knw-pmeta { margin-top: 10px; font-size: 11px; }
  li[data-sm='wide'] .knw-pmeta { font-size: 13px; }
  .knw-cap { padding: 12px 4px 0; }
  li[data-lg] .knw-meta { font-size: 12px; }
  li[data-lg] .knw-name { margin-top: 6px; }
  li[data-sm='wide'] .knw-name { font-size: 34px; }

  /* крихти на телефоні — лише «← Новини та активності», як у концепті */
  .kna-crumbs li:last-child { display: none; }
  .kna-crumbs a { text-decoration: none; }
  .kna-crumbs a::before { content: '←'; margin-right: 8px; }

  .kna-text { font-size: 18px; line-height: 1.6; }
  .kna-figure { margin-inline: calc(-1 * var(--nw-pad)); }
  .kna-figure figcaption { padding-inline: var(--nw-pad); }
  .kna-gal { margin-inline: calc(-1 * var(--nw-pad) + var(--nw-gutter)); }
  .kna-gal-head { padding-inline: calc(var(--nw-pad) - var(--nw-gutter)); }
  .kna-share-btn { flex: 1 1 100%; min-height: 52px; border-radius: 999px; color: #ffd23f; background: #1d0f10; text-decoration: none; }
}

/* ---------- демо-перемикачі (як у каталозі) ---------- */

.demo-tweaks {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  display: grid;
  gap: 4px;
  max-width: min(380px, calc(100vw - 24px));
  padding: 6px;
  font: 600 13px/1 var(--kr-font-text);
  background: #1d0f10;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(255 248 236 / 0.2);
}

.demo-tweaks summary { padding: 6px 8px; color: #fff8ec; cursor: pointer; }
.demo-tweaks div { display: flex; flex-wrap: wrap; gap: 2px; }
.demo-tweaks a { padding: 8px 9px; color: #fff8ec; text-decoration: none; border-radius: 4px; white-space: nowrap; }
.demo-tweaks a[aria-current] { color: #1d0f10; background: #fff8ec; }

@media (max-width: 1023px) {
  .demo-tweaks { left: 8px; right: 8px; bottom: 8px; max-width: none; }
}
