:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #f59e0b;
    --danger: #ef4444;
    --success: #22c55e;
    --nav-bg: #111c31;
    --input-bg: #0b1220;
    --button-text: #f8fafc;
    --media-bg: #000;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f4f7fb;
        --surface: #ffffff;
        --surface-2: #cbd5e1;
        --text: #0f172a;
        --muted: #64748b;
        --accent: #0284c7;
        --accent-2: #d97706;
        --nav-bg: #e8eef7;
        --input-bg: #ffffff;
        --button-text: #0f172a;
        --media-bg: #e2e8f0;
    }
}

:root[data-theme="light"] {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #cbd5e1;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #0284c7;
    --accent-2: #d97706;
    --nav-bg: #e8eef7;
    --input-bg: #ffffff;
    --button-text: #0f172a;
    --media-bg: #e2e8f0;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 64px;
}
.header-actions {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logo {
    align-self: center;
    display: block;
    padding: 10px 24px 0;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0;
    line-height: 1;
}
.logo span { color: var(--accent); }
.logo-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.logo-since {
    width: 100%;
    margin-top: 3px;
    padding-bottom: 9px;
    color: #64748b;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
}
.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    padding: 9px 24px;
    background: var(--nav-bg);
}
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.nav-all-news { color: #ef4444; font-size: 1.104rem; }
.nav a.nav-all-news:hover, .nav a.nav-all-news.active { color: #ef4444; }
.login-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--button-text);
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
    font: inherit;
    font-size: .9rem;
    line-height: 1;
}
.login-trigger:hover {
    color: var(--accent);
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .95rem;
    line-height: 1;
}
.theme-toggle svg,
.theme-toggle-icon {
    width: 18px;
    height: 18px;
    display: block;
}
.theme-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-toggle:hover {
    color: var(--accent);
}
.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    background: currentColor;
    border-radius: 999px;
    transition: transform .16s ease, opacity .16s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.lang-switch { background: var(--surface-2); border: 0; color: var(--text); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    isolation: isolate;
    perspective: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.login-modal.open { display: flex; }
.login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .72);
    transform: translateZ(0);
}
.login-dialog {
    position: relative;
    width: min(380px, 100%);
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
    padding: 24px;
    z-index: 1;
    transform: none;
    animation: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.login-dialog h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
    text-align: center;
}
.login-close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.login-close:hover { color: var(--text); }
.login-form {
    display: grid;
    gap: 14px;
}
.login-form input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text);
    padding: 9px 12px;
    font: inherit;
}
.login-form input::placeholder {
    color: var(--muted);
    opacity: 1;
}
.login-gesture-track {
    position: relative;
    height: 42px;
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    background: var(--input-bg);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}
.login-gesture-track::before,
.login-gesture-track::after {
    content: "";
    position: absolute;
    top: 0;
    width: 44px;
    height: 100%;
    pointer-events: none;
}
.login-gesture-track::before {
    left: 0;
    background: linear-gradient(90deg, rgba(56, 189, 248, .14), transparent);
}
.login-gesture-track::after {
    right: 0;
    background: linear-gradient(270deg, rgba(56, 189, 248, .14), transparent);
}
.login-gesture-track span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .82rem;
    pointer-events: none;
}
.login-gesture-handle {
    position: absolute;
    top: 4px;
    left: calc(50% - 17px);
    z-index: 1;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    cursor: grab;
    touch-action: none;
}
.login-gesture-handle::before,
.login-gesture-handle::after {
    content: "";
    position: absolute;
    top: 11px;
    width: 7px;
    height: 7px;
    border-top: 2px solid var(--bg);
    border-right: 2px solid var(--bg);
}
.login-gesture-handle::before {
    left: 8px;
    transform: rotate(-135deg);
}
.login-gesture-handle::after {
    right: 8px;
    transform: rotate(45deg);
}
.login-gesture.direction-left .login-gesture-handle::after,
.login-gesture.direction-right .login-gesture-handle::before {
    display: none;
}
.login-gesture-handle:active {
    cursor: grabbing;
}
.login-gesture.verified .login-gesture-track {
    border-color: var(--accent);
    background: rgba(56, 189, 248, .12);
}
.login-gesture.verified .login-gesture-track span {
    color: var(--accent);
}
.login-error {
    margin: 0 0 14px;
    color: #fecaca;
    font-size: .9rem;
}

