/* Klyaksa theme for news_portal. Tokens + components ported from the Laravel Klyaksa build (public/css/site.css, catalog part left out). */
:root {
  --bg: #ffffff;
  --surface: #f5f5f6;
  --surface-2: #ececee;
  --line: #e4e4e7;
  --line-control: #8a8a92;
  --ink: #0b0b0c;
  --ink-2: #45454b;
  --muted: #6b6b73;
  --accent: #0b0b0c;
  --on-accent: #ffffff;
  --live: #c8281d;
  --success: #18763a;
  --lime: #c6ff00;
  --on-lime: #0b0b0c;
  --accent-ink: #3b6e00;
  --panel: #f4f4f5;
  --bar: #111312;
  --bar-ink: #e9ece6;
  --bar-muted: #9aa096;
  --shadow-pop: 0 8px 24px rgba(11,11,12,0.12), 0 1px 2px rgba(11,11,12,0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --page-max: 1200px;
  --measure: 680px;
  --col-side: 300px;
  --thumb-feed: 72px;
  --header-h: 56px;
  --font-sans: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --surface: #161618;
    --surface-2: #202023;
    --line: #26262a;
    --line-control: #6a6a72;
    --ink: #f2f2f3;
    --ink-2: #c5c5ca;
    --muted: #9b9ba3;
    --accent: #f2f2f0;
    --on-accent: #0b0b0c;
    --live: #ff7a6e;
    --success: #5cc77c;
    --lime: #c6ff00;
    --on-lime: #0b0b0c;
    --accent-ink: #c6ff00;
    --panel: #161618;
    --bar: #161618;
    --bar-ink: #ededed;
    --bar-muted: #85858b;
    --shadow-pop: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #161618;
  --surface-2: #202023;
  --line: #26262a;
  --line-control: #6a6a72;
  --ink: #f2f2f3;
  --ink-2: #c5c5ca;
  --muted: #9b9ba3;
  --accent: #f2f2f0;
  --on-accent: #0b0b0c;
  --live: #ff7a6e;
  --success: #5cc77c;
  --lime: #c6ff00;
  --on-lime: #0b0b0c;
  --accent-ink: #c6ff00;
  --panel: #161618;
  --bar: #161618;
  --bar-ink: #ededed;
  --bar-muted: #85858b;
  --shadow-pop: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  color-scheme: dark;
}

/* components.css */

/* Tedroid components. Colours, spacing and radii come from tokens.css; nothing here declares a value tokens.json owns. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-fast: 150ms;
}

.td-root, .td-root * { box-sizing: border-box; }
.td-root {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.td-root a { color: inherit; text-decoration: none; }
.td-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.td-meta { margin: 0; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-label { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }

/* Header. Phones: [menu] [logo] ........ [search] [theme] [sponsor]. Desktop: [logo] [sections] ... [search] [theme] [sponsor]. */
.td-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.td-header__inner { max-width: var(--page-max); margin: 0 auto; height: var(--header-h); padding: 0 var(--space-2) 0 var(--space-1); display: flex; align-items: center; gap: var(--space-1); }
.td-header__brand { display: flex; align-items: center; flex: none; padding: 0 var(--space-2); }
/* Logo (components/logo.blade.php, generated from public/img/brand): the lime square keeps its colours in both themes;
   the word is near-black on light grounds and lime on dark ones (klyaksa-loqo-reng.svg), switched by CSS so there is no flash. */
.td-logo { display: inline-flex; align-items: center; flex: none; line-height: 0; --logo-word: #0b0b0c; }
.td-logo svg { display: block; }
.td-logo__word { fill: var(--logo-word); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-logo { --logo-word: #C6FF00; } }
:root[data-theme="dark"] .td-logo { --logo-word: #C6FF00; }
.td-header__nav { display: none; gap: var(--space-5); flex: 1; min-width: 0; margin-left: var(--space-5); }
.td-header__nav a { position: relative; font-size: 15px; line-height: var(--header-h); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.td-header__nav a[aria-current="page"] { color: var(--ink); }
.td-header__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.td-header__actions { display: flex; align-items: center; gap: 0; flex: none; margin-left: auto; }
.td-header__sponsor { margin-left: var(--space-1); flex: none; }
.td-icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--radius-full); border: 0; background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; }
.td-icon-btn:active { transform: scale(.94); }
.td-icon-btn svg { width: 20px; height: 20px; }
.td-theme-icon--sun { display: none; }
[data-theme="dark"] .td-theme-icon--sun { display: block; }
[data-theme="dark"] .td-theme-icon--moon { display: none; }
@media (min-width: 1024px) {
  .td-header__inner { padding: 0 var(--space-4); gap: var(--space-2); }
  .td-header__brand { padding: 0; }
  .td-header__nav { display: flex; }
  .td-header__menu-btn { display: none; }
}

/* Search sheet: opens under the header on every page, live results while typing. */
.td-search-sheet { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 11; background: var(--bg);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms; }
.td-search-sheet[data-open] { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.td-search-sheet__inner { max-width: var(--measure); margin: 0 auto; padding: var(--space-4); }
.td-search-sheet form { display: flex; gap: var(--space-2); }
.td-search-sheet input { flex: 1; min-width: 0; height: 48px; padding: 0 var(--space-4); font: 400 17px/24px var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid transparent; border-radius: var(--radius-full); }
.td-search-sheet input:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--bg); }
.td-search-results { margin-top: var(--space-3); }
.td-search-results .td-feed-item:last-child { border-bottom: 0; }
.td-search-hint { padding: var(--space-3) 0; color: var(--muted); font-size: 14px; }
.td-search-all { display: block; margin-top: var(--space-2); padding: var(--space-3) 0; font-weight: 500; color: var(--accent); }
.td-backdrop { position: fixed; inset: 0; z-index: 8; background: rgba(0,0,0,.32); opacity: 0; visibility: hidden; transition: opacity 120ms ease, visibility 0s linear 120ms; }
.td-backdrop[data-open] { opacity: 1; visibility: visible; transition: opacity 200ms var(--ease-out); }

/* Mobile section menu: opens under the header. Enter 200ms ease-out, exit 120ms. */
.td-menu { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); bottom: 0; z-index: 9; background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3) var(--space-4) var(--space-7);
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms; }
.td-menu[data-open] { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.td-menu a:not(.td-social__btn) { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 24px; font-weight: 500; color: var(--ink); }
.td-menu a.td-menu__sub { padding-left: var(--space-4); font-size: 16px; font-weight: 500; color: var(--ink-2); }
.td-menu__pages { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.td-menu .td-menu__pages a { border: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
@media (min-width: 1024px) { .td-menu { display: none; } }

/* Feed */
.td-day { margin: var(--space-6) 0 var(--space-2); }
.td-day:first-child { margin-top: 0; }
.td-feed-item { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-feed-item__thumb { width: var(--thumb-feed); height: var(--thumb-feed); flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface); }
.td-feed-item__body { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.td-feed-item__title { font-size: 17px; line-height: 23px; font-weight: 500; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
.td-feed-item--article .td-feed-item__title { font-weight: 500; }
@media (min-width: 1024px) { .td-feed-item__thumb { width: 88px; height: 88px; } }

/* Günün seçilmişləri */
.td-picks { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); }
.td-picks__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-2); }
.td-picks ol { list-style: none; margin: 0; padding: 0; counter-reset: pick; }
.td-picks li { counter-increment: pick; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.td-picks li:first-child { border-top: 0; }
.td-picks li::before { content: counter(pick); font-size: 22px; line-height: 24px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.td-picks__title { font-size: 17px; line-height: 23px; font-weight: 500; overflow-wrap: anywhere; }
/* Phones: same five picks, titles only, so the feed starts on the first screen. */
@media (max-width: 1023px) {
  .td-picks { padding: var(--space-3) var(--space-4); }
  .td-picks li { grid-template-columns: 20px minmax(0, 1fr); padding: var(--space-2) 0; }
  .td-picks li::before { font-size: 17px; line-height: 22px; }
  .td-picks__title { font-size: 16px; line-height: 22px; }
  .td-picks .td-meta, .td-picks br { display: none; }
}

/* Məqalələr card */
.td-card { display: flex; flex-direction: column; gap: var(--space-2); }
.td-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); background: var(--surface); }
.td-card__title { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.td-card--compact .td-card__title { font-size: 18px; line-height: 24px; }

/* Article */
.td-article { max-width: var(--measure); margin: 0 auto; }
.td-crumbs { display: flex; gap: var(--space-2); }
.td-crumbs a { color: var(--muted); }
.td-article__title { margin: var(--space-3) 0; font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.015em; text-wrap: pretty; overflow-wrap: anywhere; }
@media (min-width: 768px) { .td-article__title { font-size: 40px; line-height: 44px; letter-spacing: -.02em; } }
.td-article__lead { margin: 0 0 var(--space-4); font-size: 20px; line-height: 30px; color: var(--ink-2); }
.td-article__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.td-prose { font-size: 17px; line-height: 28px; overflow-wrap: break-word; }
@media (min-width: 768px) { .td-prose { font-size: 18px; line-height: 30px; } }
.td-prose p { margin: 0 0 var(--space-4); }
.td-prose h2 { margin: var(--space-6) 0 var(--space-3); font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; }
.td-prose h3 { margin: var(--space-5) 0 var(--space-2); font-size: 18px; line-height: 24px; font-weight: 500; }
.td-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.td-prose ul, .td-prose ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.td-prose blockquote { margin: var(--space-5) 0; padding-left: var(--space-4); border-left: 2px solid var(--ink); }

/* Article blocks */
.td-media { margin: var(--space-5) 0; }
.td-media img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--surface); }
.td-media figcaption { margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.td-callout { margin: var(--space-5) 0; padding: var(--space-4); background: var(--surface); border-radius: var(--radius-md); font-weight: 500; }
.td-post-link { display: flex; gap: var(--space-3); align-items: center; margin: var(--space-5) 0; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); }
.td-post-link img { width: 96px; height: 64px; flex: none; object-fit: cover; border-radius: var(--radius-sm); }
.td-post-link__title { font-size: 16px; line-height: 22px; font-weight: 500; min-width: 0; }
.td-prose a.td-video__poster { text-decoration: none; }

/* YouTube: poster with a play button; the player (youtube-nocookie) replaces it on click. */
.td-video { margin: var(--space-5) 0; }
.td-video__poster, .td-video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.td-video .td-video__poster img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.td-video__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), transparent 40%); }
.td-video__play { position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: rgba(11, 11, 12, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; transition: transform .2s ease, background .2s ease; }
.td-video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.td-video__brand { position: absolute; z-index: 1; left: var(--space-3); bottom: var(--space-3); font-size: 12px; font-weight: 500; color: rgba(255,255,255,.9); }
.td-video__poster:hover .td-video__play, .td-video__poster:focus-visible .td-video__play { transform: scale(1.08); background: #0b0b0c; }
.td-video__poster:hover img { transform: scale(1.02); }
@media (max-width: 520px) { .td-video__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; } .td-video__play svg { width: 26px; height: 26px; } }
.td-video__brand { display: inline-flex; align-items: center; gap: 8px; }
.td-video__brand svg { width: 14px; height: 14px; }
/* TikTok, Reels and Shorts keep their phone shape instead of being letterboxed into 16:9. */
.td-video--vertical { width: min(100%, 360px); margin-inline: auto; }
.td-video--vertical .td-video__poster, .td-video--vertical iframe { aspect-ratio: 9 / 16; border-radius: var(--radius-lg); }
.td-video--instagram iframe { aspect-ratio: 9 / 17; background: #fff; }
.td-video__blank { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 80% at 50% 25%, #2a2a2f, #0b0b0c 70%); }
.td-video__blank svg { width: 30%; max-width: 120px; margin-top: -45%; opacity: .1; }

/* Gallery: one photo at a time, never cropped. Swipe or scroll natively; arrows, counter and thumbnails on top. */
.td-gallery { margin: var(--space-5) 0; }
.td-gallery__stage { position: relative; }
.td-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  border-radius: var(--radius-md); background: var(--surface); outline: none; }
.td-gallery__track::-webkit-scrollbar { display: none; }
.td-gallery__track:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.td-gallery__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; scroll-snap-align: center; scroll-snap-stop: always; }
.td-gallery .td-gallery__slide img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; cursor: zoom-in; }
.td-gallery__nav, .td-gallery__expand { position: absolute; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: #0b0b0c; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); cursor: pointer; opacity: 0; transition: opacity .2s ease; }
.td-gallery__nav svg, .td-gallery__expand svg { width: 20px; height: 20px; }
.td-gallery__expand { top: var(--space-3); right: var(--space-3); width: 36px; height: 36px; }
.td-gallery__expand svg { width: 16px; height: 16px; }
.td-gallery__nav--prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.td-gallery__nav--next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.td-gallery__stage:hover .td-gallery__nav, .td-gallery__stage:hover .td-gallery__expand, .td-gallery__nav:focus-visible, .td-gallery__expand:focus-visible { opacity: 1; }
.td-gallery .td-gallery__nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .td-gallery__nav { display: none; } .td-gallery__expand { opacity: 1; } }
.td-gallery__bar { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.td-gallery__count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-gallery__thumbs { display: flex; gap: var(--space-2); margin-top: var(--space-3); padding: 2px; overflow-x: auto; scrollbar-width: none; }
.td-gallery__thumbs::-webkit-scrollbar { display: none; }
.td-gallery__thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); opacity: .5; cursor: pointer; transition: opacity .2s ease, box-shadow .2s ease; }
.td-gallery .td-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.td-gallery__thumb:hover { opacity: .85; }
.td-gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }

/* Full-screen gallery */
.td-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.td-lightbox::backdrop { background: #000; }
.td-lightbox__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.td-lightbox__track::-webkit-scrollbar { display: none; }
.td-lightbox__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; height: 100%; padding: 64px var(--space-4); box-sizing: border-box; scroll-snap-align: center; scroll-snap-stop: always; }
.td-lightbox__slide img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.td-lightbox__top { position: absolute; z-index: 1; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4);
  font: 500 14px/20px var(--font-sans); color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.td-lightbox__caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: var(--space-3) var(--space-4) var(--space-4); font: 400 14px/20px var(--font-sans); color: rgba(255,255,255,.85); text-align: center; }
.td-lightbox__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.td-lightbox__btn:hover { background: rgba(255,255,255,.22); }
.td-lightbox__btn svg { width: 22px; height: 22px; }
.td-lightbox__nav { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); }
.td-lightbox__nav--prev { left: var(--space-4); }
.td-lightbox__nav--next { right: var(--space-4); }
.td-lightbox__nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .td-lightbox__nav { display: none; } }

.td-sources { margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--muted); }
.td-sources a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* Badges and chips */
.td-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  font-size: 12px; line-height: 16px; font-weight: 500; background: var(--surface); color: var(--muted); }
.td-badge--live { color: var(--live); }
.td-badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.td-badge--updated { background: transparent; padding: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }
.td-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--line-control);
  font-size: 14px; font-weight: 500; color: var(--ink); background: var(--bg); transition: background-color var(--dur-fast) ease; }
/* Selected chip (the section you are on): filled ink, like a pressed button; hover does not change it. */
.td-chips .td-chip[aria-current="page"], .td-chips .td-chip[aria-current="page"]:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Buttons */
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-md);
  font: 500 15px/20px var(--font-sans); cursor: pointer; border: 1px solid var(--line-control); background: var(--bg); color: var(--ink);
  transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; user-select: none; }
.td-btn:active { transform: scale(.97); }
.td-btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.td-btn--block { width: 100%; }

