/*
Theme Name: Z811手机测评主题
Theme URI: https://www.z811.cn/
Author: Z811
Author URI: https://www.z811.cn/
Description: 面向手机测评、购机推荐、影像测评、性能续航和数码资讯的中文门户主题。
Version: 2.0.0
Text Domain: z811-phone-review
*/

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #eef6fb;
    --ink: #020617;
    --ink-2: #0f172a;
    --muted: #526173;
    --line: #dce7f0;
    --primary: #0f172a;
    --accent: #0369a1;
    --accent-2: #0f9f7a;
    --amber: #b7791f;
    --danger: #dc2626;
    --radius: 8px;
    --shadow: 0 12px 32px rgba(15, 23, 42, .08);
    --shadow-soft: 0 8px 22px rgba(3, 105, 161, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 12px 12px, rgba(3, 105, 161, .08) 1px, transparent 1.6px) 0 0 / 28px 28px,
        linear-gradient(180deg, #f8fafc 0%, #eef6fb 48%, #f8fafc 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid rgba(3, 105, 161, .38); outline-offset: 3px; }

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 1000;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
}
.skip-link:focus { top: 16px; color: #fff; }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

.top-strip {
    border-bottom: 1px solid var(--line);
    background: #eff7fb;
    color: #334155;
    font-size: 14px;
}
.top-strip-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(220, 231, 240, .86);
    backdrop-filter: blur(14px);
}
.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 58px;
}
.brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #b9ddeb;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e8fbff, #f0fdf4);
    color: var(--accent);
    box-shadow: 0 8px 18px rgba(3, 105, 161, .12);
}
.brand-mark svg {
    width: 31px;
    height: 31px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.brand-wordmark {
    display: block;
    min-width: 0;
}
.brand-wordmark strong {
    display: block;
    color: var(--ink-2);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: 0;
}
.brand-wordmark small {
    display: block;
    margin-top: 5px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}
.header-promo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.header-promo span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border: 1px solid #cfe4ef;
    border-radius: var(--radius);
    background: #f8fbfd;
    color: #22425a;
    font-size: 13px;
    font-weight: 700;
}

.nav-bar {
    border-top: 1px solid rgba(220, 231, 240, .72);
    background: #0f172a;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.menu {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: thin;
}
.menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 15px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.menu a:hover,
.menu .current-menu-item > a,
.menu .current-category-ancestor > a {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.search-form {
    display: flex;
    align-items: center;
    width: min(310px, 100%);
    min-width: 240px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
}
.search-form input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    padding: 0 12px;
}
.search-form input::placeholder { color: #b8c3d3; opacity: 1; }
.search-form button {
    min-height: 44px;
    min-width: 66px;
    border: 0;
    background: #0f9f7a;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.sidebar-search .search-form {
    width: 100%;
    min-width: 0;
    border-color: #cbdce8;
    background: #fff;
}
.sidebar-search .search-form input { color: var(--ink); }
.sidebar-search .search-form input::placeholder { color: #718096; }

.ticker {
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--muted);
    font-size: 14px;
}
.ticker b {
    color: var(--accent);
    white-space: nowrap;
}

.hero-shell { padding: 24px 0 16px; }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.58fr) minmax(300px, .72fr);
    gap: 18px;
}
.hero-panel,
.insight-box,
.metric-grid,
.panel,
.widget {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.hero-main {
    position: relative;
    overflow: hidden;
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(3, 105, 161, .88) 58%, rgba(15, 159, 122, .78)),
        radial-gradient(circle at 84% 18%, rgba(183, 121, 31, .32), transparent 28%);
}
.hero-main:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 1.5px) 0 0 / 22px 22px;
    pointer-events: none;
}
.hero-copy,
.value-form,
.value-result { position: relative; z-index: 1; }
.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    width: max-content;
    padding: 3px 9px;
    border: 1px solid rgba(3, 105, 161, .18);
    border-radius: var(--radius);
    background: rgba(3, 105, 161, .08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}
.hero-main .eyebrow {
    border-color: rgba(255,255,255,.34);
    background: rgba(255,255,255,.12);
    color: #dff7ff;
}
.hero-copy h1 {
    margin: 12px 0 10px;
    max-width: 680px;
    font-size: 34px;
    line-height: 1.22;
    letter-spacing: 0;
}
.hero-copy p {
    margin: 0 0 20px;
    max-width: 720px;
    color: #dbeafe;
}