.container { max-width: 1320px; margin: 0 auto; padding: 24px; }
.page-actions {
    display: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 0;
    align-items: stretch;
    grid-auto-flow: row dense;
}
.tile-wall {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.tile-wall .lumia-tile {
    width: 100%;
    margin: 0;
    min-width: 0;
}
.lumia-tile {
    height: auto;
    min-height: 0;
    overflow: visible;
    perspective: none;
    background: transparent;
    border: 0;
}
.lumia-tile:hover {
    transform: none;
    box-shadow: none;
}
.tile-static {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--surface-2);
    border-radius: 2px;
    background: var(--media-bg);
}
.tile-static img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 46%;
    padding: 48px 16px 16px;
    color: #f8fafc;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, .7) 42%, rgba(2, 6, 23, .94));
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}
.lumia-tile .cat {
    font-size: .72rem;
    text-transform: uppercase;
    color: #7dd3fc;
    font-weight: 800;
    margin-bottom: 8px;
}
.lumia-tile h3 {
    margin: 0;
    font-size: clamp(.95rem, 1.02vw, 1.16rem);
    line-height: 1.22;
}
@keyframes returnHighlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
        outline-color: rgba(34, 197, 94, 0);
    }
    45%, 55% {
        box-shadow:
            0 0 0 2px rgba(34, 197, 94, .9),
            0 0 22px 6px rgba(34, 197, 94, .34),
            inset 0 0 22px rgba(34, 197, 94, .18);
        outline-color: rgba(34, 197, 94, .75);
    }
}
.return-highlight {
    position: relative;
    z-index: 3;
    outline: 2px solid rgba(34, 197, 94, 0);
    animation: returnHighlightPulse .72s ease-in-out 5;
}
@media (prefers-reduced-motion: reduce) {
    .return-highlight {
        animation: none;
        box-shadow: 0 0 0 2px rgba(34, 197, 94, .8), 0 0 18px rgba(34, 197, 94, .3);
    }
}
.day-section {
    margin-top: 30px;
}
.day-section:first-of-type {
    margin-top: 0;
}
.day-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 18px;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 800;
}
.day-heading::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--surface-2);
}
.date-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 28px;
}
.date-pagination-bottom {
    margin: 34px 0 0;
}
.date-pagination a,
.date-pagination span {
    border: 1px solid var(--surface-2);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}