/* Ads */
.td-sponsor { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-sponsor__brand { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.td-sponsor__brand img { height: 18px; width: auto; }
.td-native { display: flex; gap: var(--space-3); padding: var(--space-3); margin: var(--space-3) 0; border: 1px solid var(--line); border-radius: var(--radius-md); }
.td-native img { width: 120px; height: 80px; flex: none; object-fit: cover; border-radius: var(--radius-sm); }
.td-native__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.td-ad-slot { display: grid; place-items: center; background: var(--surface); border-radius: var(--radius-md); color: var(--muted); }
.td-ad-slot--sidebar { width: var(--col-side); height: 600px; max-width: 100%; }
.td-ad-slot--inline { width: 100%; aspect-ratio: 16 / 5; margin: var(--space-5) 0; }

/* Hover lives behind a fine pointer so touch screens never get stuck hover states. */
@media (hover: hover) and (pointer: fine) {
  .td-header__nav a:hover, .td-menu a:hover { color: var(--ink); }
  .td-icon-btn:hover { background: var(--surface-2); }
  .td-feed-item:hover .td-feed-item__title, .td-picks li:hover .td-picks__title, .td-card:hover .td-card__title, .td-post-link:hover .td-post-link__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .td-chip:hover, .td-btn:hover { background: var(--surface-2); }
  .td-btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
}
@media (prefers-reduced-motion: reduce) {
  .td-btn, .td-icon-btn, .td-chip, .td-menu, .td-menu[data-open], .td-search-sheet, .td-search-sheet[data-open], .td-backdrop { transition: none; transform: none; }
  .td-btn:active, .td-icon-btn:active { transform: none; }
}

/* Sponsor mark in a section head (feed, video, "latest" under an article, the video page): one quiet inline row,
   "Реклама" in small muted type and then the advertiser's logo (or name), on the head's own line with no box of its
   own. The row is 24 px tall and everything in it is centred, so its centre equals the head title's; the logo is
   16 px, about the cap height of a 16 px title. Placement in the head is set by the head (klyaksa.css). */
/* On a very narrow phone (320 px, Kazakh "Жаңалықтар" + "Жарнама" + "Лента") the row would push the head's link past
   the edge; the logo box then gives way (the logo scales down inside it) instead of the page scrolling sideways. */
.td-sponsor-mark { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: var(--space-2); height: 24px; color: var(--ink); text-decoration: none;
  line-height: 1; transition: opacity var(--dur-fast) ease; }
@media (hover: hover) { .td-sponsor-mark:hover { opacity: .72; } }
.td-sponsor-mark__label { flex: none; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.td-sponsor-mark__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.td-sponsor-mark img { display: block; flex: 0 1 auto; min-width: 0; height: 16px; width: auto; max-width: 96px; object-fit: contain; }
/* Advertisers send logos for a white page; in the dark theme they sit on a small white chip (as in the header ticker). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-sponsor-mark img { padding: 2px 6px; border-radius: 8px; background: #fff; box-sizing: content-box; } }
:root[data-theme="dark"] .td-sponsor-mark img { padding: 2px 6px; border-radius: 8px; background: #fff; box-sizing: content-box; }

/* Section header with an optional sponsor, the iXBT pattern */
.td-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.td-section-head h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 500; }

/* Native card mark when the advertiser sent no image */
.td-native__mark { width: 120px; height: 80px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 500; }

/* Banner creative. `a.` raises specificity over `.td-root a { color: inherit }`. */
a.td-creative, .td-creative { container-type: inline-size; position: relative; display: flex; overflow: hidden; border-radius: var(--radius-md); background: var(--creative-bg, var(--creative-ground, #0b0b0c)); box-shadow: inset 0 0 0 1px var(--creative-edge, transparent); color: #ffffff; }
.td-creative__label { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.7); }
.td-creative__copy { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2); padding: var(--space-5); }
.td-creative__eyebrow { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8); }
/* The title is sized to its slot (160 px rail … wide inline), never broken mid-word: Kazakh has no hyphenation
   dictionary in browsers, so "Жарнамаңыз" must fit whole. */
.td-creative__title { font-size: clamp(18px, 10cqi, 34px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em;
  overflow-wrap: normal; hyphens: manual; text-wrap: balance; }
.td-creative__text { font-size: 16px; line-height: 22px; color: rgba(255,255,255,.85); max-width: 32ch; }
.td-creative__cta { align-self: flex-start; margin-top: var(--space-2); padding: var(--space-2) var(--space-4); border-radius: 8px; background: var(--lime, #c6ff00); color: var(--on-lime, #0b0b0c); font-size: 14px; font-weight: 500; }
/* Sidebar 300x600: the visual takes all the height the copy leaves (fitted, centred), the copy sits right under it,
   so the slot has no dead band between picture and text. */
.td-creative--sidebar { flex-direction: column; justify-content: flex-start; width: var(--col-side); max-width: 100%; height: 600px; }
.td-creative--sidebar .td-creative__visual { flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; max-height: 440px; object-fit: contain; object-position: center !important; }
.td-creative--sidebar .td-creative__copy { flex: none; justify-content: flex-start; gap: var(--space-2); }
.td-creative--sidebar:not(.td-creative--has-media) { justify-content: flex-end; }
/* Inline: copy left, visual right. */
/* Rail beside an article: 160×600, 300×600 from 1400px. Visual fitted on the ink ground, copy below. */
.td-creative--rail { flex-direction: column; justify-content: center; width: 160px; height: 600px; }
.td-creative--rail .td-creative__visual { width: 100%; height: auto; max-height: 360px; object-fit: contain; object-position: top center !important; }
.td-creative--rail .td-creative__copy { padding: var(--space-4); gap: var(--space-1); }
.td-creative--rail .td-creative__eyebrow { font-size: 12px; }
.td-creative--rail .td-creative__text { font-size: 13px; line-height: 18px; }
.td-creative--rail .td-creative__cta { padding: 6px 12px; font-size: 13px; }
.td-creative--rail .td-creative__label { top: var(--space-2); right: var(--space-2); }
@media (min-width: 1400px) {
  .td-creative--rail { width: 300px; }
  .td-creative--rail .td-creative__visual { max-height: 400px; }
  .td-creative--rail .td-creative__copy { padding: var(--space-5); gap: var(--space-2); }
  .td-creative--rail .td-creative__text { font-size: 15px; line-height: 21px; }
}

/* Inline (at least 680×213 in articles; the home and section billboards ask for 300): the copy sets the height,
   the visual fills the right 42% of whatever that is, so a two-line title never pushes the button out. */
.td-creative--inline { width: 100%; min-height: 213px; margin: var(--space-5) 0; }
.td-creative--inline .td-creative__copy { width: 100%; justify-content: center; }
.td-creative--inline.td-creative--has-media .td-creative__copy { width: 58%; }
.td-creative--inline .td-creative__visual { position: absolute; top: 0; right: 0; width: 42%; height: 100%; object-fit: cover; }
.td-creative--inline .td-creative__title { font-size: 28px; line-height: 32px; }
@media (max-width: 520px) {
  .td-creative--inline { flex-direction: column; }
  .td-creative--inline.td-creative--has-media .td-creative__copy { width: 100%; }
  .td-creative--inline .td-creative__visual { position: static; order: 2; width: 100%; height: 200px; }
}
/* Banners inside article text must not inherit prose link styling. */
.td-prose a.td-creative, .td-prose a.td-creative * { color: #ffffff; text-decoration: none; }
.td-prose a.td-creative .td-creative__cta { color: #0b0b0c; }
.td-prose a.td-creative .td-creative__text, .td-prose a.td-creative .td-creative__eyebrow { color: rgba(255,255,255,.85); }

/* Light creative (creative.tone = "light"): the brand's light ground (creative.bg, else a light grey) with ink copy and an
   ink button, for advertisers whose pictures are shot on white (HONOR). A thin edge keeps it apart from the page
   in the light theme; it stays light in the dark theme because it is the advertiser's own colour. */
a.td-creative--light, .td-creative--light { background: var(--creative-bg, #f4f4f5); color: #0b0b0c; box-shadow: inset 0 0 0 1px rgba(11,11,12,.08); }
.td-creative--light .td-creative__label { padding: 2px 6px; border-radius: 8px; background: rgba(255,255,255,.85); color: rgba(11,11,12,.7); }
.td-creative--light .td-creative__eyebrow { color: rgba(11,11,12,.7); }
.td-creative--light .td-creative__text { color: rgba(11,11,12,.78); }
.td-creative--light .td-creative__cta { background: #0b0b0c; color: #ffffff; }
.td-prose a.td-creative--light, .td-prose a.td-creative--light * { color: #0b0b0c; }
.td-prose a.td-creative--light .td-creative__text, .td-prose a.td-creative--light .td-creative__eyebrow { color: rgba(11,11,12,.75); }
.td-prose a.td-creative--light .td-creative__cta { color: #ffffff; }

/* Social: follow links and share row. Round 36px buttons on `surface`, icons in `ink`. */
.td-social, .td-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.td-social__btn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radius-full); border: 0; background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background-color var(--dur-fast) ease, transform 120ms var(--ease-out); touch-action: manipulation; }
.td-social__btn:active { transform: scale(.94); }
.td-social__btn svg { width: 16px; height: 16px; }
.td-share-row .td-label { margin-right: var(--space-1); }
.td-share-native { display: none; }
.td-has-native-share .td-share-native { display: grid; }
@media (hover: hover) and (pointer: fine) { .td-social__btn:hover { background: var(--surface-2); } }


/* site.css */
/* Page layout for the public site. Component styles live in components.css (from the Design System). */
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
strong, b { font-weight: 500; } /* Onest loads 400/500 only (design rule) */
:root { --creative-ground: #0b0b0c; --creative-edge: transparent; }
/* Dark theme: the page is #0b0b0c too, so ad creatives get a raised ground and a hairline to keep their edges. */
/* The panels are #161618 in dark, so the ground steps up once more (surface-2) and keeps a hairline: the 300×600 slot
   never reads as a hole in its panel. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --creative-ground: var(--surface-2); --creative-edge: var(--line); } }
:root[data-theme="dark"] { --creative-ground: var(--surface-2); --creative-edge: var(--line); }
.td-skip { position: absolute; left: -9999px; }
.td-skip:focus { left: var(--space-4); top: var(--space-2); z-index: 20; background: var(--bg); padding: var(--space-2) var(--space-3); }

.td-wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-4); }
.td-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-5) var(--space-7); }
.td-home__side, .td-home__ads { display: none; }
.td-home__main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.td-section-title { margin: 0 0 var(--space-2); }

.td-tabs { display: flex; gap: var(--space-2); }
.td-tabs a { flex: 1; text-align: center; height: 40px; line-height: 40px; border-radius: var(--radius-md); background: var(--surface); font: 500 15px/40px var(--font-sans); color: var(--ink-2); }
.td-tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.td-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.td-more-row { margin-top: var(--space-5); }

.td-page-title { margin: var(--space-5) 0 var(--space-2); font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.015em; }
.td-article-page { padding-block: var(--space-6) var(--space-7); }
.td-article .td-media:first-of-type { margin-top: var(--space-5); }
.td-hero { margin: var(--space-5) 0 0; }
.td-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); background: var(--surface); }
.td-prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 var(--space-4); }
.td-prose td, .td-prose th { border: 1px solid var(--line); padding: var(--space-2) var(--space-3); }
.td-prose img { max-width: 100%; height: auto; }
.td-prose details { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-3); }
.td-prose summary { font-weight: 500; cursor: pointer; }
.td-embed-link { margin: var(--space-5) 0; }
.td-embed-link a { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; font-weight: 500; }
.td-embed-video-file video { width: 100%; border-radius: var(--radius-md); }

.td-footer { border-top: 1px solid var(--line); padding-block: var(--space-6) var(--space-7); margin-top: var(--space-7); }
.td-footer__grid { display: grid; gap: var(--space-5); }
.td-footer__brand { justify-self: start; }
.td-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 15px; font-weight: 500; }
.td-footer__links a { color: var(--ink-2); }
.td-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.td-footer__legal a { color: var(--muted); margin-right: var(--space-4); }
.td-related { max-width: var(--measure); margin: var(--space-7) auto 0; }
.td-related__grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .td-related__grid { grid-template-columns: 1fr 1fr; } }
.td-subcats { margin-top: var(--space-3); }
.td-search { display: flex; gap: var(--space-2); margin: var(--space-3) 0 var(--space-5); }
.td-search input { flex: 1; min-width: 0; height: 44px; padding: 0 var(--space-3); font: 400 16px/20px var(--font-sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-control); border-radius: var(--radius-md); }
.td-empty { padding: var(--space-6) 0; color: var(--ink-2); }

/* Article rails: the page widens so a banner fits each side of the 680px column. */
.td-rail { display: none; }
@media (min-width: 1120px) {
  .td-article-page { max-width: 1440px; }
  .td-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--space-6); align-items: start; }
  .td-article-layout .td-article { width: 100%; }
  .td-rail { display: flex; position: sticky; top: calc(var(--header-h) + var(--space-5)); }
  .td-rail--left { justify-content: flex-end; }
  .td-rail--right { justify-content: flex-start; }
}

/* Listing with a right banner column (search). The banner shows from 1024px, as the home page's side columns. */
.cl-with-side { display: block; }
.cl-with-side__main { min-width: 0; }
.cl-side { display: none; }
@media (min-width: 1024px) {
  .cl-with-side { display: grid; grid-template-columns: minmax(0, 1fr) var(--col-side); column-gap: var(--space-6); align-items: start; }
  .cl-side { display: flex; flex-direction: column; gap: var(--space-5); position: sticky; top: calc(var(--header-h) + var(--space-5)); }
  .cl-with-side .cl-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .cl-with-side .cl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Desktop: three columns. Kept last so it overrides the phone-first rules above. */
@media (min-width: 1024px) {
  .td-home { grid-template-columns: var(--col-side) minmax(0, 1fr) var(--col-side); }
  /* The feed is the page's main column: a hairline card makes that readable at a glance. */
  .td-home__main { padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
  .td-home__side { display: flex; flex-direction: column; gap: var(--space-5); }
  .td-home__ads { display: flex; flex-direction: column; gap: var(--space-6); }
  .td-home--two { grid-template-columns: minmax(0, 1fr) var(--col-side); }
  .td-home--two .td-home__side { display: none; }
  .td-tabs { display: none; }
}

.td-article__share { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.td-article__share--end { margin-top: var(--space-6); border-top: 1px solid var(--line); }
.td-article__meta { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--space-2); }
.td-article__meta a { color: var(--ink-2); }

/* Static pages */
.td-page-body h2 { margin-top: var(--space-6); }
.td-page-body .td-social { margin: var(--space-3) 0 var(--space-5); }
.td-embed-map { position: relative; margin: var(--space-4) 0; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.td-embed-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Forms */
.td-contact { margin: var(--space-4) 0 var(--space-6); }
.td-form { display: grid; gap: var(--space-4); }
.td-field { display: grid; gap: var(--space-1); }
.td-field label { font-size: 15px; font-weight: 500; }
.td-field input, .td-field textarea { width: 100%; padding: var(--space-3); font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-control); border-radius: var(--radius-md); }
.td-field textarea { resize: vertical; }
.td-field__error { margin: 0; font-size: 14px; color: var(--live); }
.td-form .td-btn { justify-self: start; }
.td-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cookie notice */
.td-cookie { position: fixed; left: var(--space-4); right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); z-index: 12;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 20px; }
.td-cookie p { margin: 0; color: var(--ink-2); }
.td-cookie a { color: var(--accent); text-decoration: underline; }
.td-cookie .td-btn { height: 36px; padding: 0 var(--space-4); flex: none; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* the browser's blue × is outside the palette */


/* klyaksa.css */
/* klyaksa.news. cl- classes come from carlife.az (cards, archive grids, article, video); k- classes are the
   iXBT-style layout from the approved draft (arastirma/taslak/ana-sayfa.html): category bar, three panels, timed feed. */
:root { --page-max: 1440px; --cl-gap: 20px; --cl-scrim: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.28) 58%, rgba(0,0,0,.82) 100%); }

/* ---- section rhythm ---- */
.cl-block { display: flex; flex-direction: column; gap: var(--space-4); padding-block: var(--space-6) 0; }
.cl-head { display: flex; align-items: center; gap: var(--space-3); min-height: 32px; }
.cl-head h2 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -.02em; }
.cl-more { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.cl-more::after { content: "→"; transition: transform .2s ease; }
/* A sponsor mark in a section head stands on the right, before the head's own link (shared with .k-panel__head). */
.cl-head .td-sponsor-mark, .k-panel__head .td-sponsor-mark { margin-left: auto; }
.cl-head .td-sponsor-mark + .cl-more, .k-panel__head .td-sponsor-mark + .k-panel__link { margin-left: var(--space-4); }
/* Narrow phones (under 375 px): tighter spacing so the logo keeps its size before it has to give way (components.css). */
@media (max-width: 374px) {
  .cl-head:has(.td-sponsor-mark), .k-panel__head:has(.td-sponsor-mark) { gap: var(--space-2); }
  .cl-head .td-sponsor-mark + .cl-more, .k-panel__head .td-sponsor-mark + .k-panel__link { margin-left: var(--space-3); }
}

/* ---- grids ---- */
.cl-grid { display: grid; gap: var(--cl-gap); }
.cl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- card ---- */
.cl-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; color: var(--ink); text-decoration: none; }
.cl-card__media { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--radius-md); background: var(--surface); }
.cl-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.cl-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cl-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.cl-eyebrow > span:first-child { color: var(--ink); }
.cl-eyebrow time { font-weight: 500; font-variant-numeric: tabular-nums; }
.cl-card__title { font-size: 17px; line-height: 23px; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }
.cl-card__lead { font-size: 15px; line-height: 22px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-card__play { position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(11, 11, 12, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.cl-card__play svg { width: 18px; height: 18px; margin-left: 2px; }


/* Overlay card: the title sits on the photo. Text is always white on a dark scrim, in both themes. */
.cl-card--overlay { gap: 0; }
.cl-card--overlay .cl-card__media { aspect-ratio: auto; height: 100%; min-height: 220px; border-radius: var(--radius-lg); }
.cl-card--overlay .cl-card__media::after { content: ""; position: absolute; inset: 0; background: var(--cl-scrim); }
.cl-card--overlay .cl-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: var(--space-4) var(--space-4) var(--space-4); color: #fff; }
.cl-card--overlay .cl-eyebrow, .cl-card--overlay .cl-eyebrow > span:first-child { color: rgba(255, 255, 255, .86); }
.cl-card--overlay .cl-card__lead { color: rgba(255, 255, 255, .82); }
.cl-card--overlay .cl-card__play { left: auto; right: 14px; top: 14px; bottom: auto; }


@media (hover: hover) and (pointer: fine) {
  .cl-card:hover .cl-card__media img { transform: scale(1.035); }
  .cl-card:hover .cl-card__title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
  .cl-card--overlay:hover .cl-card__title { text-decoration-color: rgba(255, 255, 255, .7); }
  .cl-more:hover { color: var(--ink); }
  .cl-more:hover::after { transform: translateX(3px); }
}


.cl-card--reel { scroll-snap-align: start; }
.cl-card--reel .cl-card__media { aspect-ratio: 9 / 16; min-height: 0; height: auto; }
.cl-card--reel .cl-card__title { font-size: 15px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cl-card--reel .cl-card__play { left: 14px; right: auto; top: 14px; }


/* ---- article page: header at reading width, then the photo wide ---- */
.cl-article-head { padding-bottom: 0; }
.cl-article-head .td-article__share { border-bottom: 0; padding-bottom: 0; }
.cl-hero { max-width: 1200px; margin: var(--space-5) auto var(--space-6); }
.cl-hero > img { display: block; width: 100%; height: auto; max-height: 76vh; object-fit: cover; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); background: var(--surface); }
.cl-hero figcaption { margin-top: var(--space-2); font-size: 13px; color: var(--muted); }
.cl-after { max-width: 1200px; margin-inline: auto; padding-top: var(--space-7); }
@media (max-width: 640px) { .cl-hero { margin-inline: calc(-1 * var(--space-4)); } .cl-hero > img, .cl-hero--video > .td-video .td-video__poster, .cl-hero--video > .td-video iframe { border-radius: 0; } }

/* ---- category and "all stories" pages ---- */
.cl-page-head { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-6); }
.cl-page-head h1 { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.cl-page-head p { margin: 0; max-width: 62ch; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.cl-page-lead { padding-top: var(--space-5); }
.cl-page-lead .cl-card--overlay .cl-card__media { height: clamp(320px, 38vw, 520px); }
.cl-page-lead .cl-card__body { padding: var(--space-6); max-width: 820px; }
.cl-page-lead .cl-card__title { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; }
.cl-pager { display: flex; justify-content: center; padding-top: var(--space-7); }

/* Archive grids: day headings and a banner row span the whole grid. */
.cl-grid__day { grid-column: 1 / -1; margin: var(--space-4) 0 calc(-1 * var(--space-2)); padding-top: var(--space-3); border-top: 1px solid var(--line);
  font: 500 13px/1 var(--font-sans); color: var(--muted); }
.cl-grid__day:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.cl-grid__ad { grid-column: 1 / -1; }
.cl-grid__ad .td-creative { width: 100%; }
.cl-grid__ad .td-creative--inline { min-height: 300px; margin: 0; }
.cl-grid__ad .td-creative--inline .td-creative__copy { padding: var(--space-6); }
.cl-grid__ad .td-creative--inline .td-creative__title { font-size: 34px; line-height: 38px; }

.cl-cinema .td-sponsor-mark { color: #fff; }
.cl-cinema .td-sponsor-mark__label { color: #a1a1a6; }
/* The cinema is dark in both themes, so the logo always gets its white chip here. */
.cl-cinema .td-sponsor-mark img { padding: 2px 6px; border-radius: 8px; background: #fff; box-sizing: content-box; }
.cl-cinema__sponsor { margin-top: var(--space-3); }

/* Video page: a dark "cinema" under the light header, phone-shaped tiles, follow buttons for the platforms. */
.cl-cinema { background: #0b0b0c; color: #f5f5f7; padding: var(--space-6) 0 var(--space-8); --muted: #a1a1a6; }
.cl-cinema__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding-bottom: var(--space-5); }
.cl-cinema__head h1 { margin: 0; font: 500 44px/1.05 var(--font-sans); letter-spacing: -.03em; color: #fff; }
.cl-cinema__head p { margin: var(--space-2) 0 0; max-width: 56ch; color: #a1a1a6; font-size: 16px; line-height: 24px; }
.cl-cinema__empty { color: #a1a1a6; }
.cl-follow { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cl-follow__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font: 500 14px/1 var(--font-sans); text-decoration: none; transition: background .2s ease; }
.cl-follow__btn svg { width: 16px; height: 16px; }
.cl-follow__btn:hover { background: rgba(255,255,255,.18); }
.cl-follow__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cl-reels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
/* «Ещё видео» under a video story: the six nearest videos in one row on wide screens. */
@media (min-width: 1100px) { .cl-reels--rail { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cl-cinema .cl-card--overlay { color: #fff; }
.cl-cinema .cl-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.cl-cinema .td-btn { background: #fff; color: #0b0b0c; }

/* Post page: a phone-shaped video stands on a stage lit by its own blurred cover. */
.cl-hero--video .td-video { margin: 0; }
.cl-hero--video > .td-video--vertical { margin-inline: auto; }
.cl-hero--video > .td-video:not(.td-video--vertical) .td-video__poster, .cl-hero--video > .td-video:not(.td-video--vertical) iframe { border-radius: var(--radius-lg); }
.cl-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: clamp(16px, 3vw, 36px) var(--space-4) var(--space-4); border-radius: var(--radius-lg); overflow: hidden; background: #0b0b0c; }
.cl-stage__glow { position: absolute; inset: -60px; z-index: -1; background-size: cover; background-position: center; filter: blur(48px) saturate(1.3) brightness(.5); }
.cl-stage .td-video--vertical { width: min(100%, 380px); }
.cl-stage .td-video--vertical .td-video__poster, .cl-stage .td-video--vertical iframe { box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.cl-stage .cl-stage__open { font: 500 13px/1 var(--font-sans); color: rgba(255,255,255,.75); text-decoration: none; }
.cl-stage .cl-stage__open:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* In-page viewer: player in the middle, story beside it (below it on phones), ↑/↓ to the next video. */
.cl-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,8,9,.96); color: #fff; overflow: hidden; }
.cl-viewer::backdrop { background: rgba(0,0,0,.6); }
.cl-viewer[open] { display: flex; align-items: center; justify-content: center; gap: var(--space-6); }
.cl-viewer__frame { flex: none; width: min(1100px, calc(100vw - 480px)); aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000 center / cover no-repeat; }
.cl-viewer__frame.is-vertical { width: auto; height: calc(100dvh - 48px); max-width: calc(100vw - 32px); aspect-ratio: 9 / 16; }
.cl-viewer__frame.is-instagram { background-color: #fff; }
.cl-viewer__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.cl-viewer__info { flex: 0 1 300px; align-self: flex-end; padding-bottom: var(--space-6); }
.cl-viewer__meta { margin: 0 0 var(--space-2); font: 500 13px/1 var(--font-sans); color: #a1a1a6; }
.cl-viewer__title { margin: 0; font: 500 22px/28px var(--font-sans); letter-spacing: -.015em; text-wrap: balance; }
.cl-viewer__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.cl-viewer__links a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; font: 500 14px/1 var(--font-sans); text-decoration: none; }
.cl-viewer .cl-viewer__read { background: #fff; color: #0b0b0c; }
.cl-viewer .cl-viewer__open { background: rgba(255,255,255,.12); color: #fff; }
.cl-viewer__controls { position: absolute; top: var(--space-4); right: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; justify-content: space-between; align-items: center; pointer-events: none; }
.cl-viewer__steps { display: flex; flex-direction: column; gap: var(--space-2); margin-block: auto; }
.cl-viewer__btn { pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s ease, opacity .2s ease; }
.cl-viewer__btn svg { width: 22px; height: 22px; }
.cl-viewer__btn:hover { background: rgba(255,255,255,.22); }
.cl-viewer__btn:disabled { opacity: .3; cursor: default; }
.cl-viewer__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 1023px) {
  .cl-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-reels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cl-viewer[open] { flex-direction: column; justify-content: flex-start; gap: 0; }
  .cl-viewer__frame, .cl-viewer__frame.is-vertical { width: 100vw; height: auto; max-width: none; flex: 1 1 auto; min-height: 0; border-radius: 0; aspect-ratio: auto; }
  .cl-viewer__frame:not(.is-vertical) { flex: none; aspect-ratio: 16 / 9; margin-top: auto; }
  .cl-viewer__info { flex: none; align-self: stretch; padding: var(--space-4) 72px var(--space-5) var(--space-4); }
  .cl-viewer__title { font-size: 18px; line-height: 24px; }
}
@media (max-width: 640px) {
  :root { --cl-gap: 24px; }
  .cl-head h2 { font-size: 21px; }
  /* Seven round buttons fit a 375px phone once the word label steps aside;
     the first button is the share glyph itself. */
  .cl-article-head .td-share-row .td-label { display: none; }
  .cl-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cl-cinema { padding-top: var(--space-5); }
  .cl-cinema__head h1 { font-size: 34px; }
  .cl-stage { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .cl-card__media img, .cl-more::after { transition: none; } }

/* Footer: the logo with its maker line under it. */
.cl-footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }

/* ---- language switch and post flags (foundation; restyled later) ---- */
.td-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.td-lang:hover { color: var(--ink); background: var(--surface-2, rgba(127,127,127,.12)); }
.td-flag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 8px; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--on-flag, #fff); background: var(--flag, #dc2626); }

/* ===== iXBT-style layout (approved draft, arastirma/taslak/ana-sayfa.html) ===== */
.k-mono { font-family: var(--font-sans); font-variant-numeric: tabular-nums; } /* one family: Onest with tabular figures */

/* Category bar under the header: ink strip, lime underline on the active item. */
.k-cats { background: var(--bar); }
.k-cats__in { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-4); height: 44px; display: flex; align-items: center; gap: 28px;
  overflow-x: auto; scrollbar-width: none; font-size: 15px; font-weight: 500; }
.k-cats__in::-webkit-scrollbar { display: none; }
.k-cats a { position: relative; height: 44px; display: flex; align-items: center; white-space: nowrap; color: var(--bar-muted); text-decoration: none; transition: color .15s ease; }
.k-cats a:hover, .k-cats a[aria-current="page"] { color: var(--bar-ink); }
.k-cats a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--lime); }
.k-cats a:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }

/* Three panels: left 300 | feed | 320. DOM order is feed, left column, right column (so phones read the news first). */
.k-layout { max-width: var(--page-max); margin: 12px auto 48px; padding: 0 var(--space-4); display: grid; gap: 12px; align-items: start;
  grid-template-columns: 300px minmax(0, 1fr) 320px; grid-template-areas: "left feed right"; }
.k-feed { grid-area: feed; }
.k-col-left { grid-area: left; }
.k-col-right { grid-area: right; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.k-panel { background: var(--panel); border-radius: 16px; padding: 4px 16px 16px; min-width: 0; }
.k-panel__head { min-height: 48px; display: flex; align-items: center; gap: var(--space-3); }
.k-panel__head h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 500; }
.k-panel__link { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.k-panel__link:hover { color: var(--ink); }
.k-dot { width: 9px; height: 9px; background: var(--accent-ink); border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; display: inline-block; }
.k-meta { margin: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.k-ph { display: block; overflow: hidden; background: var(--surface-2); border-radius: 8px; aspect-ratio: 16 / 10; }
.k-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-flag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 8px; font-size: 12px; line-height: 18px; font-weight: 500; vertical-align: 1px;
  background: var(--flag, var(--lime)); color: var(--on-flag, var(--on-lime)); }

/* Left: articles with a photo, category · N мин, title. */
.k-acard { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 16px; color: var(--ink); text-decoration: none; }
.k-acard + .k-acard { border-top: 1px solid var(--line); padding-top: 16px; }
.k-acard .k-ph { border-radius: 12px; margin-bottom: 6px; }
.k-acard__title { font-size: 15px; line-height: 21px; font-weight: 500; text-wrap: pretty; }

/* Centre: the timed feed. */
.k-day { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; font-size: 13px; color: var(--muted); }
.k-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.k-lead { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.k-lead--noimg { grid-template-columns: minmax(0, 1fr); }
.k-lead__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-lead__title { font-size: 18px; line-height: 25px; font-weight: 500; text-wrap: pretty; }
.k-lead__text { font-size: 14px; line-height: 21px; color: var(--ink-2); }
/* Picks 2–5 under the lead: small photo + time · section + title; two columns once the feed is 600 px wide. */
.k-feed { container-type: inline-size; }
.k-picks { list-style: none; margin: 0; padding: 4px 0 12px; display: grid; gap: 12px 20px; border-bottom: 1px solid var(--line); }
.k-pick { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink); text-decoration: none; }
.k-pick--noimg { grid-template-columns: minmax(0, 1fr); }
.k-pick .k-ph { border-radius: 8px; }
.k-pick__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-pick__title { font-size: 15px; line-height: 21px; font-weight: 500; overflow-wrap: anywhere; text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@container (min-width: 600px) { .k-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.k-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 8px 0; font-size: 15px; line-height: 24px; color: var(--ink); text-decoration: none; }
.k-row--thumb { grid-template-columns: 48px minmax(0, 1fr) 104px; }
.k-row--thumb .k-ph { border-radius: 8px; align-self: start; }
.k-row__time { font-size: 13px; color: var(--muted); padding-top: 1px; }
.k-row__body { min-width: 0; overflow-wrap: anywhere; }
.k-row__title { font-weight: 500; }
.k-row__text { color: var(--ink-2); }
/* iXBT rhythm: headline plus the start of the lead, never more than three lines per row. */
.k-row__body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.k-row__text::before { content: " "; }
.k-row .td-badge { margin-left: 6px; vertical-align: 1px; }
.k-row--native { background: var(--surface-2); border-radius: 8px; padding: 8px; margin: 4px -8px; }
.k-row__label { font: 500 11px/16px var(--font-sans); color: var(--accent-ink, var(--muted)); padding-top: 4px; }
.k-adrow { margin: 8px 0; }
.k-adrow .td-creative--inline { margin: 0; min-height: 200px; }
.k-more { margin-top: 12px; width: 100%; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 15px/1 var(--font-sans); cursor: pointer; }
.k-more:hover { background: var(--surface-2); }
.k-more:disabled { opacity: .6; cursor: progress; }
.k-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Right: «Обзоры» (its own grid item, see .k-layout--reviews), the 300×600 in its own panel, most read 1–5.
   Reviews: the newest as a large 16:9 card (title up to 3 lines), the next ones as rows with a 16:9 thumb (2 lines,
   as the TikTok panel); section · date above the title, badges before it. Head + 1 large + 2 rows = 499 px, level with
   «Цены в Казахстане» on the left. A wide panel (tablet, under the feed) puts the rows beside the lead. */
.k-reviews { grid-area: reviews; container-type: inline-size; }
.k-reviews__list { list-style: none; margin: 0; padding: 0; }
.k-reviews__list > li + li { border-top: 1px solid var(--line); }
.k-review { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; color: var(--ink); text-decoration: none; }
.k-reviews__list > li:last-child .k-review { padding-bottom: 0; }
.k-review--lead { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 3px; }
.k-review--noimg { grid-template-columns: minmax(0, 1fr); }
.k-review .k-ph { aspect-ratio: 16 / 9; border-radius: 8px; }
.k-review--lead .k-ph { border-radius: 12px; }
.k-review__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-review__title { font-size: 14px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.k-review--lead .k-review__title { font-size: 16px; line-height: 22px; -webkit-line-clamp: 3; }
/* Desktop: fixed text heights (3 + 2 + 2 lines), so the panel is 499 px whatever the titles' length. */
@media (min-width: 1024px) {
  .k-review__title { min-height: 40px; }
  .k-review--lead .k-review__title { min-height: 66px; }
}
@container (min-width: 560px) {
  .k-reviews__list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; }
  .k-reviews__list > li:first-child { grid-row: span 2; }
  .k-reviews__list > li + li { border-top: 0; }
  .k-reviews__list > li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .k-reviews__list > li:nth-child(2) .k-review { padding-top: 4px; }
  .k-reviews__list > li .k-review { padding-bottom: 12px; }
}
.k-adbox { padding-top: 12px; }
.k-adbox__head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.k-adbox .td-creative--sidebar { width: 100%; max-width: 300px; margin: 0 auto; }
.k-adbox .td-creative__label { display: none; } /* the panel head already says "Реклама" */
.k-pop { list-style: none; margin: 0; padding: 0; counter-reset: k-pop; }
.k-pop li { counter-increment: k-pop; }
.k-pop li + li { border-top: 1px solid var(--line); }
.k-pop a { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 12px 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); text-decoration: none; }
.k-pop a::before { content: counter(k-pop); font: 400 13px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--muted); }

@media (hover: hover) and (pointer: fine) {
  .k-acard:hover .k-acard__title, .k-review:hover .k-review__title, .k-row:hover .k-row__title, .k-lead:hover .k-lead__title, .k-pick:hover .k-pick__title, .k-pop a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}
/* «Обзоры» on top of the right column on desktop; below 1024 px right under the feed, before the left blocks. */
@media (min-width: 1024px) {
  .k-layout--reviews { grid-template-areas: "left feed reviews" "left feed right"; grid-template-rows: auto 1fr; }
}
@media (max-width: 1023px) {
  .k-layout { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "feed right" "left right"; }
  .k-layout--reviews { grid-template-areas: "feed right" "reviews right" "left right"; }
}
@media (max-width: 767px) {
  .k-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "feed" "left" "right"; padding: 0; gap: 0; margin-top: 0; }
  .k-col-left { gap: 8px; padding-top: 8px; }
  .k-panel { border-radius: 0; }
  .k-feed, .k-col-left { background: var(--bg); }
  .k-col-right { gap: 8px; padding-top: 8px; background: var(--bg); }
  .k-lead { grid-template-columns: minmax(0, 1fr); }
  .k-lead .k-ph { aspect-ratio: 16 / 9; }
  .k-row--thumb { grid-template-columns: 48px minmax(0, 1fr) 88px; }
  .k-pick { grid-template-columns: 88px minmax(0, 1fr); }
  .k-pick--noimg { grid-template-columns: minmax(0, 1fr); }
  .k-layout--reviews { grid-template-areas: "feed" "reviews" "left" "right"; }
  .k-reviews { margin-top: 8px; }
  .k-adbox { display: none; }
}

/* Cards without a cover: text only, no empty grey box. */
.cl-card--noimg .cl-card__body { padding-top: var(--space-3); border-top: 2px solid var(--ink); }
.cl-card--overlay.cl-card--noimg { justify-content: flex-end; min-height: 220px; padding: var(--space-4); border-radius: var(--radius-lg); background: #0b0b0c; color: #fff; }
.cl-card--overlay.cl-card--noimg .cl-card__body { position: static; padding: 0; border-top: 0; }

/* Cookie card: docked bottom-left on wide screens; while it is up the page gets room so it never covers the footer. */
@media (min-width: 768px) { .td-cookie { right: auto; max-width: 420px; margin: 0; } }
html.has-cookie body { padding-bottom: 140px; }
@media (min-width: 768px) { html.has-cookie body { padding-bottom: 96px; } }

/* Header search: an icon on phones, a quiet field from 1024px (draft header). */
.k-searchbox__label { display: none; }
@media (min-width: 1024px) {
  .td-icon-btn.k-searchbox { width: 240px; justify-content: start; display: flex; gap: 8px; padding: 0 12px; height: 36px; margin-right: 8px; border-radius: 8px; background: var(--surface); color: var(--muted); }
  .td-icon-btn.k-searchbox svg { width: 16px; height: 16px; }
  .td-icon-btn.k-searchbox:hover { background: var(--surface-2); color: var(--ink-2); }
  .k-searchbox__label { display: inline; font-size: 14px; }
}

/* Header sponsor ticker (site.partials.ads.ticker): fills the header between the logo and the actions. "Реклама"
   on the left, then the running ads scroll slowly: the brand's logo (on a white chip, so any logo file reads in
   both themes) and its line. The viewport is a real scroller (scrollbar hidden) driven by the script in the
   partial, so it can also be swiped, wheeled or dragged by hand. On phones it is a strip of its own. */
.k-ticker { flex: 1 1 auto; min-width: 0; height: 40px; margin: 0 var(--space-2); padding: 0 12px; border-radius: 8px;
  background: var(--surface); display: flex; align-items: center; gap: 12px; overflow: hidden; }
.k-ticker__label { flex: none; font-size: 11px; line-height: 16px; color: var(--muted); }
.k-ticker__viewport { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; --fade: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%); }
.k-ticker__track { display: flex; width: max-content; }
.k-ticker__item { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding-left: 16px; font-size: 14px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
.k-ticker__item::after { content: ""; width: 4px; height: 4px; margin-left: 16px; border-radius: 50%; background: var(--line-strong, var(--muted)); opacity: .5; }
.k-ticker__item strong { font-weight: 500; color: var(--ink); }
/* A ticker that stands still (one entry) has nothing to separate. */
.k-ticker:not(.is-moving) .k-ticker__item::after { display: none; }
/* Logos sit straight on the strip in the light theme (they are made for light pages); in the dark theme they get a
   white chip. The logo box has one height for every brand, so logos of any shape line up. */
.k-ticker__logo { flex: none; display: inline-flex; align-items: center; height: 24px; }
.k-ticker__logo img { display: block; height: 14px; width: auto; max-width: 96px; object-fit: contain; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-ticker__logo { padding: 0 8px; border-radius: 8px; background: #fff; } }
:root[data-theme="dark"] .k-ticker__logo { padding: 0 8px; border-radius: 8px; background: #fff; }
.k-ticker:not(.is-moving) .k-ticker__item { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.k-ticker__viewport::-webkit-scrollbar { display: none; }
.k-ticker__item img { -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) { .k-ticker.is-moving .k-ticker__viewport { cursor: grab; } }
.k-ticker.is-dragging .k-ticker__viewport { cursor: grabbing; user-select: none; }

@media (hover: hover) { .k-ticker__item:hover { color: var(--ink); } }
@media (min-width: 1024px) { .k-ticker { margin: 0 var(--space-4); } }
@media (max-width: 767px) {
  /* Phones: a smaller lockup, and the ticker drops to its own full-width strip under the header row (beside the
     logo it would get under 100 px). The search sheet and the menu open over the strip. */
  .td-header .td-logo svg { width: 82px; height: auto; }
  .td-header__inner { flex-wrap: wrap; height: auto; }
  .td-header__brand { height: var(--header-h); }
  .k-ticker { order: 10; flex: 0 0 calc(100% - 12px); height: 32px; margin: 0 0 var(--space-2) var(--space-2); padding: 0 8px; gap: 8px; }
  .k-ticker__item { height: 24px; font-size: 13px; padding-left: 12px; }
  .k-ticker__item::after { margin-left: 12px; }
  .k-ticker__viewport { --fade: 8px; }
  .k-ticker__logo { height: 20px; }
  :root[data-theme="dark"] .k-ticker__logo { padding: 0 6px; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-ticker__logo { padding: 0 6px; } }
  .k-ticker__logo img { height: 12px; }
}

/* Side columns (home): blocks stack with the panel gap; the last block of each column sticks under the header,
   so the sides never look empty while the long feed scrolls. */
.k-col-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1024px) {
  .k-col-left, .k-col-right { align-self: stretch; }
  .k-col-left > :last-child, .k-col-right > :last-child { position: sticky; top: calc(var(--header-h) + 12px); }
}
/* Exchange rates: code | tenge | change, numbers aligned; then coins: code | $ over ₸ | 24 h change.
   A rise is marked with the accent ink and a small triangle, a fall stays muted (no red/green). */
.k-rates__t { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.k-rates__t th { text-align: left; font-weight: 500; padding: 8px 0; vertical-align: top; }
.k-rates__t td { text-align: right; padding: 8px 0 8px 12px; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; }
.k-rates__t tr + tr > * { border-top: 1px solid var(--line); }
.k-rates__ch { color: var(--muted); font-size: 13px; }
.k-rates__ch.is-up { color: var(--accent-ink); }
.k-rates__arrow { display: inline-block; width: 8px; height: 8px; margin-right: 4px; fill: currentColor; vertical-align: 1px; }
.k-rates__t--crypto td:nth-child(2) { width: 100%; }
.k-rates__usd, .k-rates__kzt { display: block; }
.k-rates__kzt { font-size: 12px; line-height: 16px; color: var(--muted); }
.k-rates__sub { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; font-weight: 500; }
.k-rates__note { margin: 8px 0 0; }
.k-rates__note a { color: inherit; }
/* Our TikTok: 9:16 cover, two-line title, views · date; the account button under the list. */
.k-tiktok__list { list-style: none; margin: 0; padding: 0; }
.k-tiktok__list li + li { border-top: 1px solid var(--line); }
.k-tiktok__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; color: var(--ink); text-decoration: none; }
.k-tiktok__ph { display: block; width: 48px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.k-tiktok__ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-tiktok__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-tiktok__title { font-size: 14px; line-height: 20px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.k-tiktok__item:hover .k-tiktok__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.k-tiktok .k-meta { font-variant-numeric: tabular-nums; }
.k-tiktok .k-meta time { white-space: nowrap; }
.k-tiktok__go { display: flex; align-items: center; justify-content: center; height: 40px; margin-top: 8px; border-radius: 8px; background: var(--bg); color: var(--ink);
  font-size: 14px; font-weight: 500; text-decoration: none; }
.k-tiktok__go:hover { background: var(--surface-2); }
/* Release calendar: day/month block + title; "слух" in muted text, no colour. */
.k-cal { list-style: none; margin: 0; padding: 0; }
.k-cal li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.k-cal li + li { border-top: 1px solid var(--line); }
.k-cal__date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; border-radius: 8px; background: var(--bg);
  font-size: 12px; line-height: 14px; color: var(--muted); }
.k-cal__date .k-mono { font-size: 16px; line-height: 20px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.k-cal__body { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.k-cal__body a { color: var(--ink); text-decoration: none; }
.k-cal__body a:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-cal__rumor { border: 1px solid var(--line); border-radius: 8px; padding: 0 4px; }



/* ---- news_portal adapter: pieces the Laravel build did not have (core markup, pager, search form, 404) ---- */
.cl-grid--4 { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .cl-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.k-listpager { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin: var(--space-6) 0; }
.k-search-form { display: flex; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2); max-width: var(--measure); }
.k-search-form input { flex: 1; min-width: 0; height: 44px; padding: 0 var(--space-4); border: 1px solid var(--line-control); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.k-search-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.td-search-quick { list-style: none; margin: var(--space-2) 0; padding: 0; display: grid; gap: var(--space-1); }
.k-pages { list-style: none; padding: 0; margin: 0 0 var(--space-7); display: grid; gap: var(--space-2); font-size: 17px; }
.k-404 { text-align: left; padding-top: var(--space-6); }
.k-404__code { margin: 0; font-size: 48px; line-height: 56px; font-weight: 500; color: var(--accent-ink); }
.k-debug { white-space: pre-wrap; font: 12px/16px var(--font-mono); background: var(--surface); padding: var(--space-3); border-radius: var(--radius-sm); overflow-x: auto; }
.td-toc { margin: var(--space-5) 0; padding: var(--space-3) var(--space-4); background: var(--surface); border-radius: var(--radius-md); }
.td-toc__title { cursor: pointer; font-weight: 500; }
.td-toc__list { margin: var(--space-2) 0 0; padding-left: var(--space-5); display: grid; gap: var(--space-1); }
.td-toc__item--h3 { margin-left: var(--space-4); }
.td-creative--html { display: block; }
/* Core media blocks (ContentRenderer) inside the article text */
.td-prose .media-block { margin: var(--space-5) 0; }
.td-prose .media-block figcaption { margin-top: var(--space-2); font-size: 13px; line-height: 16px; color: var(--muted); }
.td-prose .media-img { border-radius: var(--radius-md) !important; }
.cl-after.k-panel { margin-top: var(--space-6); }
