:root {
    --bg: #f3f5f8;
    --header-bg: #06142f;
    --header-bg-2: #0a2146;
    --text: #122038;
    --muted: #5a6981;
    --line: #d8e0ec;
    --card: #ffffff;
    --primary: #1f64ff;
    --primary-2: #0ea5ff;
    --success-bg: #eaf8ef;
    --success-line: #b6e0c3;
    --warn-bg: #fff8e8;
    --warn-line: #f1d69b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--header-bg), var(--header-bg-2));
    border-bottom: 1px solid #163566;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.3px;
}
.brand span { color: #35a5ff; }

.menu-toggle {
    display: none;
    border: 1px solid #2f4f85;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-nav a {
    color: #e2ecff;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
}

.page-shell {
    max-width: 1280px;
    margin: 20px auto 30px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.content-area,
.sidebar .widget,
.hub-card,
.footer-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.content-area {
    padding: 18px;
    box-shadow: 0 4px 22px rgba(16, 37, 74, 0.06);
}

.article-content {
    max-width: 880px;
}

.breadcrumb {
    color: #6b778b;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #2d6df4, #2293ff);
    color: #fff;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

h1, h2, h3 {
    color: #0d1f3c;
    line-height: 1.25;
    letter-spacing: -0.1px;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3.1vw, 3.15rem);
}

h2 {
    margin: 28px 0 12px;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
}

h3 {
    margin: 14px 0 8px;
    font-size: 1.14rem;
}

p {
    margin: 0 0 13px;
    color: #243754;
    font-size: 1.04rem;
}

.lead {
    color: #1c3152;
    font-size: 1.17rem;
    max-width: 920px;
}

.meta-row {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 14px 0;
    padding: 10px 0;
}

.author { font-size: 0.9rem; color: #5e708e; }

.social {
    display: flex;
    gap: 8px;
    align-items: center;
}
.social span {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}
.s-fb { background: #1877f2; }
.s-x { background: #111; }
.s-pi { background: #d01941; }
.s-wa { background: #22b060; }

.hero {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d5dfec;
    display: block;
    max-height: 430px;
    object-fit: cover;
    margin: 12px 0 14px;
}

.ad-slot {
    border: 1px solid #d3dce9;
    border-radius: 8px;
    background: #fdfefe;
    min-height: 96px;
    display: grid;
    place-items: center;
    margin: 16px 0;
    color: #7f8ba3;
    font-weight: 700;
    text-align: center;
    padding: 12px;
}

.ad-slot--title {
    margin-top: 10px;
}

.ad-slot--after-image {
    margin-top: 4px;
}

.ad-slot--in-content {
    margin: 18px 0 16px;
}

.ad-slot--sidebar {
    min-height: 250px;
}

.auto-toc {
    margin: 16px 0 20px;
    border: 1px solid #c2d5f7;
    border-radius: 8px;
    background: #f4f8ff;
    padding: 14px;
}

.auto-toc h2 {
    margin: 0 0 10px;
    font-size: 1.04rem;
    color: #1952c8;
}

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

.toc-columns ol {
    margin: 0;
    padding-left: 18px;
}
.toc-columns li { margin: 4px 0; }
.toc-columns a {
    color: #2f61c6;
    font-size: 0.95rem;
}

.tip-box,
.warn-box {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0;
}

.tip-box {
    border: 1px solid var(--success-line);
    background: var(--success-bg);
}

.warn-box {
    border: 1px solid var(--warn-line);
    background: var(--warn-bg);
}

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

.split-list > div {
    border: 1px solid #d7e2ef;
    border-radius: 8px;
    background: #fbfcff;
    padding: 12px;
}

ul { padding-left: 18px; }

.quality {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 13px;
    color: #5d6c84;
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sidebar .widget {
    padding: 14px;
    margin-bottom: 14px;
}

.widget h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    text-transform: uppercase;
    color: #172a4f;
}

.latest-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 11px;
}

.thumb {
    width: 90px;
    height: 58px;
    border-radius: 7px;
    border: 1px solid #cad8ee;
    background: linear-gradient(135deg, #3a6be5, #34b4ff);
}

.latest-item p {
    margin: 0;
    line-height: 1.35;
    font-size: 0.9rem;
    color: #1f3356;
}

.cat-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    color: #203555;
}

.newsletter input {
    width: 100%;
    margin: 8px 0;
    border: 1px solid #cfdae8;
    border-radius: 7px;
    background: #fff;
    color: #1f3252;
    padding: 10px;
}

.newsletter button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #1f63ff, #1d9dff);
    color: #fff;
    font-weight: 800;
    padding: 10px;
    cursor: pointer;
}

.hub-main {
    max-width: 1240px;
    margin: 20px auto 26px;
    padding: 0 20px;
}

.hub-intro { margin-bottom: 14px; }

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.hub-card {
    padding: 14px;
    box-shadow: 0 4px 20px rgba(15, 35, 74, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(16, 40, 88, 0.12);
    border-color: #bfd0eb;
}

.hub-card h3 {
    margin-top: 0;
    font-size: 1.05rem;
}

.hub-card p {
    margin-bottom: 0;
    color: #3e5070;
}

.site-footer {
    border-top: 1px solid #d4dfed;
    margin-top: 22px;
    background: #eef2f8;
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.footer-panel { padding: 14px; }
.footer-panel h4 { margin: 0 0 10px; }

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 18px;
    color: #54647d;
    font-size: 0.85rem;
}

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

@media (max-width: 860px) {
    .menu-toggle { display: inline-block; }

    .top-nav {
        display: none;
        width: 100%;
        border-top: 1px solid #20447a;
        padding-top: 10px;
        margin-top: 6px;
    }

    .top-nav.open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .header-inner {
        min-height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .toc-columns,
    .split-list {
        grid-template-columns: 1fr;
    }

    .wrap,
    .hub-main,
    .page-shell,
    .footer-grid,
    .footer-bottom {
        padding-left: 14px;
        padding-right: 14px;
    }

    .content-area {
        padding: 14px;
    }

    .brand {
        font-size: 1.72rem;
    }

    h1 {
        font-size: clamp(1.7rem, 7vw, 2.1rem);
    }

    p {
        font-size: 1rem;
    }

    .ad-slot--title,
    .ad-slot--sidebar {
        display: none;
    }
}