.date-pagination span {
    color: var(--text);
    background: var(--surface);
}
.date-pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.tile-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}
.tile-layout:last-child {
    margin-bottom: 0;
}
.tile-slot {
    min-width: 0;
    display: flex;
}
.tile-slot > .card {
    width: 100%;
}
.layout-feature-left,
.layout-feature-right {
    grid-template-rows: repeat(2, minmax(0, 1fr));
}
.layout-feature-left .tile-slot-1 {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
}
.layout-feature-left .tile-slot-2 {
    grid-column: 3;
    grid-row: 1;
}
.layout-feature-left .tile-slot-3 {
    grid-column: 3;
    grid-row: 2;
}
.layout-feature-right .tile-slot-1 {
    grid-column: 1;
    grid-row: 1;
}
.layout-feature-right .tile-slot-2 {
    grid-column: 1;
    grid-row: 2;
}
.layout-feature-right .tile-slot-3 {
    grid-column: 2 / span 2;
    grid-row: 1 / span 2;
}
.layout-feature-left .tile-slot-1 .thumb,
.layout-feature-right .tile-slot-3 .thumb {
    aspect-ratio: 16 / 9;
    max-height: clamp(300px, 36vw, 520px);
}
.layout-feature-left .tile-slot-1 h3,
.layout-feature-right .tile-slot-3 h3 {
    font-size: 1.55rem;
}
.layout-small-row.layout-count-1 .tile-slot-1 {
    grid-column: 1 / -1;
}
.layout-small-row.layout-count-1 .card {
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    min-height: 280px;
}
.layout-small-row.layout-count-1 .card .thumb {
    height: 100%;
    min-height: 280px;
    aspect-ratio: auto;
}
.layout-small-row.layout-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
    background: var(--surface); border-radius: 2px; overflow: hidden;
    display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
    border: 1px solid var(--surface-2);
    cursor: pointer;
    height: 100%;
}
.hero-grid .card { min-width: 0; }
.hero-grid > .card:nth-child(8n + 1) {
    grid-column: 1 / span 2;
    grid-row: span 2;
}
.hero-grid > .card:nth-child(8n + 1) .thumb {
    aspect-ratio: 16 / 9;
}
.hero-grid > .card:nth-child(8n + 1) h3 {
    font-size: 1.55rem;
}
.hero-grid > .card:nth-child(8n + 7) {
    grid-column: 2 / span 2;
    grid-row: span 2;
}
.hero-grid > .card:nth-child(8n + 7) .thumb {
    aspect-ratio: 16 / 9;
}
.hero-grid > .card:nth-child(8n + 7) h3 {
    font-size: 1.55rem;
}
.card a, .card-link { display: contents; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.card .thumb {
    aspect-ratio: 16/10;
    background: var(--media-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.card video.thumb { width: 100%; object-fit: contain; display: block; border: 0; background: var(--media-bg); }
.tg-video-thumb,
.telegram-video-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--media-bg);
    color: var(--text);
    font-weight: 700;
}
.tg-video-thumb img {
    position: absolute;
    inset: 0;
}
.tg-video-thumb.has-poster::before,
.telegram-video-link.has-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, .08), rgba(2, 6, 23, .52));
}
.tg-video-thumb span,
.telegram-video-link span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, .82);
    border: 1px solid rgba(226, 232, 240, .24);
    border-radius: 999px;
    padding: 9px 15px;
}
.tg-video-thumb span::before,
.telegram-video-link span::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid currentColor;
}
.telegram-video-link {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid var(--surface-2);
}
.card .info { padding: 16px; flex: 0 0 auto; display: flex; flex-direction: column; }
.card .cat { font-size: .72rem; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.3; }
.card .excerpt { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .source-link { color: var(--accent); font-size: .82rem; font-weight: 700; margin-top: 8px; align-self: flex-start; }
.card .source-link:hover { color: var(--text); }
.card .meta { margin-top: 14px; padding-top: 0; font-size: .78rem; color: var(--muted); }
.tile-wall .lumia-tile.card {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}
.tile-wall .lumia-tile.card:hover {
    transform: none;
    box-shadow: none;
}
.live-insert {
    animation: liveSlideIn .28s ease-out;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, .35), 0 16px 34px rgba(0,0,0,.22);
}