.value-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 780px;
}
.field { min-width: 0; }
.field-wide { grid-column: span 2; }
.field label {
    display: block;
    margin: 0 0 5px;
    color: #e9f7ff;
    font-size: 13px;
    font-weight: 800;
}
.field input,
.field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .98);
    color: var(--ink);
    padding: 0 12px;
    outline: 0;
}
.field input:focus,
.field select:focus {
    border-color: #bbf7d0;
    box-shadow: 0 0 0 3px rgba(187,247,208,.22);
}
.z811-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.btn,
.read-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 800;
}
.btn {
    padding: 0 16px;
    background: linear-gradient(135deg, #0369a1, #0f9f7a);
    color: #fff;
    box-shadow: 0 10px 22px rgba(3, 105, 161, .22);
}
.btn:hover { color: #fff; filter: brightness(1.05); }
.value-submit {
    grid-column: span 2;
}
.value-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.result-item {
    min-height: 82px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, .24);
    overflow: hidden;
}
.result-item b {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 14px;
}
.result-item span {
    display: block;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.result-wide { grid-column: 1 / -1; }
.result-price {
    background: linear-gradient(135deg, rgba(3, 105, 161, .44), rgba(15, 159, 122, .36));
}
.result-price span {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}
.result-error {
    border-color: rgba(254, 202, 202, .72);
    background: rgba(127, 29, 29, .28);
}

.hero-side {
    display: grid;
    gap: 18px;
}
.insight-box { padding: 22px; }
.insight-box h2 {
    margin: 12px 0 10px;
    font-size: 24px;
    line-height: 1.28;
}
.insight-box p {
    margin: 0;
    color: var(--muted);
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
}
.metric-grid div {
    min-height: 104px;
    padding: 16px;
    background: #fff;
}
.metric-grid b {
    display: block;
    color: var(--primary);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
}
.metric-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.category-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 8px auto 22px;
}
.rail-card {
    min-height: 104px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.rail-card strong {
    display: block;
    color: var(--ink-2);
    font-size: 16px;
}
.rail-card span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 22px;
    margin-bottom: 38px;
}
.archive-layout,
.single-layout { margin-top: 24px; }
.panel { overflow: hidden; }
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
}
.section-title h1,
.section-title h2 {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 24px;
    line-height: 1.28;
}
.text-link {
    min-width: 92px;
    padding: 0 13px;
    border: 1px solid var(--line);
    color: var(--accent);
    background: #f8fbfd;
}
.post-list { padding: 0 18px; }
.post-card {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.post-card:last-child { border-bottom: 0; }
.thumb {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #e6f4fb, #eff7f2);
}
.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .24s ease;
}
.post-card:hover .thumb img { transform: scale(1.035); }
.post-card-body { min-width: 0; }
.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
}
.meta a { color: #475569; }
.post-card h3 {
    margin: 8px 0 8px;
    color: var(--ink-2);
    font-size: 21px;
    line-height: 1.36;
}
.excerpt {
    margin: 0;
    color: var(--muted);
}
.read-more {
    width: max-content;
    min-height: 38px;
    margin-top: 12px;
    padding: 0 12px;
    border: 1px solid #cce2ef;
    color: var(--accent);
    background: #f8fbfd;
    font-size: 14px;
}
.empty-state {
    padding: 24px 0;
    color: var(--muted);
}
.empty-state h3 {
    margin: 0 0 8px;
    color: var(--ink-2);
}
.pagination {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
}
.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    min-height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 10px;
    background: #fff;
}
.pagination .current {
    background: var(--primary);
    color: #fff;
}

.sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}
.widget { padding: 16px; }
.widget-title {
    margin: 0 0 13px;
    color: var(--ink-2);
    font-size: 18px;
    line-height: 1.3;
}
.widget-title:before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 18px;
    margin-right: 8px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    vertical-align: -3px;
}
.supplier-list {
    display: grid;
    gap: 10px;
}
.supplier-card {
    position: relative;
    min-height: 132px;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    color: #fff;
}
.supplier-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .24s ease;
}
.supplier-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .55) 66%, rgba(15, 23, 42, .2));
}
.supplier-card:hover { color: #fff; }
.supplier-card:hover img { transform: scale(1.035); }
.supplier-card span {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 132px;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
}
.supplier-card strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.28;
}
.supplier-card small {
    display: block;
    margin-top: 7px;
    width: min(230px, 100%);
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.55;
}
.quick-tags {
    display: block;
}
.quick-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0 6px 8px 0;
    padding: 0 10px;
    border: 1px solid #d1e5ef;
    border-radius: var(--radius);
    background: #f8fbfd;
    color: #24516a;
    font-size: 13px;
    font-weight: 700;
}

