/* site/site.css
 * Котовидеопедия — bundled CSS по UI-SPEC Phase 02.
 * Tokens из .planning/sketches/themes/default.css (single source of truth
 * для design decisions).
 * Written by hand, no build step. Загружается как /site.css на сервере.
 */

/* ========== Tokens ========== */
:root {
    /* Colors — тёплая беж/охра */
    --color-bg:           #FBF7F0;
    --color-surface:      #FFFFFF;
    --color-surface-soft: #F5EFE4;
    --color-surface-alt:  #EFE6D3;
    --color-border:       #E8DFCE;
    --color-border-soft:  #F0E8D7;
    --color-text:         #2A2420;
    --color-text-muted:   #6D6456;
    --color-text-subtle:  #9C9285;
    --color-primary:      #B55C35;
    --color-primary-hover:#8F4422;
    --color-primary-soft: #F4D9C4;
    --color-accent:       #D4A574;
    --color-accent-soft:  #F2E4CC;
    --color-danger:       #B33B2E;
    --color-success:      #4F7A3A;

    /* Fonts — system-only, offline-friendly */
    --font-serif: Georgia, 'Noto Serif', 'Cambria', 'Times New Roman', serif;
    --font-sans:  system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --text-xs:    0.75rem;
    --text-sm:    0.875rem;
    --text-base:  1rem;
    --text-lg:    1.125rem;
    --text-xl:    1.375rem;
    --text-2xl:   1.75rem;
    --text-3xl:   2.25rem;
    /* --text-4xl: 3rem — DEFERRED, не используется в Phase 02 */

    --leading-tight: 1.25;
    --leading-snug:  1.4;
    --leading-base:  1.6;
    --leading-loose: 1.75;

    --space-1:  4px;   --space-2:  8px;   --space-3:  12px;  --space-4:  16px;
    --space-5:  20px;  --space-6:  24px;  --space-8:  32px;  --space-10: 40px;
    --space-12: 48px;  --space-16: 64px;  --space-20: 80px;

    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   18px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(75, 60, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(75, 60, 40, 0.08);
    --shadow-lg: 0 10px 30px rgba(75, 60, 40, 0.12);

    --max-content: 1200px;
    --max-reading: 720px;

    --t-fast: 120ms ease;
    --t-base: 200ms ease;

    --focus-ring: 2px solid var(--color-primary);
    --focus-offset: 2px;
}

/* ========== Reset / base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: var(--leading-tight); }
h1 { font-size: var(--text-3xl); margin: 0 0 var(--space-4); font-weight: 700; }
h2 { font-size: var(--text-2xl); margin: var(--space-10) 0 var(--space-3); font-weight: 700; }
h3 { font-size: var(--text-xl); margin: var(--space-6) 0 var(--space-2); font-weight: 600; }
h4 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-2); font-weight: 600; }

p { margin: 0 0 var(--space-4); line-height: var(--leading-loose); }
/* Сброс дефолтного user-agent margin у figure (1em 40px в Chrome/Firefox).
   Иначе hero-photo получает margin слева и справа и "сжимается внутрь". */
figure { margin: 0; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
a:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--radius-sm); }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; }
button:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

/* ========== Accessibility ========== */
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--color-primary); color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none; z-index: 1000;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; color: white; text-decoration: none; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ========== Site header ========== */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
    max-width: var(--max-content); margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex; align-items: center; gap: var(--space-8);
    height: 72px;
}
.brand {
    font-family: var(--font-serif); font-size: var(--text-xl); font-weight: 700;
    color: var(--color-text); text-decoration: none;
    display: flex; align-items: center; gap: var(--space-2);
    flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: var(--color-text); }
.brand .paw {
    width: 28px; height: 28px; background: var(--color-primary-soft);
    border-radius: var(--radius-full);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-primary); font-weight: bold; font-size: 16px;
    font-family: var(--font-sans);
}
.main-nav {
    display: flex; gap: var(--space-6); margin-left: auto;
    flex-wrap: nowrap;
}
.main-nav a {
    color: var(--color-text-muted); font-size: var(--text-sm);
    text-decoration: none; font-weight: 500;
    padding: var(--space-2) 0;
    white-space: nowrap;
}
.main-nav a:hover { color: var(--color-primary); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--color-primary); }

/* Промежуточный breakpoint — tablet/small-laptop (641-860px):
   brand-text уже скрываем, nav gap меньше — чтобы «О проекте» не переносился. */