@keyframes liveSlideIn {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-news-toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translate(-50%, -12px);
    width: min(620px, calc(100vw - 32px));
    z-index: 80;
    display: block;
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 18px 46px rgba(0,0,0,.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.live-news-toast.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.live-news-toast span {
    display: block;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.live-news-toast strong {
    display: block;
    color: var(--text);
    font-size: .98rem;
    line-height: 1.3;
}

@media (max-width: 960px) {
    .hero-grid,
    .tile-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tile-wall {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .layout-feature-left,
    .layout-feature-right {
        grid-template-rows: auto;
    }
    .layout-feature-left .tile-slot-1,
    .layout-feature-left .tile-slot-2,
    .layout-feature-left .tile-slot-3,
    .layout-feature-right .tile-slot-1,
    .layout-feature-right .tile-slot-2,
    .layout-feature-right .tile-slot-3 {
        grid-column: auto;
        grid-row: auto;
    }
    .hero-grid > .card:nth-child(8n + 1),
    .hero-grid > .card:nth-child(8n + 7) {
        grid-column: span 2;
        grid-row: span 1;
    }
    .nav { gap: 14px; }
}

@media (max-width: 760px) {
    .topbar {
        min-height: 58px;
        justify-content: flex-start;
        padding: 0;
    }
    .topbar-main {
        min-height: 58px;
        padding: 0 16px;
    }
    .header-actions {
        right: 16px;
    }
    .login-trigger {
        padding: 7px 10px;
        font-size: .82rem;
    }
    .menu-toggle {
        display: flex;
        position: absolute;
        left: 12px;
        top: 8px;
    }
    .logo {
        position: static;
        align-self: center;
        transform: none;
        padding: 10px 64px 0;
        font-size: 1.35rem;
        white-space: nowrap;
    }
    .logo-since {
        padding-bottom: 8px;
        font-size: .94rem;
    }
    .nav {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        background: var(--nav-bg);
        border-bottom: 1px solid transparent;
        box-shadow: 0 20px 36px rgba(0,0,0,.28);
        transition: max-height .22s ease, border-color .22s ease;
    }
    .nav.open {
        max-height: calc(100vh - 58px);
        overflow-y: auto;
        border-color: var(--surface-2);
    }
    .nav a {
        display: block;
        padding: 14px 18px;
        border-top: 1px solid var(--surface-2);
        font-size: 1rem;
        text-align: center;
        color: var(--text);
    }
    .nav a.active {
        color: var(--accent);
    }
    .nav a.nav-all-news, .nav a.nav-all-news.active {
        color: #ef4444;
        font-size: 1.2rem;
    }
    .container {
        padding: 16px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 28px;
    }
    .tile-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .tile-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }
    .layout-small-row.layout-count-1 .card {
        display: flex;
        min-height: 0;
    }
    .layout-small-row.layout-count-1 .card .thumb {
        height: auto;
        min-height: 0;
        aspect-ratio: 16/9;
    }
    .layout-small-row.layout-count-2 {
        grid-template-columns: 1fr;
    }
    .hero-grid > .card:nth-child(8n + 1),
    .hero-grid > .card:nth-child(8n + 7) {
        grid-column: auto;
        grid-row: auto;
    }
    .hero-grid > .card:nth-child(8n + 1) h3,
    .hero-grid > .card:nth-child(8n + 7) h3 {
        font-size: 1.2rem;
    }
    .card { border-radius: 2px; }
    .card .thumb {
        aspect-ratio: 16/9;
    }
    .card .info {
        padding: 14px;
    }
    .card h3,
    .vertical-list .card h3 {
        font-size: 1.05rem;
    }
    .card .excerpt {
        -webkit-line-clamp: 2;
    }
    .section-title {
        margin: 18px 0 14px;
    }
    .article-page h1 {
        font-size: 1.55rem;
    }
    .article-page .lead {
        font-size: 1rem;
    }
    .telegram-post-embed {
        min-height: 420px;
        border-radius: 2px;
    }
    .live-news-toast {
        top: 70px;
    }
}

@media (max-width: 520px) {
    .tile-wall {
        grid-template-columns: 1fr;
    }
}

.section-title { font-size: 1.4rem; font-weight: 700; margin: 32px 0 16px; border-left: 4px solid var(--accent); padding-left: 12px; }

.static-page {
    max-width: 980px;
}
.static-hero {
    padding: 42px 0 24px;
    border-bottom: 1px solid var(--surface-2);
}
.static-hero h1 {
    margin: 8px 0 14px;
    font-size: 2.4rem;
    line-height: 1.12;
}
.static-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 1.15rem;
}
.static-content {
    padding: 30px 0 12px;
    font-size: 1.02rem;
}
.static-content h2 {
    margin: 30px 0 10px;
    font-size: 1.35rem;
    line-height: 1.25;
}
.static-content p,
.static-content li {
    color: var(--text);
}
.static-content p {
    margin: 0 0 15px;
}
.static-content ol {
    margin: 0 0 18px;
    padding-left: 22px;
}
.static-content li {
    margin-bottom: 8px;
}
.site-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 36px 24px 40px;
    color: var(--muted);
    font-size: .85rem;
    text-align: center;
}
.footer-logo-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
}
.footer-logo {
    display: block;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}
