:root {
    --red: #d7261e;
    --red-dark: #b51e18;
    --ink: #202124;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f5f6f8;
    --panel: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 15px;
}

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

img {
    display: block;
    max-width: 100%;
}

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

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
}

.logo strong {
    display: block;
    color: var(--red);
    font-size: 30px;
    letter-spacing: 0;
}

.logo img {
    max-width: 220px;
    max-height: 56px;
    object-fit: contain;
}

.logo span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.search-box,
.side-search {
    display: flex;
    border: 2px solid var(--red);
    background: #fff;
}

.search-box {
    width: min(420px, 100%);
}

.search-box input,
.side-search input {
    min-width: 0;
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: 0;
    outline: 0;
}

.search-box button,
.side-search button {
    width: 86px;
    border: 0;
    color: #fff;
    background: var(--red);
    cursor: pointer;
    font-weight: 700;
}

.main-nav {
    background: var(--red);
}

.nav-inner {
    display: flex;
    align-items: center;
    min-height: 46px;
    overflow-x: auto;
}

.nav-inner a {
    flex: 0 0 auto;
    padding: 14px 18px;
    color: #fff;
    font-weight: 700;
}

.nav-inner a:hover,
.nav-inner a.active {
    background: var(--red-dark);
}

.page {
    padding: 18px 0 34px;
}

.hero-ad {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ad-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    align-items: center;
    min-height: 92px;
    padding: 18px 22px;
    border: 1px solid #f0c7c4;
    background: linear-gradient(135deg, #fff 0%, #fff4f3 100%);
}

.ad-text,
.ad-media {
    grid-row: 2;
}

.ad-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-card strong {
    font-size: 21px;
}

.ad-card span {
    color: var(--muted);
}

.ad-card em {
    grid-column: 2;
    padding: 9px 14px;
    color: #fff;
    background: var(--red);
    font-style: normal;
    font-weight: 700;
}

.ad-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.ad-text {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 10px 14px;
    border-color: #e8eaf0;
    background: #fff;
}

.ad-text strong {
    grid-column: 1;
    font-size: 16px;
}

.ad-text span {
    grid-column: 1;
    font-size: 13px;
    line-height: 1.45;
}

.ad-text em {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    padding: 7px 10px;
    font-size: 13px;
}

.ad-media {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 74px;
    padding: 10px 14px 10px 10px;
    border-color: #d8e4ef;
    background: #f7fbff;
}

.ad-media img {
    grid-row: 1 / span 2;
    height: 58px;
    border: 1px solid var(--line);
    background: #fff;
}

.ad-media span {
    color: inherit;
}

.ad-media em {
    display: none;
}

.ad-media strong {
    font-size: 17px;
}

.ad-media small {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
}

.ad-banner {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 150px;
    overflow: hidden;
    padding: 0;
    border-color: #222;
    background: #202124;
}

.ad-banner img {
    position: absolute;
    inset: 0;
    opacity: .72;
}

.ad-banner-text {
    position: relative;
    z-index: 1;
    align-self: end;
    padding: 22px;
    color: #fff;
}

.ad-banner-text strong {
    color: #fff;
}

.ad-banner-text small {
    color: #eef2f7;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 18px;
    align-items: start;
}

.main-column,
.article-detail,
.side-card,
.side-ad {
    background: var(--panel);
    border: 1px solid var(--line);
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 2px solid var(--red);
}

.section-title h1 {
    margin: 0;
    font-size: 22px;
}

.section-title span {
    color: var(--muted);
    font-size: 13px;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.category-strip a {
    padding: 7px 12px;
    border: 1px solid #f0c7c4;
    color: var(--red-dark);
    background: #fff7f6;
}

.post-list {
    padding: 0 18px;
}

.post-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.post-card:last-child {
    border-bottom: 0;
}

.post-cover {
    height: 146px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f8fafc;
}

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

.post-body {
    min-width: 0;
}

.post-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    color: var(--muted);
    font-size: 13px;
}

.post-meta a {
    color: var(--red);
}

.post-card h2 {
    margin: 8px 0;
    font-size: 21px;
    line-height: 1.35;
}

.post-card h2 a:hover,
.side-list a:hover,
.rank-list a:hover,
.related-list a:hover {
    color: var(--red);
}

.post-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
}

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

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tags span,
.tag-line span {
    padding: 4px 8px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: #fafafa;
    font-size: 12px;
}

.score {
    flex: 0 0 auto;
    color: var(--red);
    font-weight: 800;
}

