:root {
    --text: #e5e7eb;
    --muted: #94a3b8;
    --line: #1e293b;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.92);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --accent: #93c5fd;
    --danger: #dc2626;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.26);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: #020617;
    min-height: 100vh;
}

a {
    color: inherit;
}

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

.dark-body {
    background: #020617;
    color: var(--text);
}

.site-header,
.dark-header {
    background: linear-gradient(135deg, #020617, #172554, #581c87);
    color: white;
}

.site-header {
    padding: 44px 0 28px;
}

.archive-header {
    padding: 44px 0 24px;
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.portal-card,
.empty-state,
.card {
    backdrop-filter: blur(14px);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}

.hero-copy {
    padding: 40px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 14px;
}

.hero-copy h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
}

.hero-text,
.section-heading p,
.card-title,
.card-meta,
.empty-state p,
.hero-stat span,
.publication-card p,
.home-hero p {
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-panel {
    padding: 28px;
    display: grid;
    gap: 16px;
    align-content: center;
}

.hero-stat {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    border-radius: var(--radius-lg);
    padding: 18px;
}

.hero-stat span,
.card-meta {
    display: block;
    font-size: 14px;
}

.hero-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0 0 12px;
}

.nav-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.nav-list a,
.btn {
    text-decoration: none;
}

.nav-list a {
    white-space: nowrap;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #dbeafe;
    font-weight: 700;
}

.section-stack {
    padding: 36px 0 48px;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 12px;
}

.card-grid,
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.cards {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 18px 40px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.portal-card,
.card {
    padding: 22px;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-badge,
.status-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
}

.card-badge {
    background: rgba(124, 58, 237, 0.18);
    color: #d8b4fe;
}

.status-pill.live {
    background: rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
}

.status-pill.muted {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.portal-card h3,
.card h3 {
    margin: 18px 0 10px;
    font-size: 24px;
}

.pdf-thumb {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    border-radius: 14px;
    color: white;
    font-size: 34px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    margin-bottom: 14px;
}

.thumb-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-top: 16px;
    margin-bottom: 14px;
}

.brand-thumb {
    width: 100%;
    height: 220px;
    margin-top: 16px;
    margin-bottom: 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 30, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.small-link {
    display: block;
    margin-top: 10px;
    color: #93c5fd;
    font-weight: 700;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn-secondary {
    background: #fff4d8;
    color: #8a5200;
}

.premium-home {
    background: radial-gradient(circle at top, #1e3a8a, #020617 60%);
    color: white;
}

.top-nav {
    max-width: 1200px;
    margin: auto;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav strong {
    font-size: 24px;
    color: #93c5fd;
}

.top-nav a {
    color: white;
    text-decoration: none;
    margin-left: 14px;
    font-size: 14px;
}

.home-hero {
    text-align: center;
    padding: 65px 15px 85px;
}

.home-hero h1 {
    font-size: 44px;
    margin: 0;
}

.banner-grid {
    max-width: 1150px;
    margin: -45px auto 30px;
    padding: 0 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.banner-card {
    position: relative;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .35);
    background: #0f172a;
}

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

.banner-card span {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, .65);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
}

.ad-box {
    max-width: 1000px;
    margin: 25px auto;
    padding: 0 15px;
}

.ad-box img {
    width: 100%;
    border-radius: 16px;
    display: block;
}

.section-title {
    text-align: center;
    padding: 20px 15px;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.contact-strip {
    padding: 32px 16px 24px;
    text-align: center;
}

.contact-strip .container,
.contact-card {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #1e293b;
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.contact-card h2,
.contact-strip h2 {
    margin-top: 0;
}

.contact-card p,
.contact-strip p {
    color: #cbd5e1;
}

.site-footer {
    padding: 22px 15px 90px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.publication-card {
    transition: .25s;
}

.publication-card:hover {
    transform: translateY(-5px);
}

.fixed-card {
    min-height: 470px;
    display: flex;
    flex-direction: column;
}

.card-snippet {
    min-height: 52px;
    color: #cbd5e1;
    line-height: 1.5;
}

.card-date {
    min-height: 24px;
    color: #93c5fd;
    font-size: 14px;
}

.card-actions {
    margin-top: auto;
}

.search-box {
    max-width: 700px;
    margin: 25px auto;
    padding: 0 15px;
    display: flex;
    gap: 10px;
}

.search-box input,
.search-box button {
    min-height: 46px;
}

.search-box input {
    flex: 1;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
}

.search-box button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
}

.reader-top {
    min-height: 58px;
    background: #020617;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid #1e293b;
    gap: 16px;
}

.reader-top a {
    color: white;
    text-decoration: none;
}

.reader-top strong {
    flex: 1;
    text-align: center;
}

.reader-controls {
    background: #0f172a;
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
}

.reader-controls button,
.reader-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 13px;
    border-radius: 8px;
}

.native-reader-wrap {
    width: min(96%, 1200px);
    margin: 20px auto 100px;
}

.native-reader {
    display: block;
    width: 100%;
    height: calc(100vh - 170px);
    min-height: 620px;
    border: 1px solid #1e293b;
    border-radius: 18px;
    background: white;
}

.reader-fallback-note {
    margin-top: 14px;
    color: #cbd5e1;
    text-align: center;
}

.reader-ad-box {
    margin-top: 0;
}

.pagination {
    text-align: center;
    margin: 25px 0 90px;
}

.pagination a {
    display: inline-block;
    padding: 9px 13px;
    margin: 3px;
    background: #1e293b;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.pagination a.active {
    background: #2563eb;
}

.mobile-bottom-menu {
    display: none;
}

.empty-state {
    padding: 32px;
    text-align: center;
}

@media (max-width: 900px) {
    .hero-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    .top-nav {
        display: block;
        text-align: center;
    }

    .top-nav div {
        margin-top: 12px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .top-nav a {
        display: inline-block;
        margin: 6px;
    }

    .home-hero h1 {
        font-size: 30px;
    }

    .home-hero {
        padding: 45px 15px 65px;
    }

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

@media (max-width: 640px) {
    .hero-copy,
    .hero-panel,
    .portal-card,
    .card {
        padding: 20px;
    }

    .hero-copy h1,
    .section-heading h2 {
        line-height: 1.05;
    }

    .nav-list {
        border-radius: 20px;
    }

    .mobile-bottom-menu {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #020617;
        border-top: 1px solid #1e293b;
        z-index: 99;
        overflow-x: auto;
    }

    .mobile-bottom-menu a {
        min-width: 90px;
        flex: 1;
        color: white;
        text-decoration: none;
        text-align: center;
        padding: 8px 5px;
        font-size: 11px;
    }

    .mobile-bottom-menu span {
        display: block;
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .reader-top {
        height: auto;
        padding: 12px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .reader-top strong {
        font-size: 13px;
        text-align: left;
        order: 3;
        width: 100%;
    }

    .native-reader-wrap {
        width: 100%;
        margin: 12px 0 100px;
        padding: 0 12px;
    }

    .native-reader {
        min-height: 72vh;
        height: 72vh;
    }
}
