@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,700;0,900;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,700;0,6..72,800;1,6..72,400&family=Public+Sans:wght@300;400;600;700&family=Inter:wght@400;500;700&display=swap');

/* ============================================
   Глобальные стили
   ============================================ */

:root {
    /* Theme palette */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-accent: #4338ca;
    --color-accent-contrast: #ffffff;
    --color-border-soft: rgba(15, 23, 42, 0.08);
    --color-divider-subtle: #f1f5f9;
    --color-footer-divider: #e5e7eb;

    /* Typography */
    --font-heading: "Newsreader", Georgia, "Times New Roman", serif;
    --font-body: "Public Sans", "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-label: "Inter", "Public Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif-accent: "Bitter", "Newsreader", Georgia, "Times New Roman", serif;

    /* Card system tokens */
    --card-radius-sm: 4px;
    --card-media-ratio: 16 / 9;
    --card-title-hover: var(--color-accent);
    --card-overlay-dark: rgba(0, 0, 0, 0.9);
    --card-overlay-mid: rgba(0, 0, 0, 0.4);
    --card-overlay-light: rgba(0, 0, 0, 0.8);
    --quote-avatar-bg: var(--color-accent);
    --quote-avatar-color: var(--color-accent-contrast);
}

* {
    box-sizing: border-box;
}

/* Flat mode: disable all corner rounding in this theme */
*,
*::before,
*::after {
    border-radius: 0 !important;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: #0f172a;
}

a {
    color: inherit;
    text-decoration: none;
}

figure {
    margin: 0;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 900;
    font-family: var(--font-heading);
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 900;
    font-family: var(--font-heading);
}

.media-asset {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
}

.media-asset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Layout
   ============================================ */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.site-container {
    max-width: 1440px;
    margin: 0 auto;
}

.wrap-content {
    padding: 32px 0;
    flex: 1 1 auto;
}

.wrap-header,
.wrap-content,
.wrap-footer {
    padding-inline: 24px;
}

.site-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header */
.wrap-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--color-divider-subtle);
}

.wrap-header::after {
    content: "";
    position: absolute;
    left: max(0px, calc((100% - 1440px) / 2));
    bottom: -2px;
    width: min(520px, 36vw);
    height: 2px;
    background: var(--color-accent);
}

.site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
    background: #ffffff;
    border: 0;
    box-shadow: none;
}

/* Footer */
.wrap-footer {
    margin-top: auto;
    border-top: 1px solid var(--color-footer-divider);
    padding-top: 16px;
    padding-bottom: 12px;
    background: #f5f3f3;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Branding */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 32px;
    min-width: 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    border-radius: 6px;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
}

.brand-mark {
    color: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    word-wrap: break-word;
    margin: 0;
}

.brand-caption {
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
    word-wrap: break-word;
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 0.95rem;
}

.site-nav a {
    padding: 4px 0;
    color: #475569;
    position: relative;
}