.footer-logo span {
    color: var(--accent);
}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.site-footer a:hover {
    color: var(--accent);
}

.vertical-list { max-width: 980px; margin: 0 auto; }
.category-day-section {
    margin: 30px 0 0;
}
.category-day-section:first-child {
    margin-top: 0;
}
.vertical-list .day-heading {
    margin: 0 0 16px;
}
.vertical-list .card {
    display: block;
    margin-bottom: 18px;
    min-width: 0;
    height: auto;
}
.vertical-list .card .thumb {
    width: 260px;
    min-height: 168px;
    aspect-ratio: auto;
    flex-shrink: 0;
}
.vertical-list .card .thumb img {
    object-fit: cover;
}
.vertical-list .tg-video-thumb img {
    object-fit: cover;
}
.vertical-list .card .info {
    min-width: 0;
    padding: 18px 22px;
    overflow: visible;
}
.vertical-list .card h3 {
    font-size: 1.15rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    max-width: 100%;
}
.vertical-list .card .excerpt,
.vertical-list .card .source-link,
.vertical-list .card .meta {
    display: none;
}

.article-page h1 { font-size: 2.2rem; margin: 12px 0 20px; line-height: 1.2; }
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 10px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}
.breadcrumbs a {
    color: var(--muted);
}
.breadcrumbs a:hover {
    color: var(--accent);
}
.breadcrumbs span {
    color: var(--surface-2);
}
.article-page .lead { color: var(--muted); font-size: 1.15rem; margin-bottom: 24px; }
.article-page .body { font-size: 1.05rem; }
.article-page .body p { margin: 0 0 16px; }
.article-page .body blockquote {
    margin: 18px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    background: rgba(56, 189, 248, .08);
    color: var(--text);
}
.article-source-text {
    margin-top: 24px;
    color: var(--muted);
    font-size: .9rem;
}
.article-source-text span {
    display: block;
    margin-bottom: 4px;
}
.article-source-text code {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font: inherit;
}
.article-video {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 2px;
    margin: 20px 0;
    background: var(--media-bg);
}
.article-carousel {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 2px;
    background: var(--media-bg);
}
.article-carousel-track {
    position: relative;
}
.article-carousel-slide {
    display: none;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}