@media (max-width: 860px) {
    .brand-text { display: none; }
    .site-header .inner { gap: var(--space-4); }
    .main-nav { gap: var(--space-4); font-size: var(--text-sm); }
}

@media (max-width: 640px) {
    .site-header .inner { height: 60px; padding: 0 var(--space-4); gap: var(--space-3); }
    .main-nav { gap: var(--space-3); font-size: var(--text-xs); }
    .main-nav a { padding: var(--space-1) 0; }
}

/* Самые узкие phone (< 400px): ещё сильнее ужимаем nav — без overflow-скролла. */
@media (max-width: 400px) {
    .site-header .inner { padding: 0 var(--space-3); gap: var(--space-2); }
    .main-nav { gap: var(--space-2); font-size: 11px; }
    .brand .paw { width: 24px; height: 24px; font-size: 14px; }
}

/* ========== Site footer ========== */
.site-footer {
    background: var(--color-surface-soft);
    border-top: 1px solid var(--color-border);
    padding: var(--space-10) var(--space-6);
    margin-top: var(--space-16);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}
.site-footer .inner {
    max-width: var(--max-content); margin: 0 auto;
    display: flex; flex-direction: column; gap: var(--space-3);
    align-items: center; text-align: center;
}
.site-footer .attribution { font-size: var(--text-sm); max-width: 720px; }
.site-footer p { margin: 0; }

/* ========== Home: hero + catalog ========== */
.home-hero {
    background: linear-gradient(135deg, var(--color-surface-soft), var(--color-accent-soft));
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid var(--color-border-soft);
}
.home-hero .inner {
    max-width: var(--max-content); margin: 0 auto; padding: 0 var(--space-6);
}
.home-hero h1 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.home-hero .lede {
    font-size: var(--text-lg); color: var(--color-text-muted);
    max-width: 680px; margin: 0;
}

/* Pill filter strip (sticky) */
.filter-strip {
    background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    position: sticky; top: 72px; z-index: 20;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.filter-strip .inner {
    max-width: var(--max-content); margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex; gap: var(--space-2); align-items: center;
    flex-wrap: wrap;
    min-width: min-content;
}
.filter-label {
    font-size: var(--text-xs); color: var(--color-text-subtle);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    margin-right: var(--space-3); flex-shrink: 0;
}
.pill {
    padding: 6px 14px; background: var(--color-surface-soft);
    border: 1px solid var(--color-border); border-radius: var(--radius-full);
    font-size: var(--text-sm); color: var(--color-text-muted);
    cursor: pointer; transition: all var(--t-fast);
    flex-shrink: 0;
    font-family: inherit;
}
.pill:hover {
    border-color: var(--color-primary); color: var(--color-primary);
    background: var(--color-surface);
}
.pill[aria-pressed="true"] {
    background: var(--color-primary); color: white; border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .filter-strip { top: 60px; }
    .filter-strip .inner { flex-wrap: nowrap; padding-right: var(--space-12); }
    .filter-strip::after {
        content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
        background: linear-gradient(to right, transparent, var(--color-surface));
        pointer-events: none;
    }
}

/* Catalog grid */
.catalog {
    max-width: var(--max-content); margin: 0 auto;
    padding: var(--space-8) var(--space-6) var(--space-16);
}
.catalog h2 { margin-top: 0; }
.catalog .count {
    font-size: var(--text-sm); color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}
.breed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-5);
}

