:root {
    --bg: #f2f2f2;
    --panel: #fff;
    --text: #111;
    --muted: #666;
    --line: #e8e8e8;
    --blue: #1e9bff;
    --dark: #2c333a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: #1685ff;
    text-decoration: none;
}

a:hover {
    color: #0067c8;
}

.site-hero {
    min-height: 300px;
    color: #fff;
    background:
        linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .1)),
        url("assets/hero.jpg") center 42% / cover no-repeat,
        linear-gradient(135deg, #253348, #1a746c 45%, #d28b24);
}

.hero-inner {
    position: relative;
    max-width: 1260px;
    min-height: 300px;
    margin: 0 auto;
    padding: 18px 24px;
}

.site-name {
    color: #fff;
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.site-name:hover {
    color: #fff;
}

.site-hero h1 {
    position: absolute;
    top: 42%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    font-size: 38px;
    font-weight: 400;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .45);
    white-space: nowrap;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 824px) 398px;
    gap: 30px;
    max-width: 1260px;
    margin: 20px auto 56px;
    padding: 0 24px;
}

.post-card,
.widget,
.article {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.post-card {
    margin-bottom: 22px;
}

.post-main {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
}

.post-thumb {
    display: block;
    width: 254px;
    aspect-ratio: 254 / 140;
    overflow: hidden;
    border: 2px solid #ddd;
    background: #ddd;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    background: #d9d9d9;
}

.thumb-placeholder::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 58px;
    border: 8px solid #fff;
    border-radius: 10px;
    transform: translate(-50%, -42%);
}

.thumb-placeholder::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    border: 8px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -32%);
}

.post-body h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.35;
}

.post-body h2 a {
    color: #111;
}

.category {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 7px;
    color: #fff;
    background: var(--blue);
    font-size: 13px;
    line-height: 1.6;
    vertical-align: 2px;
}

.post-body p {
    margin: 0;
    color: #111;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.post-meta span::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 5px;
    border: 2px solid #111;
    border-radius: 2px;
    vertical-align: -2px;
}

.read-more {
    color: #111;
}

.read-more::after {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-left: 5px;
    border-radius: 50%;
    background: var(--dark);
    vertical-align: -2px;
}

.sidebar {
    min-width: 0;
}

.widget {
    margin-bottom: 22px;
    padding: 22px 30px;
}

.widget h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 400;
}

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

.widget li {
    margin: 4px 0;
}

.search-widget form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px;
    gap: 10px;
}

.search-widget input {
    width: 100%;
    height: 54px;
    border: 1px solid #aaa;
    padding: 0 12px;
    font: inherit;
}

.search-widget button {
    border: 0;
    color: #fff;
    background: var(--dark);
    font: inherit;
    cursor: pointer;
}

.widget:nth-child(2) h3 {
    font-size: 34px;
}

.article {
    padding: 28px 34px;
}

.article-head h2 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 400;
}

.article-meta {
    display: flex;
    gap: 16px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.article-content {
    overflow-wrap: anywhere;
}

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content pre {
    overflow: auto;
    padding: 16px;
    background: #f6f8fa;
    border: 1px solid var(--line);
}

.pager {
    text-align: center;
}

.pager ol {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pager a,
.pager .current {
    display: block;
    min-width: 34px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid var(--line);
}

.float-search {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 42px;
    height: 42px;
    border: 0;
    background: #9a9a9a;
    cursor: pointer;
}

.float-search span::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 11px;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
}

.float-search span::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 25px;
    width: 10px;
    height: 3px;
    background: #fff;
    transform: rotate(45deg);
    transform-origin: left center;
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #777;
    padding: 28px 16px 32px;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.site-footer span {
    display: block;
}

.site-footer a {
    color: #666;
}

.site-footer a:hover {
    color: #1685ff;
}

.police-ico {
    display: inline-block;
    width: 12px;
    height: 14px;
    margin-right: 5px;
    border: 1px solid currentColor;
    border-radius: 6px 6px 5px 5px;
    vertical-align: -2px;
    position: relative;
}

.police-ico::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 4px;
    height: 4px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

@media (max-width: 980px) {
    .site-hero,
    .hero-inner {
        min-height: 220px;
    }

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

    .layout {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 16px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .hero-inner {
        padding: 14px 16px;
    }

    .site-name {
        font-size: 20px;
    }

    .site-hero h1 {
        font-size: 28px;
    }

    .layout {
        padding: 0 12px;
    }

    .post-main {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .post-thumb {
        width: 100%;
    }

    .post-meta {
        padding: 10px 16px;
    }

    .widget {
        padding: 18px;
    }

    .widget:nth-child(2) h3 {
        font-size: 28px;
    }

    .article {
        padding: 20px;
    }
}