.category-point-map {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.28fr);
    gap: 18px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 1px 1px, rgba(3, 105, 161, .16) 1px, transparent 1.5px) 0 0 / 18px 18px,
        linear-gradient(135deg, #f8fcff, #eff8f4);
}
.category-point-copy h1 {
    margin: 10px 0;
    color: var(--ink-2);
    font-size: 27px;
    line-height: 1.25;
}
.category-point-copy p {
    margin: 0;
    color: var(--muted);
}
.category-point-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.category-point {
    position: relative;
    min-height: 90px;
    padding: 14px 13px 13px 42px;
    border: 1px solid #cfe3ef;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 7px 18px rgba(3, 105, 161, .06);
}
.point-dot {
    position: absolute;
    left: 15px;
    top: 19px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 5px rgba(3, 105, 161, .12);
}
.category-point strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink-2);
    font-size: 15px;
}
.category-point small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.article-panel {
    padding: 0;
}
.article-header {
    padding: 28px 30px 18px;
    border-bottom: 1px solid var(--line);
}
.article-header h1 {
    margin: 12px 0 0;
    color: var(--ink-2);
    font-size: 34px;
    line-height: 1.28;
}
.article-lead {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}
.article-cover {
    margin: 0;
    padding: 24px 30px 0;
}
.article-cover img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
}
.article-content {
    padding: 24px 30px 34px;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.9;
}
.article-content p { margin: 0 0 1.1em; }
.article-content h2,
.article-content h3 {
    color: var(--ink-2);
    line-height: 1.35;
}
.article-content img {
    border-radius: var(--radius);
}

.site-footer {
    margin-top: 38px;
    background: #0f172a;
    color: #cbd5e1;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 24px;
    padding: 30px 0;
}
.footer-grid h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
}
.footer-grid p {
    margin: 0;
    color: #cbd5e1;
}
.copyright {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 14px 0;
    color: #94a3b8;
    font-size: 13px;
}
.beian-links a { color: #cbd5e1; }
.beian-links a:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 1024px) {
    .hero-grid,
    .layout {
        grid-template-columns: 1fr;
    }
    .category-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sidebar-search,
    .quick-tags {
        grid-column: 1 / -1;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .wrap {
        width: min(100% - 24px, 1180px);
    }
    .top-strip-inner,
    .brand-row,
    .nav-inner {
        align-items: stretch;
        flex-direction: column;
    }
    .brand { align-items: center; }
    .brand-wordmark strong { font-size: 24px; }
    .brand-wordmark small { font-size: 13px; }
    .header-promo {
        justify-content: flex-start;
    }
    .search-form {
        width: 100%;
        min-width: 0;
    }
    .menu {
        width: 100%;
    }
    .hero-shell {
        padding-top: 16px;
    }
    .hero-main {
        padding: 22px;
    }
    .hero-copy h1 {
        font-size: 28px;
    }
    .value-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .field-wide,
    .value-submit {
        grid-column: 1 / -1;
    }
    .value-result,
    .metric-grid,
    .category-point-map,
    .category-point-grid {
        grid-template-columns: 1fr;
    }
    .category-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .post-card {
        grid-template-columns: 1fr;
    }
    .thumb {
        aspect-ratio: 16 / 9;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .article-header,
    .article-cover,
    .article-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    .article-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .wrap {
        width: min(100% - 20px, 1180px);
    }
    .hero-main,
    .insight-box,
    .widget,
    .category-point-map {
        padding: 16px;
    }
    .value-form,
    .category-rail {
        grid-template-columns: 1fr;
    }
    .field-wide,
    .value-submit {
        grid-column: auto;
    }
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }
    .section-title h1,
    .section-title h2 {
        font-size: 22px;
    }
    .post-list {
        padding: 0 14px;
    }
    .post-card h3 {
        font-size: 19px;
    }
    .copyright {
        align-items: flex-start;
        flex-direction: column;
    }
}