/* Breed card */
.breed-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .breed-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-accent);
        text-decoration: none;
    }
}
.breed-card:focus-visible {
    outline: var(--focus-ring); outline-offset: var(--focus-offset);
}
.breed-card .photo {
    aspect-ratio: 4 / 3;
    background: var(--color-surface-alt);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.breed-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.breed-card .photo.no-img {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary-soft));
    color: white; font-family: var(--font-serif);
    font-size: var(--text-3xl); font-weight: 300;
}
.breed-card .body { padding: var(--space-4) var(--space-5); flex: 1; }
.breed-card h3 {
    margin: 0 0 var(--space-2);
    font-size: var(--text-lg);
    color: var(--color-text);
}
.breed-card .meta {
    display: flex; gap: var(--space-2); flex-wrap: wrap;
    margin-bottom: var(--space-2);
}
.chip {
    font-size: var(--text-xs); padding: 2px 8px;
    background: var(--color-surface-soft); color: var(--color-text-muted);
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.chip.wild {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}
.breed-card p {
    font-size: var(--text-sm); color: var(--color-text-muted);
    line-height: var(--leading-snug); margin: 0;
}

/* Empty state for filtered catalog */
.empty-state {
    text-align: center; padding: var(--space-16) var(--space-6);
    color: var(--color-text-muted);
}
.empty-state h3 { margin-bottom: var(--space-3); }

/* ========== Breed page: hybrid layout 002-B+C ========== */
.breed-page {
    max-width: var(--max-content); margin: 0 auto;
    padding: var(--space-6) var(--space-6) var(--space-12);
}
.breadcrumbs {
    font-size: var(--text-sm); color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}
.breadcrumbs ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: var(--space-2);
}
.breadcrumbs li + li::before {
    content: '›'; margin-right: var(--space-2);
    color: var(--color-text-subtle);
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs [aria-current="page"] { color: var(--color-text); }

/* Hybrid layout: desktop = sidebar right; mobile = sticky facts-bar */
.breed-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
/* Mobile (< 1024px): header → facts → article через CSS order.
   DOM order в HTML — header/article/facts (удобно для desktop grid),
   но на mobile facts должен быть ПОД H1 как quick-answer в первом экране,
   до длинного текста. */
@media (max-width: 1023.98px) {
    .breed-layout > .breed-header  { order: 1; }
    .breed-layout > .breed-facts   { order: 2; }
    .breed-layout > .breed-article { order: 3; }
}
@media (min-width: 1024px) {
    .breed-layout {
        grid-template-columns: minmax(0, var(--max-reading)) 320px;
        gap: var(--space-10);
    }
    /* breed-header внутри layout занимает обе колонки — hero-photo выравнивается
       по правому краю sidebar, а не выступает за него */
    .breed-layout > .breed-header {
        grid-column: 1 / -1;
    }
}

.breed-header h1 {
    font-size: var(--text-3xl); margin: 0 0 var(--space-2);
}
.breed-header .subtitle {
    font-family: var(--font-serif); font-style: italic;
    font-size: var(--text-lg); color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
}
.breed-header .hero-photo {
    aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
    margin-bottom: var(--space-8); overflow: hidden;
    background: linear-gradient(135deg, #A67449 0%, #D4A574 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.breed-header .hero-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Placeholder пока фото не скачано: большая буква поверх градиента.
   Применяется как <figure class="hero-photo no-img"><span class="initial">M</span></figure> */
.breed-header .hero-photo.no-img {
    color: white;
    font-family: var(--font-serif);
    font-weight: 300;
}
.breed-header .hero-photo.no-img .initial {
    font-size: 8rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    line-height: 1;
}
.breed-header .hero-photo.no-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.18) 100%);
    pointer-events: none;
}
@media (max-width: 640px) {
    .breed-header .hero-photo { aspect-ratio: 3 / 2; }
    .breed-header .hero-photo.no-img .initial { font-size: 5rem; }
}

/* Breed facts — dual form: sticky sidebar (desktop) / static block под hero (mobile) */
.breed-facts {
    /* Mobile default: обычный блок, скроллится вместе со страницей.
       Sticky на mobile отклонили — 6 ячеек 2×3 занимают треть экрана на phone,
       слишком агрессивно. Пользователь всё равно видит facts в первом экране
       сразу под hero, потом скролит текст — facts уходит за верх как обычно. */
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}
.breed-facts .facts-bar {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}
.breed-facts .fact-item { text-align: center; }
.breed-facts .fact-item .label {
    display: block; font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-text-subtle); margin-bottom: 2px;
}
.breed-facts .fact-item .value {
    font-family: var(--font-serif); font-size: var(--text-base);
    color: var(--color-text); font-weight: 600;
}
.breed-facts .facts-full { display: none; }