.article-carousel-slide.active {
    display: block;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 54px;
    border: 1px solid rgba(226, 232, 240, .35);
    background: rgba(15, 23, 42, .72);
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.carousel-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.telegram-post-embed {
    width: 100%;
    min-height: 560px;
    border: 0;
    border-radius: 2px;
    margin: 20px 0;
    background: #fff;
}
.timeline { margin: 40px 0; }
.timeline h2 { font-size: 1.4rem; margin-bottom: 20px; }
.timeline-item { display: flex; gap: 18px; margin-bottom: 24px; }
.timeline-marker { flex-shrink: 0; width: 60px; text-align: right; padding-top: 4px; }
.marker-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.marker-date { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--accent-2); color: #0f172a; padding: 3px 8px; border-radius: 4px; }
.timeline-content { flex: 1; background: var(--surface); border: 1px solid var(--surface-2); border-radius: 2px; padding: 16px; }
.timeline-link-card {
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.timeline-link-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.timeline-date { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.timeline-date span { color: var(--accent); }
.timeline-title { font-weight: 600; line-height: 1.35; margin-bottom: 8px; display: block; }
.timeline-source { font-size: .75rem; color: var(--muted); }
.timeline-item.fragment .marker-dot { background: var(--success); }
.timeline-item.date_marker .marker-dot { background: var(--accent-2); }

.muted { color: var(--muted); }

@media (max-width: 640px) {
    .timeline-marker { width: 40px; }
}

.admin { background: #fff; color: #111; }
.admin .topbar { background: #fff; border-bottom: 1px solid #e2e8f0; }
.admin-menu-toggle { display: none; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; font: inherit; font-weight: 700; padding: 8px 12px; cursor: pointer; }
.admin table { width: 100%; border-collapse: collapse; }
.admin th, .admin td { padding: 10px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: .9rem; }
.admin th { font-weight: 600; color: #475569; }
.admin .btn { background: #111; color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: .85rem; }
.admin .btn.secondary { background: #e2e8f0; color: #111; }
.admin form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 20px; }
.admin label { display: flex; flex-direction: column; font-size: .8rem; color: #475569; }
.admin input, .admin select, .admin textarea { padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: .9rem; min-width: 160px; }
.admin .card { background: #f8fafc; border: 1px solid #e2e8f0; color: #111; }
.admin .card strong { color: #111; }
.admin .card div { color: #475569; }
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}
.admin .admin-inline-form {
    margin: 0;
    display: flex;
    flex: 0 0 auto;
}
.admin-notice {
    border-radius: 6px;
    padding: 10px 12px;
    margin: 0 0 16px;
    font-size: .9rem;
}
.admin-notice.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.admin-notice.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.system-status {
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    padding: 14px;
    margin: 0 0 16px;
    color: #0f172a;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.system-status div {
    display: grid;
    gap: 4px;
}
.system-status span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.system-status strong {
    color: #0f172a;
    font-size: 1rem;
}
.system-status em {
    color: #475569;
    font-size: .84rem;
    font-style: normal;
}
.system-status .ok strong,
.system-status .ok em {
    color: #166534;
}
.system-status .error strong,
.system-status .error em {
    color: #991b1b;
}
.system-status .ok strong::before,
.system-status .error strong::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: 1px;
}
.system-status .ok strong::before {
    background: #22c55e;
}
.system-status .error strong::before {
    background: #ef4444;
}
.admin-status-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ai-provider-fields {
    display: none;
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
    padding-top: 12px;
}
.ai-provider-fields.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Article editor */
.article-editor { max-width: 1400px; }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.editor-form { display: block; }
.editor-meta { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.meta-grid label { color: #475569; }
.meta-grid input, .meta-grid select { width: 100%; }

.lang-tabs { display: flex; gap: 6px; margin-bottom: 0; border-bottom: 2px solid #e2e8f0; }
.lang-tab { background: #f1f5f9; border: 1px solid #e2e8f0; border-bottom: none; border-radius: 8px 8px 0 0; padding: 10px 18px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: #334155; }
.lang-tab.active { background: #fff; border-color: #cbd5e1 #cbd5e1 #fff; color: #0f172a; }
.lang-status { font-size: .75rem; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.lang-status.ok { background: #22c55e; color: #fff; }
.lang-status.missing { background: #ef4444; color: #fff; }

.lang-panels { background: #fff; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 12px 12px; padding: 20px; }
.lang-panel { display: none; }
.lang-panel.active { display: block; }

.editor-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.editor-main { min-width: 0; }
.editor-sidebar { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; }
.sidebar-section { display: flex; flex-direction: column; gap: 10px; }
.sidebar-section strong { color: #0f172a; font-size: 1rem; margin-bottom: 4px; }
.sidebar-section label { color: #475569; }
.sidebar-section input, .sidebar-section textarea { width: 100%; }

.editor-label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; color: #475569; font-size: .88rem; }
.editor-title { font-size: 1.35rem; font-weight: 600; padding: 12px; }
.editor-summary { min-height: 80px; }

.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-bottom: none; border-radius: 8px 8px 0 0; }
.tool-btn { background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: .82rem; color: #334155; }
.tool-btn:hover { background: #e2e8f0; }
.editor-tabs { display: flex; border-bottom: 1px solid #e2e8f0; }
.editor-tab { background: #f8fafc; border: none; padding: 8px 14px; cursor: pointer; font-size: .8rem; color: #64748b; }
.editor-tab.active { background: #fff; color: #0f172a; border-bottom: 2px solid var(--accent); }
.wysiwyg-wrap { border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 8px 8px; }
.wysiwyg { min-height: 400px; padding: 16px; outline: none; line-height: 1.7; color: #1e293b; }
.wysiwyg p { margin-bottom: 12px; }
.wysiwyg img { max-width: 100%; border-radius: 8px; display: block; margin: 12px 0; }
.wysiwyg blockquote { border-left: 4px solid var(--accent); margin: 12px 0; padding-left: 16px; color: #475569; }
.html-editor { display: none; width: 100%; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; border: none; resize: vertical; min-height: 400px; }
.html-editor.active { display: block; }
.wysiwyg.hidden { display: none; }

.editor-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.btn-primary { background: var(--accent); color: #0f172a; font-weight: 600; }
.btn.small { padding: 6px 10px; font-size: .75rem; }
.btn.btn-primary { background: #0f172a; color: #fff; }

@media (max-width: 900px) {
    .editor-columns { grid-template-columns: 1fr; }
    .editor-toolbar .tool-btn { padding: 6px; font-size: .7rem; }
}

@media (max-width: 760px), (max-device-width: 760px) {
    body.admin { font-size: 17px; line-height: 1.6; }
    .admin .topbar { position: sticky; top: 0; z-index: 100; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 58px; }
    .admin .topbar > .logo { padding: 0 16px; font-size: 1.2rem; }
    .admin-menu-toggle { display: inline-flex; align-items: center; min-height: 40px; margin-right: 16px; }
    .admin .admin-nav { display: none; grid-column: 1 / -1; width: 100%; max-height: none; padding: 6px 12px 12px; overflow: visible; box-shadow: none; border-top: 1px solid #e2e8f0; background: #fff; }
    .admin .admin-nav.open { display: grid; grid-template-columns: 1fr; max-height: none; }
    .admin .admin-nav a { min-width: 0; min-height: 50px; padding: 12px 10px; border: 0; border-radius: 6px; font-size: 1rem; text-align: center; color: #334155; }
    .admin .admin-nav a.active { background: #e2e8f0; color: #0f172a; }
    .admin .container { padding: 16px; overflow-x: hidden; }
    .admin h2 { margin-top: 4px; font-size: 1.65rem; }
    .admin .container > form:not(.editor-form) { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 12px; }
    .admin .container > form:not(.editor-form) > label { width: 100%; }
    .admin input, .admin select, .admin textarea { width: 100%; min-width: 0; min-height: 42px; font-size: 16px; }
    .admin label { font-size: .95rem; }
    .admin input[type="checkbox"] { width: auto; min-height: 0; }
    .admin .btn { min-height: 46px; font-size: 1rem; }
    .admin table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .admin th, .admin td { padding: 10px 11px; font-size: .95rem; }
    .admin-section-header, .editor-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .admin .admin-inline-form { display: flex; width: 100%; }
    .admin .admin-inline-form .btn { width: 100%; }
    .system-status, .analytics-grid { grid-template-columns: 1fr !important; }
    .system-status span { font-size: .85rem; }
    .system-status strong { font-size: 1.1rem; }
    .system-status em { font-size: .95rem; }
    .meta-grid { grid-template-columns: 1fr; }
    .editor-meta, .editor-sidebar { padding: 12px; border-radius: 8px; }
    .wysiwyg, .html-editor { min-height: 280px; padding: 12px; }
    .editor-actions { flex-direction: column; gap: 8px; }
    .editor-actions .btn { width: 100%; }
}
