/* Блог «Идём!». Те же токены, что у приложения (src/app/styles/tokens.css):
   холодные чернила на тёплой бумаге, один ультрамарин — только для действий
   и ссылок, один шрифт Golos, иерархия весом, без капса. Живые подборки —
   плитки как на доске: афиша в своих пропорциях, подпись на тёмной плашке. */

@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('/blog/fonts/golos-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('/blog/fonts/golos-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD; }

:root {
    --ink-0: #F2EFE9; --ink-1: #FBF9F5; --ink-2: #E7E3DA; --ink-3: #D8D2C6;
    --paper: #16181C; --paper-2: #5E6167; --paper-3: #9A9DA3;
    --rule: rgba(22, 24, 28, 0.10); --rule-strong: rgba(22, 24, 28, 0.18);
    --accent: #2038C9; --accent-pressed: #16268F; --on-accent: #FFFFFF;
    --lamp: #16181C; --on-lamp: #FBF9F5;
    --tile-scrim: linear-gradient(to top, rgba(7, 10, 12, .94) 0%, rgba(7, 10, 12, .86) 38%, rgba(7, 10, 12, .55) 72%, rgba(7, 10, 12, 0) 100%);
    --tile-plate: rgba(9, 12, 14, .72); --on-tile: #FFFFFF; --on-tile-2: rgba(255, 255, 255, .74);
    --lift-tile: 0 1px 2px rgba(22, 24, 28, .06), 0 6px 18px rgba(22, 24, 28, .08);
    --r-flat: 18px; --r-control: 24px;
    --gutter: 16px; --measure: 680px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: light dark;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1000px) { :root { --gutter: 32px; } }
@media (prefers-color-scheme: dark) {
    :root {
        --ink-0: #0D0F12; --ink-1: #15181C; --ink-2: #1F2328; --ink-3: #2A2F36;
        --paper: #EDEEF1; --paper-2: #9DA1A9; --paper-3: #666B74;
        --rule: rgba(237, 238, 241, .14); --rule-strong: rgba(237, 238, 241, .22);
        --accent: #9BB4FF; --accent-pressed: #C3D1FF; --on-accent: #0B0F1A;
        --lamp: #EDEEF1; --on-lamp: #15181C;
        --lift-tile: 0 0 0 1px rgba(237, 238, 241, .10);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink-0); color: var(--paper); font: 400 17px/1.6 'Golos Text', 'Segoe UI', system-ui, sans-serif; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img, video { max-width: 100%; display: block; }

.shell { padding: 0 max(var(--gutter), env(safe-area-inset-right)) 48px max(var(--gutter), env(safe-area-inset-left)); }

/* Шапка: словесный знак и три ссылки, без фона — как masthead приложения. */
.mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.mark { font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--paper); text-decoration: none; }
.mark span { color: var(--accent); }
.mast nav { display: flex; gap: 4px; flex-wrap: wrap; }
.mast nav a { color: var(--paper); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: var(--r-control); }
.mast nav a:hover { background: var(--ink-2); }

/* Заголовок статьи: крупно и плотно, слева — ось чтения, а не центр. */
.post-head { padding: 48px 0 32px; max-width: 920px; }
.post-head h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; margin: 12px 0 0; text-wrap: balance; }
.dek { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.45; color: var(--paper-2); margin: 20px 0 0; max-width: 62ch; text-wrap: pretty; }
.crumbs { margin: 0; font-size: 14px; color: var(--paper-2); }
.crumbs a { color: inherit; }

/* Колонка текста + правая колонка с содержанием и CTA на широком экране. */
.post-grid { display: grid; gap: 40px; }
@media (min-width: 1100px) { .post-grid { grid-template-columns: minmax(0, var(--measure)) minmax(260px, 320px); justify-content: space-between; column-gap: 64px; } }
.rail { display: none; }
@media (min-width: 1100px) { .rail { display: block; } .rail > * { position: sticky; top: 24px; } .rail .toc + .cta { position: static; margin-top: 24px; } }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { text-wrap: pretty; }
.prose h2 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin-top: 2.2em; text-wrap: balance; scroll-margin-top: 20px; }
.prose h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; margin-top: 1.8em; scroll-margin-top: 20px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--paper-2); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--paper); font-weight: 500; }
.prose strong { font-weight: 600; }