@media (min-width: 1024px) {
    /* Desktop: full sidebar on right */
    .breed-facts {
        position: sticky; top: 96px; align-self: start;
        background: var(--color-surface);
        padding: var(--space-5);
        margin-bottom: 0;
    }
    .breed-facts .facts-bar { display: none; }
    .breed-facts .facts-full { display: block; }
    .info-card {
        border-top: 1px solid var(--color-border-soft);
        padding-top: var(--space-4); margin-top: var(--space-4);
    }
    .info-card:first-child { border-top: none; padding-top: 0; margin-top: 0; }
    .info-card h3 {
        margin: 0 0 var(--space-3);
        font-size: var(--text-sm); font-family: var(--font-sans);
        text-transform: uppercase; letter-spacing: 0.05em;
        color: var(--color-text-subtle); font-weight: 600;
    }
    .fact-list { list-style: none; padding: 0; margin: 0; }
    .fact-list li {
        display: flex; justify-content: space-between;
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-border-soft);
        font-size: var(--text-sm); gap: var(--space-3);
    }
    .fact-list li:last-child { border-bottom: none; }
    .fact-list .label { color: var(--color-text-muted); }
    .fact-list .value {
        color: var(--color-text); font-weight: 600; text-align: right;
    }
    .similar-breeds { list-style: none; padding: 0; margin: 0; }
    .similar-breeds li { padding: var(--space-2) 0; font-size: var(--text-sm); }
    .similar-breeds a { color: var(--color-primary); }
}

/* Article body (long-form reading).
   max-width убран: на desktop reading column уже ограничен grid-template-columns
   (minmax(0, --max-reading)). На mobile grid track = 1fr, но если оставить
   max-width: 720 на .breed-article, grid-layout интерпретирует это как intrinsic
   min-size column, и grid column "раздувает" track до 720 даже при viewport
   375px → horizontal overflow. Без max-width track = 1fr = viewport width. */
.breed-article { min-width: 0; }
.breed-article p {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
    color: var(--color-text);
}
.breed-article p:first-of-type { margin-top: 0; }
.breed-article .pullquote {
    border-left: 3px solid var(--color-primary);
    padding: var(--space-2) var(--space-5);
    margin: var(--space-8) 0;
    font-style: italic;
    color: var(--color-text-muted);
    font-family: var(--font-serif);
    font-size: var(--text-lg);
}
.breed-article .callout {
    background: var(--color-primary-soft);
    border-left: 3px solid var(--color-primary);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-6) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: var(--text-base);
}
.breed-article .callout h3 {
    margin-top: 0; font-size: var(--text-base);
    color: var(--color-primary-hover);
}
.breed-article .callout.regulatory {
    background: #FDF0E0;
    border-color: var(--color-danger);
}
.breed-article .callout.regulatory h3 { color: var(--color-danger); }

.breed-article figure {
    margin: var(--space-8) 0;
}
.breed-article figure img {
    border-radius: var(--radius-md);
    aspect-ratio: 16 / 9; object-fit: cover;
}
.breed-article figcaption {
    font-size: var(--text-sm); color: var(--color-text-subtle);
    margin-top: var(--space-2); text-align: center;
}

/* Video embed */
.video-embed {
    margin: var(--space-10) 0;
}
.video-embed h2 { margin-top: 0; }
.video-embed video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.video-embed .no-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted);
    text-align: center; padding: var(--space-6);
    font-style: italic;
}

/* Similar breeds — carousel on mobile */
.similar-mobile {
    margin: var(--space-10) 0;
}
.similar-mobile h2 { margin-top: 0; }
.similar-mobile .scroll {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr);
    gap: var(--space-4);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-3);
}
.similar-mobile .scroll > * { scroll-snap-align: start; }
@media (min-width: 1024px) {
    .similar-mobile { display: none; }
}

/* ========== Static pages (about/contacts) ========== */
.static-page {
    max-width: var(--max-reading); margin: 0 auto;
    padding: var(--space-10) var(--space-6);
}
.static-page h1 { margin-top: 0; }
.static-page p { font-size: var(--text-lg); }

/* ========== Error pages ========== */
.error-page {
    max-width: 640px; margin: 0 auto;
    padding: var(--space-16) var(--space-6);
    text-align: center;
}
.error-page .code {
    font-family: var(--font-serif);
    font-size: 6rem; font-weight: 700;
    color: var(--color-primary-soft);
    line-height: 1; margin: 0 0 var(--space-4);
}
.error-page h1 { margin: 0 0 var(--space-4); }
.error-page p { font-size: var(--text-lg); color: var(--color-text-muted); }

/* ========== Videoblog (Phase 03) ========== */

