:root {
    --primary: #274994;
    --ink: #212529;
    --muted: #5c6570;
    --line: #e4e7ee;
    --paper: #f6f7fb;
    --card: #ffffff;
    --gold: #e4b23c;
    --danger: #9d2c2c;
    --ok: #1f7a4d;
    --shadow: 0 10px 30px rgba(22, 32, 68, 0.08);
    --font: "Noto Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.sr-only, .skip {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.skip:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    clip: auto;
    background: white;
    padding: 0.5rem 0.8rem;
    z-index: 20;
}
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.utility {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.5px),
        #274994;
    background-size: 18px 18px, 22px 22px, auto;
    color: white;
}
.mirror-banner {
    background: #fff5d6;
    border-bottom: 1px solid #f0df9e;
    padding: 0.55rem 0;
    font-size: 0.9rem;
}
.mirror-banner a { color: var(--primary); }
.utility-inner, .masthead-inner, .utility-tools, .brand, .socials, .search, .meta, .toolbar, .filters, .pager, .admin-top, .pin-list li, .inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.utility-inner, .masthead-inner, .admin-top, .pager { justify-content: space-between; }
.utility-inner { min-height: 46px; }
.today { margin: 0; font-size: 0.92rem; display: flex; align-items: center; gap: 0.45rem; }
.utility svg, .masthead svg, .topic-nav svg, .share-rail svg { width: 16px; height: 16px; max-width: 16px; flex: none; }
.socials a svg, .socials span svg { width: 13px; height: 13px; max-width: 13px; }
.socials { list-style: none; margin: 0; padding: 0; gap: 0.4rem; }
.socials a, .socials span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #111;
    color: white;
    text-decoration: none;
}
.socials svg { width: 13px; height: 13px; display: block; }
.social-youtube a, .social-youtube span { background: #ff0033; }
.social-telegram a, .social-telegram span { background: #2aa4e0; }
.social-rss a, .social-rss span { background: #f26522; }
.social-instagram a, .social-instagram span { background: radial-gradient(circle at 30% 30%, #f9ce34, #ee2a7b 55%, #6228d7); }
.social-x a, .social-x span { background: #111; }
.social-facebook a, .social-facebook span { background: #1877f2; }
.search input, .stack input, .stack textarea, .stack select, .inline select {
    border: 1px solid #cfd5e2;
    border-radius: 999px;
    background: white;
    padding: 0.45rem 0.8rem;
}
.search input { width: 180px; }
.search button, .stack button, .button, .more, .cookie button, .admin-side button, .actions button, .pin-list button, .inline button {
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    padding: 0.45rem 0.9rem;
    text-decoration: none;
    cursor: pointer;
}
.search button { background: white; color: var(--primary); }
.masthead { background: white; border-bottom: 1px solid #edf0f5; }
.masthead-inner { min-height: 74px; gap: 1rem; flex-wrap: nowrap; }
.masthead-tools { display: flex; align-items: center; gap: 0.65rem; margin-left: auto; }
.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #d5dbe8;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    color: #5c6578;
    font-size: 0.86rem;
}
.lang-pill svg, .icon-btn svg { width: 16px; height: 16px; }
.icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5d6780;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}
.header-search input { width: 160px; border-radius: 999px; }
.brand { text-decoration: none; gap: 0.55rem; min-width: max-content; margin-left: 0.4rem; }
.brand img { width: 168px; height: auto; max-height: 48px; object-fit: contain; }
.brand-lines { line-height: 1.05; }
.brand-title { display: block; font-size: 0.72rem; letter-spacing: 0.02em; color: #243e86; }
.brand-sub { display: block; color: #243e86; font-weight: 700; font-size: 0.95rem; }
.brand small { color: var(--muted); }
.source-link { margin-top: 1rem; font-weight: 600; }
.source-link a { color: var(--primary); }
.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, #ffffff, var(--primary) 58%);
    color: white;
    border: 2px solid var(--gold);
    font-weight: 700;
    font-size: 1.3rem;
}
.main-nav { display: flex; gap: 0.1rem; flex-wrap: nowrap; align-items: center; min-width: 0; }
.nav-item { display: flex; align-items: center; }
.main-nav > a, .nav-item > a {
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    color: #243e86;
    padding: 0 0.7rem;
    height: 64px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-bottom: 0;
    position: relative;
}
.main-nav > a.is-active::after, .nav-item > a.is-active::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0;
    height: 2px;
    background: #274994;
}
.main-nav > a:hover, .nav-item > a:hover { color: #152a66; }
.topic-nav { background: white; border-bottom: 1px solid #edf0f5; }
.topic-nav-inner { display: flex; flex-wrap: nowrap; gap: 0.35rem 0.7rem; min-height: 46px; align-items: center; }
.topic-home { display: grid; place-items: center; color: #274994; padding: 0; }
.topic-home svg { width: 18px; height: 18px; }
.topic-sep { color: #c5cad3; font-weight: 400; }
.topic-nav a { text-decoration: none; font-weight: 500; font-size: 14.5px; color: #2c3340; padding: 0.35rem 0; border-bottom: 0; }
.topic-nav a.is-active, .topic-nav a:hover { color: #274994; }
.topic-menu {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    display: grid;
    gap: 5px;
    align-content: center;
    justify-items: center;
    cursor: pointer;
    padding: 0;
}
.topic-menu span { display: block; width: 18px; height: 2px; background: #2c3340; border-radius: 2px; }
.section-drawer { background: white; border-bottom: 1px solid var(--line); }
.section-drawer-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem 1.5rem; padding: 1rem 0 1.2rem; }
.section-drawer a { display: block; text-decoration: none; color: #243e86; padding: 0.2rem 0; font-size: 0.92rem; }
.nav-item { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.4rem;
    z-index: 5;
}
.dropdown a { display: block; text-decoration: none; padding: 0.45rem 0.6rem; border-radius: 8px; }
.dropdown a:hover { background: var(--paper); }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }

.home, .page { padding: 1.4rem 0 3rem; }
.hero-block { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.page .slideshow { margin-bottom: 1.4rem; }
.slideshow { background: #f7f8fb; border-radius: 12px; padding: 0.6rem 0.6rem 0.9rem; }
.slideshow-frame { position: relative; overflow: hidden; container-type: inline-size; }
.slideshow-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.slide { display: block; flex: 0 0 100%; min-width: 100%; width: 100%; }
@media (prefers-reduced-motion: reduce) {
    .slideshow-track { transition: none; }
}
.slide-media { position: relative; display: block; }
.slide-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f7f8fb; }
.slide-copy { padding: 0.85rem 0.4rem 0.2rem; }
.slide-copy h2 { font-size: 1.35rem; line-height: 1.35; margin: 0 0 0.35rem; font-weight: 600; }
.slide-copy h2 a { text-decoration: none; }
.slide-copy p { margin: 0 0 0.45rem; color: #3d4553; }
.slide-arrow {
    position: absolute;
    top: calc(100cqw * 9 / 32);
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #8b93a3;
    box-shadow: 0 2px 10px rgba(20, 30, 60, 0.12);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.slide-prev { left: 0.6rem; }
.slide-next { right: 0.6rem; }
.slide-dots { display: flex; justify-content: center; gap: 0.45rem; padding-top: 0.35rem; }
.slide-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #c5cad6;
    cursor: pointer;
}
.slide-dots button.is-active { background: #274994; }
.hero-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem; }
.section-title {
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border-bottom: 1px solid #d5dbe8;
    padding-bottom: 0.35rem;
    margin: 2rem 0 1rem;
}
.section-title span { border-bottom: 3px solid var(--primary); padding-bottom: 0.35rem; }
.section-title a { text-decoration: none; }
.split-block { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 1.5rem; }
.row-grid, .video-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.4rem 1.2rem; }
.tile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.story, .slideshow { min-width: 0; }
.story-media { position: relative; display: block; }
.story-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #d9dfec; }
.story-lead .story-media img { aspect-ratio: 16 / 10; }
.story-side .story-media img, .story-tile .story-media img, .story-video .story-media img { aspect-ratio: 16 / 10; }
.story-row { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr); gap: 0.8rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.story-row .story-media img { aspect-ratio: 4 / 3; }
.story-list { display: grid; grid-template-columns: minmax(0, 92px) minmax(0, 1fr); gap: 0.7rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.story-list .story-media img { aspect-ratio: 1; }
.story h2, .story h3 { font-size: 1.05rem; line-height: 1.3; margin-bottom: 0.3rem; }
.story-lead h2 { font-size: 1.7rem; }
.story h2 a, .story h3 a { text-decoration: none; }
.story h2 a:hover, .story h3 a:hover { color: var(--primary); }
.story-copy p { color: var(--muted); margin-bottom: 0.35rem; }
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    padding: 0.12rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
}
.play::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 14px;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent var(--primary);
}
.meta { color: var(--muted); font-size: 0.86rem; gap: 0.8rem; flex-wrap: wrap; margin: 0; }
.meta time::before { content: "◷ "; }
.more { display: inline-flex; margin-top: 1rem; background: #eceff5; color: var(--ink); }
.kicker { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82rem; }
.kicker a { color: var(--primary); }
.empty { color: var(--muted); }
.article { background: white; margin: 0 auto 2.5rem; padding: 1.4rem 0 2rem; border-radius: 0; max-width: 980px; }
.article h1 { font-size: clamp(1.7rem, 3vw, 2.15rem); line-height: 1.25; margin: 0.35rem 0 0.8rem; font-weight: 700; }
.article-hero { width: 100%; border-radius: 0; max-height: 480px; object-fit: cover; margin: 0 0 1.4rem; }
.article-video { width: 100%; border-radius: 12px; margin-bottom: 1rem; background: black; }
.article-read { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 1.5rem; align-items: start; min-width: 0; }
.article-body { position: relative; font-size: 1.05rem; line-height: 1.75; color: #2a3140; padding-left: 1.7rem; }
.article-body::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d7deee;
}
.read-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: #274994;
    max-height: 100%;
}
.article-body p { position: relative; margin: 0 0 1.15rem; }
.article-body p::before {
    content: "";
    position: absolute;
    left: -1.7rem;
    top: 0.55em;
    width: 8px;
    height: 8px;
    margin-left: -3px;
    border-radius: 50%;
    background: #c5cde0;
    box-shadow: 0 0 0 3px #fff;
}
.article-body p.is-read::before { background: #274994; }
.article-body a { color: var(--primary); }
.share-rail {
    position: sticky;
    top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #8b93a7;
}
.share-rail p { margin: 0; display: flex; align-items: center; gap: 0.25rem; font-size: 0.82rem; }
.share-rail svg { width: 16px; height: 16px; }
.share-rail a {
    width: 36px;
    height: 36px;
    border: 1px solid #e3e7f0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #8b93a7;
    background: #fff;
    text-decoration: none;
}
.share-rail a:hover { color: #274994; border-color: #c9d2e8; }
.comments { background: white; margin: 1rem auto 3rem; padding: 1.2rem 1.4rem 1.6rem; border-radius: 16px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.hint { color: var(--muted); font-size: 0.92rem; }
.pager { margin-top: 1.2rem; }
.site-footer { background: #17233f; color: white; padding: 2rem 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.site-footer a { color: white; }
.site-footer h2 { font-size: 0.95rem; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.3rem 0; }
.cookie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 8vw;
    z-index: 10;
}
.cookie[hidden] { display: none !important; }
.cookie p { margin: 0; }
.cookie button { background: white; color: var(--primary); font-weight: 700; }
.flash { padding: 0.7rem 0.9rem; border-radius: 10px; background: #e7f6ee; color: var(--ok); }
.flash-error { background: #fdecec; color: var(--danger); }

.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(180deg, var(--primary), #10182e 70%); }
.auth-card { width: min(440px, calc(100% - 32px)); background: white; border-radius: 18px; padding: 1.4rem; }
.auth-card h1 { font-size: 1.5rem; }
.stack { display: grid; gap: 0.75rem; }
.stack label, .check { display: grid; gap: 0.3rem; font-weight: 600; }
.check { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.stack input, .stack textarea, .stack select { border-radius: 10px; width: 100%; }
.stack button, .button { justify-self: start; }
fieldset { border: 1px solid var(--line); border-radius: 12px; }
.errors { color: var(--danger); }

.admin-body { background: #eef1f6; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: #17233f; color: white; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-side .brand, .admin-side .brand small { color: white; }
.admin-side nav { display: grid; gap: 0.25rem; }
.admin-side nav a { color: white; text-decoration: none; padding: 0.45rem 0.6rem; border-radius: 8px; }
.admin-side nav a.is-active, .admin-side nav a:hover { background: rgba(255, 255, 255, 0.12); }
.admin-side .linkish { background: transparent; color: white; padding-left: 0; }
.admin-main { padding: 1.3rem 1.5rem 3rem; }
.admin-top h1 { margin: 0; font-size: 1.6rem; }
.admin-top p { margin: 0; color: var(--muted); }
.panel { background: white; border-radius: 14px; padding: 1rem; margin: 1rem 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0; }
.stat { background: white; border-radius: 14px; padding: 0.9rem 1rem; text-decoration: none; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.7rem; }
.stat span { color: var(--muted); }
.grid { width: 100%; border-collapse: collapse; background: white; border-radius: 14px; overflow: hidden; }
.grid th, .grid td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { font-size: 0.82rem; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.actions form, .pin-list form { margin: 0; }
.actions a { color: var(--primary); }
.status { text-transform: capitalize; font-size: 0.82rem; font-weight: 700; }
.status-published { color: var(--ok); }
.status-in_review { color: #8a5a00; }
.status-draft { color: var(--muted); }
.status-archived { color: var(--danger); }
.filters { gap: 0.4rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.filters a { text-decoration: none; padding: 0.3rem 0.7rem; border-radius: 999px; background: white; }
.filters a.is-active { background: var(--primary); color: white; }
.toolbar { justify-content: space-between; align-items: end; }
.preview { width: 180px; height: 120px; object-fit: cover; border-radius: 10px; }
.danger { background: var(--danger); }
.pin-list { list-style: none; padding: 0; }
.pin-list li { justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--line); padding: 0.45rem 0; }
.pin-list .actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.bars { list-style: none; padding: 0; }
.bars li { display: grid; grid-template-columns: 70px 1fr 40px; gap: 0.6rem; align-items: center; margin: 0.35rem 0; }
.bar { display: block; height: 10px; width: var(--w); background: var(--primary); border-radius: 999px; }
.search-page { margin-bottom: 1rem; }
.search-page input { width: min(420px, 100%); border-radius: 10px; }

html.theme-dark body { background: #12151c; color: #e8eaf0; }
html.theme-dark .masthead, html.theme-dark .topic-nav, html.theme-dark .article, html.theme-dark .section-drawer { background: #1b2030; color: #e8eaf0; }
html.theme-dark .main-nav > a, html.theme-dark .nav-item > a, html.theme-dark .topic-nav a, html.theme-dark .brand-title, html.theme-dark .brand-sub { color: #d5def5; }
html.theme-dark .article-body { color: #e8eaf0; }
html.theme-dark .article-body p::before { box-shadow: 0 0 0 3px #1b2030; }

@media (max-width: 900px) {
    .masthead-inner { flex-wrap: wrap; padding: 0.8rem 0; }
    .masthead-tools { width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: flex-end; }
    .brand img { width: 132px; }
    .main-nav { display: none; }
    .topic-nav-inner { flex-wrap: wrap; row-gap: 0.15rem; }
    .topic-nav a, .topic-sep { white-space: nowrap; }
    .section-drawer-inner { grid-template-columns: 1fr 1fr; }
    .article-read { grid-template-columns: minmax(0, 1fr); }
    .share-rail { position: static; flex-direction: row; flex-wrap: wrap; }
    .hero-block, .split-block, .footer-grid, .admin-shell, .stat-grid,
    .hero-side, .row-grid, .video-grid, .tile-grid { grid-template-columns: minmax(0, 1fr); }
    .utility-inner { align-items: flex-start; flex-direction: column; padding: 0.6rem 0; }
    .socials { flex-wrap: wrap; }
    .search input { width: min(140px, 100%); }
    .cookie { flex-direction: column; align-items: flex-start; }
}