.toc { padding: 20px; background: var(--ink-1); border-radius: var(--r-flat); box-shadow: var(--lift-tile); }
.toc p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--paper-2); }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.4; }
.toc li + li { margin-top: 8px; }
.toc a { color: var(--paper); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* Видео: та же скруглённая рамка, что у афиш; вертикальное не растягиваем. */
.video { margin: 2em 0 0; }
.video video { width: 100%; height: auto; border-radius: var(--r-flat); background: var(--ink-2); }
.video-vertical video { width: min(100%, 340px); }
.video figcaption { font-size: 14px; color: var(--paper-2); margin-top: 10px; }

/* Живая подборка: плитки-афиши, как на доске приложения. */
.live { margin-top: 2.2em; padding-top: 20px; border-top: 1px solid var(--rule-strong); }
.live header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.live h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.live-note { font-size: 13px; color: var(--paper-2); }
.wall { list-style: none; margin: 16px 0 0; padding: 0; columns: 2 160px; column-gap: 10px; }
.tile { break-inside: avoid; margin: 0 0 10px; }
.tile a { position: relative; display: block; border-radius: var(--r-flat); overflow: hidden; background: var(--ink-1); box-shadow: var(--lift-tile); color: var(--on-tile); text-decoration: none; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.tile a:hover { opacity: .92; transform: scale(.99); }
.tile img { width: 100%; height: auto; }
.tile-blank { display: block; aspect-ratio: 3 / 4; background: var(--ink-2); }
.stamp { position: absolute; top: 8px; left: 8px; padding: 4px 9px; border-radius: var(--r-control); background: var(--tile-plate); font-size: 12px; font-weight: 600; line-height: 1.35; }
.plate { position: absolute; inset: auto 0 0 0; padding: 36px 12px 12px; background: var(--tile-scrim); display: grid; gap: 2px; }
.plate strong { font-size: 14px; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plate span { font-size: 12px; color: var(--on-tile-2); }
.live-more { margin: 6px 0 0; font-weight: 600; }
.live-empty { margin: 14px 0 0; padding: 16px 18px; background: var(--ink-2); border-radius: var(--r-flat); color: var(--paper-2); }

/* CTA — инвертированная плашка (lamp): единственный «громкий» блок статьи. */
.cta { margin-top: 2.4em; padding: 24px; border-radius: var(--r-flat); background: var(--lamp); color: var(--on-lamp); }
.cta-kicker { margin: 0; font-size: 13px; font-weight: 600; opacity: .7; }
.cta-title { margin: 6px 0 18px; font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.cta-main { display: inline-block; padding: 13px 22px; border-radius: var(--r-control); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.cta-main:hover { background: var(--accent-pressed); }
.cta-stores { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; font-size: 14px; }
.cta-stores a { color: inherit; opacity: .8; }

/* Ещё в блоге и индекс: карточки без рамок, разделены воздухом и линией. */
.more { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.more h2 { font-size: 22px; margin: 0 0 8px; }
.more ul, .cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.more a, .cards a { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--rule); color: var(--paper); text-decoration: none; }
.more strong, .cards strong { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
.more a:hover strong, .cards a:hover strong { color: var(--accent); }
.more span, .cards span { color: var(--paper-2); font-size: 15px; line-height: 1.45; }
.cards .meta { font-size: 13px; }
.cards .lead { grid-column: 1 / -1; }
.cards .lead a { grid-template-columns: 1fr; padding-bottom: 28px; }
.cards .lead img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-flat); margin-bottom: 8px; }
.cards .lead strong { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
@media (min-width: 900px) { .cards .lead a { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 32px; align-items: end; } .cards .lead img { grid-row: 1 / span 3; margin: 0; } }

.foot { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--paper-2); }
.foot p { margin: 0 0 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: var(--paper-2); }
.foot .legal { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) { .tile a { transition: none; } }