/* Card grid — 1/2/3 col, матчит UI-SPEC breakpoints */
.blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}
@media (min-width: 768px) {
    .blog-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .blog-list { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .blog-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-accent);
        text-decoration: none;
    }
}
.blog-card:focus-visible {
    outline: var(--focus-ring); outline-offset: var(--focus-offset);
}
.blog-card .poster {
    aspect-ratio: 16 / 9;
    background: var(--color-surface-alt);
    position: relative; overflow: hidden;
}
.blog-card .poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.blog-card .body {
    padding: var(--space-4) var(--space-5);
    display: flex; flex-direction: column; gap: var(--space-2);
    flex: 1;
}
.blog-card h3 {
    margin: 0;
    font-size: var(--text-lg); line-height: var(--leading-snug);
    color: var(--color-text);
    /* line-clamp: 2 строки максимум */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card .date {
    font-size: var(--text-sm); color: var(--color-text-muted);
    margin: 0;
}
.blog-card .chips {
    display: flex; gap: var(--space-2); flex-wrap: wrap;
    margin-top: auto;  /* push chips to bottom */
}

/* Tag pills для /blog/ и tag-list страниц */
.tag-pills {
    display: flex; gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
    overflow-x: auto;  /* mobile scroll */
    scrollbar-width: none;
}
.tag-pills::-webkit-scrollbar { display: none; }
.tag-pills a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--t-fast);
}
.tag-pills a:hover,
.tag-pills a:focus-visible {
    color: var(--color-primary-hover);
    border-color: var(--color-accent);
    text-decoration: none;
}
.tag-pills a[aria-current="page"] {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.tag-pills .sep {
    color: var(--color-text-muted);
    align-self: center;
    padding: 0 var(--space-2);
}

/* Pagination (только снизу, решение UI) */
.pagination {
    display: flex; justify-content: center; gap: var(--space-2);
    margin: var(--space-12) 0;
    list-style: none; padding: 0;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--t-fast);
}
.pagination a:hover,
.pagination a:focus-visible {
    border-color: var(--color-accent);
    color: var(--color-primary-hover);
    text-decoration: none;
}
.pagination .current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.pagination .disabled {
    opacity: 0.4; cursor: default;
}

/* Post page */
.post-article {
    max-width: 720px; margin: 0 auto;
    padding: 0 var(--space-4);
}
.post-article h1 {
    margin: var(--space-4) 0 var(--space-3);
}
.post-article .post-meta {
    font-size: var(--text-sm); color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}
.post-article .post-meta .sep {
    padding: 0 var(--space-2);
}
.post-article .video-wrap {
    margin: 0 0 var(--space-8);
}
.post-article .video-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.post-article .description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    margin-bottom: var(--space-8);
}
.post-article .description p {
    margin: 0 0 var(--space-4);
}
.post-article .post-chips {
    display: flex; gap: var(--space-2); flex-wrap: wrap;
    margin-bottom: var(--space-10);
}
.post-article .post-chips a {
    text-decoration: none;
    font-size: var(--text-sm);
    padding: 4px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
}
.post-article .post-chips a:hover {
    border-color: var(--color-accent);
    color: var(--color-primary-hover);
}
.post-article .post-chips a.theme {
    background: var(--color-surface-soft);
}
.post-article .post-chips a.breed {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}

/* Related videos block (в посте) + "Больше видео о ..." на breed-page
 * + "Последние видео" на главной */
.related-videos, .blog-strip {
    margin: var(--space-10) 0;
}
.related-videos h2, .blog-strip h2 { margin-top: 0; }
.blog-strip .strip-head {
    display: flex; justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-5);
    gap: var(--space-4);
}
.blog-strip .strip-head h2 { margin: 0; }
.blog-strip .strip-head .all-link {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    white-space: nowrap;
}
.blog-strip .strip-head .all-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* 410 Gone page для deprecated постов */
.post-deprecated {
    max-width: 640px; margin: 0 auto;
    padding: var(--space-12) var(--space-6);
    text-align: center;
}
.post-deprecated h1 { margin: 0 0 var(--space-4); }
.post-deprecated p {
    font-size: var(--text-lg); color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
}
.post-deprecated .cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
}
.post-deprecated .cta:hover {
    background: var(--color-primary-hover);
    text-decoration: none;
}

/* ========== Print ========== */
@media print {
    .site-header, .site-footer, .filter-strip, .video-embed,
    .similar-mobile, .skip-link { display: none !important; }
    body { background: white; color: black; font-size: 12pt; }
    .breed-layout { grid-template-columns: 1fr; }
    .breed-facts { position: static; page-break-inside: avoid; }
    .breed-article a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
    h1, h2, h3 { page-break-after: avoid; }
    p, figure { page-break-inside: avoid; }
}