.pager {
    display: flex;
    gap: 8px;
    padding: 18px;
    border-top: 1px solid var(--line);
}

.pager a,
.pager span,
.pager strong {
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.pager strong {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
}

.sidebar {
    display: grid;
    gap: 14px;
}

.side-image-ad {
    position: relative;
    overflow: hidden;
    border: 0;
    background: #fff;
}

.side-image-ad a {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.side-image-ad a.active {
    opacity: 1;
    pointer-events: auto;
}

.side-image-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-image-ad-square {
    width: 350px;
    aspect-ratio: 1 / 1;
    justify-self: center;
}

.side-image-ad-merchant {
    width: 315px;
    aspect-ratio: 315 / 135;
    margin: 14px auto;
    border: 1px solid var(--line);
    justify-self: center;
}

.side-card {
    padding: 16px;
}

.side-search-board {
    overflow: hidden;
    padding: 0;
}

.side-search-panel {
    padding: 16px;
}

.side-search-panel h3 {
    margin-top: 0;
}

.merchant-ad-board {
    padding: 0;
}

.merchant-ad-board h3 {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: #fff;
    background: #202124;
    font-size: 16px;
}

.side-card h3 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 18px;
}

.side-list,
.side-news-list,
.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    line-height: 1.55;
}

.side-news-list li {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.side-news-cover {
    height: 58px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.side-news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-news-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-news-title:hover {
    color: var(--red);
}

.side-news-list span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.rank-list li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    line-height: 1.55;
}

.rank-list span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #fff;
    background: var(--red);
    font-size: 12px;
    font-weight: 800;
}

.side-ad {
    padding: 20px;
    color: #fff;
    background: #222;
}

.side-ad strong {
    display: block;
    font-size: 22px;
}

.side-ad p {
    margin: 10px 0 0;
    color: #d1d5db;
    line-height: 1.65;
}

.article-detail {
    padding: 24px;
}

.crumb {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.crumb a:hover {
    color: var(--red);
}

.article-detail h1 {
    margin: 14px 0;
    font-size: 30px;
    line-height: 1.3;
}

.detail-cover {
    width: 100%;
    max-height: 360px;
    margin: 20px 0;
    object-fit: cover;
    border: 1px solid var(--line);
}

.lead {
    padding: 14px 16px;
    border-left: 4px solid var(--red);
    color: #4b5563;
    background: #fff7f6;
    line-height: 1.8;
}

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

.metric-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    background: #fafafa;
}

.metric-grid strong {
    display: block;
    margin-bottom: 7px;
    color: var(--red-dark);
}

.metric-grid span {
    color: #4b5563;
    line-height: 1.55;
}

.article-content p {
    margin: 18px 0;
    color: #2f343b;
    font-size: 16px;
    line-height: 1.95;
}

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.related {
    margin-top: 24px;
}

.related h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

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

.related-list a {
    padding: 12px;
    border: 1px solid var(--line);
    background: #fafafa;
}

.friend-links {
    padding: 20px 0 24px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.friend-links-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.friend-links-head h2 {
    margin: 0;
    font-size: 20px;
}

.friend-links-head span {
    color: var(--muted);
    font-size: 13px;
}

.friend-link-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.friend-link-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    align-items: center;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #fafafa;
}

.friend-link-list a:hover {
    border-color: #f0c7c4;
    color: var(--red);
    background: #fff7f6;
}

.friend-link-list img {
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}

.friend-link-list strong,
.friend-link-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-link-list strong {
    font-size: 15px;
}

.friend-link-list small {
    color: var(--muted);
    font-size: 12px;
}

.empty-box {
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    padding: 24px 0;
    color: #cfd3da;
    background: #202124;
    text-align: center;
}

.site-footer p {
    margin: 6px 0;
}

.site-footer span {
    display: inline-flex;
    margin: 0 8px;
}

@media (max-width: 960px) {
    .content-grid,
    .hero-ad,
    .friend-link-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .header-top,
    .section-title,
    .post-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .post-card,
    .metric-grid,
    .sidebar,
    .ad-media {
        grid-template-columns: 1fr;
    }

    .ad-text,
    .ad-media {
        grid-row: auto;
    }

    .ad-media img {
        height: 130px;
    }

    .ad-media em {
        display: inline-flex;
    }

    .post-cover {
        height: 190px;
    }

    .article-detail {
        padding: 18px;
    }

    .article-detail h1 {
        font-size: 25px;
    }

    .friend-links-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
