* { box-sizing: border-box; }

:root {
    --bg: #edf1f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe3ef;
    --primary: #0f4ed8;
    --primary-soft: #e8efff;
    --accent: #111827;
    --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(219, 234, 254, 0.9), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
}

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

img {
    max-width: 100%;
}

.container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(219, 227, 239, 0.9);
}

.topbar {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    letter-spacing: 0.03em;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.masthead {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 14px;
}

.brand,
.footer-brand {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.brand span,
.footer-brand span {
    color: var(--primary);
}

.masthead-subtitle,
.footer-text {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
}

.masthead-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.nav-shell {
    padding-bottom: 14px;
}

.category-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}
.chip.active,
.chip:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: transparent;
}

.home-shell,
.article-shell,
.static-shell {
    padding: 26px 0 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 22px;
    margin-bottom: 28px;
}

.hero-main {
    display: block;
    position: relative;
    min-height: 540px;
    border-radius: 30px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.hero-main img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 18%, rgba(15, 23, 42, 0.85) 100%);
}

.hero-content {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 30px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-main h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-main p {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.hero-side,
.side-card,
.feature-card,
.news-card,
.stream-item,
.static-card,
.portal-article-card {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, 0.92);
    box-shadow: var(--shadow);
}

.hero-side {
    border-radius: 26px;
    padding: 18px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.block-heading,
.section-title {
    margin: 0;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.headline-card {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    transition: background 0.18s ease;
}

.headline-card:hover {
    background: #f8fbff;
}

.headline-card img {
    width: 126px;
    height: 110px;
    border-radius: 16px;
    object-fit: cover;
    background: #e5e7eb;
}

.headline-meta,
.news-meta,
.card-kicker,
.post-breadcrumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.headline-card h2 {
    margin: 6px 0 8px;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.headline-card span,
.news-footer,
.related-item span,
.post-note,
.footer-bottom {
    color: var(--muted);
    font-size: 14px;
}

.section-block {
    margin-bottom: 30px;
}

.editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
}

.feature-card,
.news-card,
.stream-item,
.portal-article-card,
.static-card {
    border-radius: 28px;
    overflow: hidden;
}

.feature-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.feature-body,
.news-body,
.static-card {
    padding: 22px;
}

.feature-body h3,
.news-body h3,
.stream-body h3,
.static-card h1,
.portal-article-card h1 {
    margin: 12px 0 12px;
    letter-spacing: -0.05em;
}

.feature-body h3,
.portal-article-card h1 {
    font-size: clamp(34px, 4vw, 54px);
    line-height: 0.97;
}

.news-body h3,
.stream-body h3 {
    font-size: 28px;
    line-height: 1.04;
}

.feature-body p,
.news-body p,
.stream-body p,
.static-card p,
.portal-article-card p,
.portal-article-card li {
    color: #334155;
    line-height: 1.72;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    padding: 8px 10px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.news-footer a,
.source-link,
.side-link {
    color: var(--primary);
    font-weight: 800;
}

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

.news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.news-card.compact .news-body h3 {
    font-size: 22px;
}

.news-stream {
    display: grid;
    gap: 18px;
}

.stream-item {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.stream-thumb img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.stream-body {
    padding: 22px;
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.portal-article-card {
    padding: 28px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 14px;
}

.article-lead {
    margin: 0 0 20px;
    color: #334155;
    font-size: 21px;
    line-height: 1.7;
}

.article-cover {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    border-radius: 22px;
    display: block;
    margin-bottom: 24px;
}

.article-content {
    font-size: 20px;
    line-height: 1.82;
    color: #0f172a;
}

.article-content p {
    margin: 0 0 20px;
}

.article-sidebar {
    display: grid;
    gap: 18px;
    align-self: start;
    position: sticky;
    top: 150px;
}

.side-card {
    border-radius: 24px;
    padding: 20px;
}

.side-card h3 {
    margin: 0 0 14px;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 96px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
    background: #e2e8f0;
}

.related-item strong {
    display: block;
    line-height: 1.28;
    margin-bottom: 4px;
}

.static-card {
    padding: 34px;
    max-width: 900px;
}

.static-card h1 {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 0.98;
}

.static-list {
    padding-left: 18px;
    color: #334155;
    line-height: 1.8;
}

.site-footer {
    margin-top: 10px;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.92);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    padding: 34px 0 22px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
    justify-content: end;
}

.footer-links a {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 28px;
}

.empty-state {
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.empty-state code {
    display: inline-block;
    margin-top: 8px;
    background: #eff6ff;
    padding: 8px 10px;
    border-radius: 10px;
}

.admin-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 24px auto 50px;
}

.admin-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-header h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.04em;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 8px;
}

.status-dot.is-on { background: #10b981; }
.status-dot.is-off { background: #94a3b8; }

.form-card {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

.form-card label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--text);
    border-radius: 16px;
    padding: 13px 14px;
    font: inherit;
}

.textarea {
    min-height: 340px;
    resize: vertical;
}

.textarea.small {
    min-height: 120px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    padding: 14px 18px;
    border-radius: 16px;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .hero-grid,
    .editorial-grid,
    .article-shell,
    .stream-item {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }

    .stream-thumb img {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .container,
    .admin-shell {
        width: min(100%, calc(100% - 20px));
    }

    .topbar {
        display: none;
    }

    .masthead {
        align-items: start;
        padding: 18px 0 12px;
    }

    .brand,
    .footer-brand {
        font-size: 28px;
    }

    .masthead-subtitle {
        font-size: 14px;
    }

    .masthead-meta {
        display: none;
    }

    .hero-main {
        min-height: 380px;
        border-radius: 24px;
    }

    .hero-main img {
        height: 380px;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .hero-main h1,
    .feature-body h3,
    .portal-article-card h1,
    .static-card h1 {
        font-size: 34px;
    }

    .hero-main p,
    .article-lead,
    .article-content,
    .feature-body p,
    .news-body p,
    .stream-body p,
    .static-card p,
    .portal-article-card p,
    .portal-article-card li {
        font-size: 17px;
    }

    .headline-card {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
    }

    .headline-card img {
        width: 104px;
        height: 94px;
    }

    .headline-card h2,
    .news-body h3,
    .stream-body h3 {
        font-size: 22px;
    }

    .mini-grid,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-card img,
    .news-card img,
    .stream-thumb img {
        height: 220px;
        min-height: 220px;
    }

    .feature-body,
    .news-body,
    .stream-body,
    .portal-article-card,
    .static-card {
        padding: 18px;
    }

    .footer-links {
        justify-content: start;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