.site-nav a:hover {
    color: #111827;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

.site-nav a.active,
.site-nav a.router-link-active,
.site-nav a.router-link-exact-active {
    color: var(--color-accent);
}

.site-nav a.active::after,
.site-nav a.router-link-active::after,
.site-nav a.router-link-exact-active::after {
    transform: scaleX(1);
}

.site-nav a.active {
    font-weight: 600;
}

.site-nav-tags a {
    font-family: var(--font-serif-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1rem;
    line-height: 1.2;
}

.search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.search input {
    background: transparent;
    border: none;
    color: #0f172a;
    padding: 8px 12px;
    min-width: 220px;
}

.search input::placeholder {
    color: #94a3b8;
}

.search button {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* Burger Menu */
.burger-menu {
    position: relative;
    z-index: 1000;
}

.burger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.burger-button:hover {
    color: #111827;
}

.burger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
}

.menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.menu-close:hover {
    color: #111827;
}

.menu-search {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-search form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-search input {
    background: transparent;
    border: none;
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
    color: #0f172a;
}

.menu-search input::placeholder {
    color: #94a3b8;
}

.menu-search button {
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 600;
}

.menu-nav {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-nav a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #475569;
    font-size: 1rem;
}

.menu-nav a:hover,
.menu-nav a.active {
    color: #111827;
    font-weight: 600;
}

.menu-section {
    padding-bottom: 16px;
}

.menu-section-title {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-list li a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #475569;
}

.menu-list li a:hover,
.menu-list li a.active {
    background: #f1f5f9;
    color: #111827;
}

/* Menu animations */
.menu-enter-active,
.menu-leave-active {
    transition: opacity 0.3s ease;
}

.menu-enter-from,
.menu-leave-to {
    opacity: 0;
}

.menu-enter-active .menu-content,
.menu-leave-active .menu-content {
    transition: transform 0.3s ease;
}

.menu-enter-from .menu-content,
.menu-leave-to .menu-content {
    transform: translateX(100%);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #4338ca;
    font-weight: 500;
}

.site-footer {
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.footer-domain {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-copyright {
    margin: 0;
    color: #475569;
    font-size: 0.85rem;
}

/* ============================================
   Утилиты
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    background: var(--bg, rgba(226, 232, 240, 0.8));
    color: #0f172a;
}

.pill-outline {
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: transparent;
    color: #4338ca;
}

.pill.small {
    font-size: 0.7rem;
    padding: 3px 10px;
}

.muted {
    color: #64748b;
    font-size: 0.85rem;
}

.see-all {
    color: #4338ca;
    font-size: 0.85rem;
}

.back-link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.9rem;
    color: #4338ca;
    margin-bottom: 12px;
    text-decoration: none;
}

.meta {
    display: flex;
    gap: 12px;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 16px;
}

.description {
    color: #475569;
    line-height: 1.6;
}

.excerpt {
    margin: 0;
    color: #475569;
    line-height: 1.4;
}

/* Buttons */
.btn {
    border-radius: 999px;
    padding: 12px 26px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
    text-align: center;
}

.load-more {
    display: flex;
}

.load-more-btn {
    margin: 0 auto;
    display: inline-flex;
    justify-content: center;
    min-width: 220px;
}

.btn-primary,
.btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.btn-secondary,
.btn.secondary {
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.btn-ghost,
.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #e2e8f0;
}

/* Loader & Spinner */
.loader,
.empty {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #475569;
}

.loader-full {
    width: 100%;
    justify-content: center;
    padding: 48px 24px;
}

.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4338ca;
    animation: pulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.empty {
    justify-content: center;
}

.spinner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.2);
    border-top-color: #4338ca;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    padding: 48px;
    text-align: center;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.empty-state a {
    color: #4338ca;
}

/* ============================================
   Card System (card-*)
   ============================================ */

.card-image-top {
    display: block;
}

.card-image-top__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-image-top__media-wrap {
    aspect-ratio: 16 / 9;
    margin-bottom: 16px;
    overflow: hidden;
}

.card-image-top__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image-top__title {
    margin: 0;
    font-family: var(--font-serif-accent);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.28;
    transition: color 0.2s ease;
}

.card-image-top--lead .card-image-top__media-wrap {
    margin-bottom: 0;
    overflow: hidden;
    background: #ffffff;
}

.card-image-top--lead .card-image-top__media {
    aspect-ratio: 16 / 9;
    height: auto;
    transition: transform 0.5s ease;
}

.card-image-top__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-image-top__kicker {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
}

.card-image-top--lead .card-image-top__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--color-text);
}

.card-image-top--lead .card-image-top__body {
    margin-top: 24px;
    gap: 16px;
}

.card-image-top__description {
    margin: 0;
    max-width: 42rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.card-image-top__time {
    display: block;
    margin-top: 0;
    font-family: var(--font-label);
    font-size: 0.625rem;
    color: #94a3b8;
}

.card-image-top__link:hover .card-image-top__media {
    transform: scale(1.1);
}

.card-image-top__link:hover .card-image-top__title {
    color: var(--color-accent);
}

.card-image-top--lead .card-image-top__link:hover .card-image-top__media {
    transform: scale(1.05);
}

.card-text-content__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-text-content__tag {
    display: block;
    margin-bottom: 6px;
    color: var(--color-accent);
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-text-content__time {
    display: block;
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
}

.card-text-content__title {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-text-content__description {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text-content__badge {
    display: inline-block;
    margin-top: 8px;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.card-text-content__link:hover .card-text-content__title {
    color: var(--color-accent);
}


.card-image-overlay {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-image-overlay__link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-image-overlay__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card-image-overlay__overlay {
    position: absolute;
    inset: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.card-image-overlay__title {
    margin: 0;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-image-overlay__link:hover .card-image-overlay__media {
    transform: scale(1.05);
}

.card-image-overlay__link:hover .card-image-overlay__title {
    color: var(--color-accent);
}

.card-image-overlay--lead .card-image-overlay__overlay {
    padding: 32px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), transparent);
}

.card-image-overlay__tag {
    align-self: flex-start;
    display: inline-block;
    margin-bottom: 16px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.card-image-overlay--lead .card-image-overlay__title {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    line-height: 1.2;
}

.card-image-overlay__description {
    margin: 16px 0 0;
    color: #d4d4d8;
    font-size: 0.95rem;
    line-height: 1.5;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   Content System (content-*)
   ============================================ */

.content-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(15, 23, 42, 0.16);
}

.content-section__title {
    margin: 0;
    font-family: 'Bitter', serif;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.content-section__action {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
    text-decoration: none;
}

.content-section__action:hover {
    color: #be0b17;
}

.content-sidebar__title {
    margin: 0 0 20px;
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
}

.content-sidebar__footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

/* Content feature */
.content-feature {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.content-feature__lead {
    min-height: 100%;
}

.content-feature__side {
    display: grid;
    gap: 12px;
}

.listing-split {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.content-feature .card-image-overlay {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-layout__details {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.content-layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-layout__sticky {
    position: sticky;
    top: 24px;
}

/* ============================================
   Listing System (listing-*)
   ============================================ */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.listing-masonry {
    column-count: 4;
    column-gap: 24px;
}

.listing-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.listing-masonry__item {
    break-inside: avoid;
    margin-bottom: 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--color-divider-subtle);
}

.listing-list__item {
    border-top: 1px solid var(--color-divider-subtle);
    padding-top: 16px;
    margin-top: 0;
}

.listing-list__item:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.main-tags .listing-masonry {
    column-gap: 16px;
}

.listing-masonry__item .card-text-content {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.listing-masonry .excerpt {
    display: none;
}

/* ============================================
   Главная страница
   ============================================ */

.main-news__grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    grid-template-areas: "feed feature updates";
    gap: 32px;
}

.main-news__grid,
.main-news__grid > *,
.main-news__secondary,
.main-news__secondary > * {
    min-width: 0;
}

.main-news__center {
    grid-area: feature;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-news__secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.main-news__feed {
    grid-area: feed;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 96px;
    align-self: start;
}

.main-news__updates {
    grid-area: updates;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 96px;
    align-self: start;
}

.main-news__all-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    font-size: 0.75rem;
    font-family: var(--font-label);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.main-news__all-link:hover {
    opacity: 0.9;
}

.main-news__updates .card-text-content__description {
    margin-top: 4px;
}

.main-tags {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* ============================================
   Страница поиска
   ============================================ */

.search-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-header h1 {
    margin: 6px 0;
}

.search-page .listing-list {
    gap: 12px;
}

.search-page .listing-list__item {
    border-top: 0;
    padding-top: 0;
}

.search-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
    transition: border-color 0.2s ease,
    box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.search-item:hover {
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.search-item a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    color: inherit;
    text-decoration: none;
}

.search-item__main h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.search-item__main p {
    margin: 0;
    color: #475569;
}

.search-item__meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    color: #64748b;
    font-size: 0.85rem;
    text-align: right;
}

/* ============================================
   Страница статьи
   ============================================ */

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #64748b;
    flex-wrap: wrap;
}

.article-date {
    color: #64748b;
}

.article-separator {
    color: #94a3b8;
}

.article-category,
.article-tag {
    color: #4338ca;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.article-category:hover,
.article-tag:hover {
    opacity: 0.7;
}

.article-tag-separator {
    color: #94a3b8;
}

.article-header {
    margin-bottom: 24px;
}

.article-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.6;
}

.article-cover {
    margin: 24px 0;
}

.article-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.article-body {
    margin: 24px 0;
}

.article-author {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.9rem;
    color: #64748b;
}

.article-author-label {
    font-weight: 600;
    margin-right: 8px;
}

.article-author-name {
    color: #0f172a;
}

/* ============================================
   Страница автора
   ============================================ */

.author-header {
    padding-bottom: 1.5rem;
}

.author-info {
    max-width: 100%;
}

.author-name {
    font-size: 23px;
    font-weight: 900;
    line-height: 29px;
    margin: 0 0 1rem 0;
}

.author-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
}

.author-separator {
    color: #94a3b8;
}

.author-caption-text {
    font-size: 0.9rem;
}

/* ============================================
   Страница ошибки
   ============================================ */

.error-page {
    width: 100%;
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 0 56px;
    background: transparent;
}

.error-page__panel {
    width: 100%;
    max-width: 840px;
    padding: 40px;
    border-radius: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--color-text);
}

.error-page__badge {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0.02em;
    background: color-mix(in srgb, var(--color-text) 10%, transparent);
    color: var(--color-text-muted);
}

.error-page__heading .muted {
    margin: 0;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.error-page__heading h1 {
    margin: 6px 0;
    font-size: clamp(2.5rem, 10vw, 4.2rem);
    color: var(--color-text);
    line-height: 1.05;
}

.error-page__lead {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin: 0;
}

.error-page__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.error-page__card {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--color-border-soft);
    background: color-mix(in srgb, var(--color-surface) 94%, var(--color-text) 6%);
    color: var(--color-text);
}

.error-page__card p {
    margin: 0;
}

.error-page__card p + p {
    margin-top: 8px;
}

.error-page__card ul {
    margin: 12px 0 0;
    padding-left: 20px;
    list-style: disc;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.error-page__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.error-page__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.error-page__actions .btn.primary {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border: 1px solid color-mix(in srgb, var(--color-accent) 80%, black);
}

.error-page__actions .btn.primary:hover {
    background: color-mix(in srgb, var(--color-accent) 88%, black);
}

.error-page__actions .btn.ghost {
    border: 1px solid var(--color-border-soft);
    background: transparent;
    color: var(--color-text);
}

.error-page__actions .btn.ghost:hover {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.error-page__actions .btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ============================================
   Блоки контента
   ============================================ */

.blocks-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rich-text-block {
    padding: 0;
    line-height: 1.7;
    color: #0f172a;
}

.rich-text-block h1,
.rich-text-block h2,
.rich-text-block h3 {
    margin: 16px 0 8px;
}

.rich-text-block code {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.placeholder-block {
    padding: 32px;
    color: #475569;
    text-align: center;
}

/* ============================================
   Tags Select
   ============================================ */
.tags-select {
    display: none;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.tags-list .tag-link {
    text-decoration: none;
}

.tags-list .pill {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 10px;
    color: #334155;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.tag-link.active .pill {
    background: rgba(226, 232, 240, 0.95);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.45);
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tags-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    color: #0f172a;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tags-select:hover {
    border-color: rgba(15, 23, 42, 0.2);
}

.tags-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tags-select option {
    background: #ffffff;
    color: #0f172a;
    padding: 0.5rem;
}

/* ============================================
   Медиа-запросы
   ============================================ */

@media (max-width: 1400px) {
    .listing-masonry {
        column-count: 3;
    }
}

@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .content-layout__sticky {
        position: static;
    }

    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-feature {
        grid-template-columns: 1fr;
    }

    .listing-masonry {
        column-count: 2;
    }
}

@media (max-width: 900px) {
    .site-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-main {
        min-width: 0;
    }

    .site-nav {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .site-nav-tags {
        display: none;
    }

    .main-news__grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "feature"
            "feed"
            "updates";
    }

    .main-news__secondary {
        grid-template-columns: 1fr;
    }

    .main-news__feed,
    .main-news__updates,
    .main-news__center {
        grid-column: auto;
    }

    .main-news__feed,
    .main-news__updates {
        position: static;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .error-page__panel {
        padding: 32px;
    }

    .error-page__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-content {
        max-width: 100%;
    }

    .tags-select {
        display: block;
    }

    .tags-list {
        display: none;
    }
}

@media (max-width: 700px) {
    .listing-masonry {
        column-count: 1;
    }
}

@media (max-width: 640px) {
    .main-tags {
        margin-top: 48px;
        gap: 48px;
    }

    .search-item a {
        flex-direction: column;
    }

    .search-item__meta {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .wrap-header,
    .wrap-content,
    .wrap-footer {
        padding-inline: 16px;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .article-header {
        padding: 28px 0;
    }

    .error-page__panel {
        padding: 24px;
        border-radius: 24px;
    }

    .error-page__actions {
        flex-direction: column;
        align-items: center;
    }
}
