/* OKX Download Portal — single stylesheet, responsive */
:root {
    --primary: #6d28d9;
    --primary-dark: #5b21b6;
    --primary-light: #ede9fe;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --surface: #ffffff;
    --bg: #f5f3ff;
    --bg-alt: #ecfeff;
    --text: #1e1b4b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --dark: #0f172a;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(109, 40, 217, 0.06);
    --shadow-lg: 0 8px 28px rgba(109, 40, 217, 0.1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1140px;
    --nav-h: 64px;
    --card-pad: 1.35rem;
    --grid-gap: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--surface);
    overflow-x: hidden;
}

/* 防止栅格子项被长文本撑破 */
.grid > *,
.download-grid > *,
.security-grid > *,
.article-grid > *,
.steps-row > *,
.cert-row > *,
.intro-block > *,
.hero .container > *,
.page-layout > * {
    min-width: 0;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container { padding: 0 1.25rem; }
}

/* —— Layout utilities —— */
.grid { display: grid; gap: var(--grid-gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 2rem; }

.section {
    padding: 3.5rem 0;
}

@media (min-width: 768px) {
    .section { padding: 4rem 0; }
}

.section-alt {
    background: var(--bg);
}

.section-cyan {
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--surface) 100%);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.section-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.section-header { text-align: center; margin-bottom: 2rem; }
.section-header .section-lead { margin-bottom: 0; }

/* —— Buttons —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:active { transform: scale(0.98); }

.dl-card .btn,
.hero-actions .btn {
    max-width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.btn-primary:hover {
    color: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-light {
    background: #fff;
    color: var(--primary-dark);
    border-color: rgba(255,255,255,0.3);
}

.btn-light:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; }

/* —— Navbar —— */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    min-height: var(--nav-h);
}

.site-nav .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--nav-h);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-brand img { height: 38px; width: auto; max-width: 140px; object-fit: contain; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu a {
    display: block;
    padding: 0.4rem 0.65rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: 6px;
    line-height: 1.3;
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .nav-menu a {
        padding: 0.45rem 0.75rem;
        font-size: 0.875rem;
    }
}

.nav-menu a:hover,
.nav-menu li.on a,
.nav-menu li.active a {
    color: var(--primary);
    background: var(--primary-light);
}

.pagebar .pagelist a {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}

.pagebar .pagelist a:hover,
.pagebar .pagelist .thisclass a {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* —— Hero —— */
.hero {
    position: relative;
    padding: 2.75rem 0 3.25rem;
    background: linear-gradient(145deg, #1e1b4b 0%, #4c1d95 45%, #6d28d9 100%);
    color: #fff;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero { padding: 3.5rem 0 4rem; }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 90% 20%, rgba(6, 182, 212, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 10% 80%, rgba(167, 139, 250, 0.2), transparent);
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: #c4b5fd;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.92;
    margin: 0 0 1.5rem;
    line-height: 1.7;
    word-break: break-word;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hero-actions .btn {
    white-space: normal;
    text-align: center;
    flex: 1 1 auto;
    min-width: min(100%, 10rem);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual img {
    width: 100%;
    max-width: min(280px, 100%);
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px rgba(0,0,0,0.3);
}

/* —— Stats strip —— */
.stats-strip {
    background: var(--dark);
    color: #fff;
    padding: 1.75rem 0;
}

.stats-strip .grid-4 {
    gap: 0.75rem 1rem;
}

.stat-box {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-box:last-child {
    border-right: none;
}

.stat-num {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.35rem;
}

/* —— Feature cards —— */
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--card-pad);
    height: 100%;
    transition: box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}

.feature-card:hover {
    box-shadow: var(--shadow);
    border-color: #c4b5fd;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light), #cffafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    word-break: break-word;
}

#features .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* —— Intro / prose block —— */
.intro-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (min-width: 992px) {
    .intro-block { gap: 2rem; }
}

.intro-block .prose h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--primary-dark);
}

.intro-block .prose h3:first-child { margin-top: 0; }

.intro-block .prose p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.intro-highlight {
    background: linear-gradient(135deg, var(--primary-light), #ecfeff);
    border-radius: var(--radius);
    padding: var(--card-pad);
    border: 1px solid #ddd6fe;
    height: 100%;
    box-sizing: border-box;
}

.intro-highlight-title,
.intro-highlight h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--primary-dark);
    word-break: break-word;
}

.intro-highlight ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.intro-highlight li {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(109, 40, 217, 0.1);
    font-size: 0.88rem;
    display: flex;
    gap: 0.5rem;
    line-height: 1.5;
    word-break: break-word;
}

.intro-highlight li:last-child { border-bottom: none; }
.intro-highlight li::before { content: "✓"; color: var(--primary); font-weight: 700; }

/* —— Download cards —— */
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--grid-gap);
    align-items: stretch;
}

.dl-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: var(--card-pad);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}

.dl-card:hover {
    box-shadow: var(--shadow);
    border-color: #c4b5fd;
}

.dl-card .btn {
    width: 100%;
    margin-top: auto;
    white-space: normal;
    line-height: 1.35;
    padding: 0.65rem 1rem;
}

.dl-card-head > div:last-child {
    min-width: 0;
}

.dl-card h3,
.dl-card .meta {
    overflow-wrap: break-word;
}

.dl-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dl-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.dl-icon-ios { background: #1e293b; color: #fff; }
.dl-icon-android { background: #059669; color: #fff; }
.dl-icon-win { background: #2563eb; color: #fff; }

.dl-card h3 { margin: 0; font-size: 1.05rem; }
.dl-card .meta { font-size: 0.85rem; color: var(--text-muted); margin: 0.2rem 0 0; }

.dl-features {
    flex: 1;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.dl-features li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.dl-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* —— Security —— */
.security-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--grid-gap);
}

.sec-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--card-pad);
    text-align: center;
    border: 1px solid var(--border);
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.sec-card .sec-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.sec-card h3 { font-size: 1rem; margin: 0 0 0.75rem; }
.sec-card ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.sec-card li { font-size: 0.85rem; color: var(--text-muted); padding: 0.35rem 0; }

.cert-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--grid-gap);
    margin-top: 2rem;
}

.cert-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--card-pad);
    text-align: center;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.cert-item h4 { margin: 0.5rem 0 0.35rem; font-size: 0.95rem; }
.cert-item p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* —— Steps —— */
.steps-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--grid-gap);
    counter-reset: step;
}

.step-item {
    text-align: center;
    padding: 1.25rem 0.85rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.step-item p {
    word-break: break-word;
}

.step-item::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
}

.step-item h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.step-item p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* —— FAQ —— */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--surface);
}

.faq-item summary {
    padding: 0.9rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.45;
    word-break: break-word;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 400;
    flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item .faq-body {
    padding: 0 1rem 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    word-break: break-word;
}

/* —— Articles —— */
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--grid-gap);
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.article-card:hover { box-shadow: var(--shadow); }

.article-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.article-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.article-card h3 {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }

.section-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* —— Footer —— */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 3.5rem 0 1.5rem;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer h5 {
    color: #fff;
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li { margin-bottom: 0.5rem; }

.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: var(--accent); }

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p { margin: 0.35rem 0; }

/* —— Inner pages (list / article) —— */
.page-main {
    padding: 2.5rem 0 4rem;
    background: var(--bg);
    min-height: calc(100vh - var(--nav-h) - 120px);
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--card-pad);
    box-shadow: var(--shadow);
    overflow: hidden;
    box-sizing: border-box;
}

.page-title {
    font-size: 1.5rem;
    margin: 0 0 0.35rem;
}

.page-desc {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.list-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.list-item img {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
}

.list-item .meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.list-item h2 { font-size: 1.05rem; margin: 0 0 0.35rem; font-weight: 600; }
.list-item h2 a { color: var(--text); }
.list-item p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--card-pad);
    margin-bottom: var(--grid-gap);
    box-shadow: var(--shadow);
    overflow: hidden;
    box-sizing: border-box;
}

.side-hot a:last-child {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.sidebar-card h3 { font-size: 1rem; margin: 0 0 1rem; }

.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li { margin-bottom: 0.5rem; font-size: 0.9rem; }

.side-hot {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    align-items: flex-start;
}

.side-hot img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.side-hot a { font-size: 0.88rem; line-height: 1.4; color: var(--text); }

.article-header h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.article-meta span { margin-right: 1rem; }

.article-cover {
    max-width: 100%;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    height: auto;
    max-height: 320px;
    object-fit: cover;
}

.article-body { line-height: 1.8; }
.article-body img { max-width: 100%; height: auto; }

.tag-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list a {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: var(--primary-light);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--primary-dark);
}

.related-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.related-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.related-item img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; }

.pagebar .pagelist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.pagebar .pagelist li { display: inline-flex; margin: 0; }

/* —— Responsive —— */
@media (max-width: 1200px) {
    .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .page-layout { grid-template-columns: 1fr minmax(260px, 300px); gap: 1.5rem; }
}

/* 平板竖屏及以下：汉堡菜单 + 单列主内容 */
@media (max-width: 991px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { order: -1; }
    .hero-visual img { max-width: 220px; }
    .intro-block { grid-template-columns: 1fr; }
    #features .grid-3,
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-layout { grid-template-columns: 1fr; }

    .nav-toggle {
        display: flex;
        margin-left: auto;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .site-nav .container {
        flex-wrap: nowrap;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        flex: none;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        background: var(--surface);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 0;
        box-shadow: var(--shadow-lg);
        max-height: min(70vh, 480px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1001;
    }

    .nav-menu.is-open { display: flex; }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu li:last-child { border-bottom: none; }

    .nav-menu a {
        padding: 0.85rem 1rem;
        width: 100%;
        white-space: normal;
        font-size: 0.9375rem;
        border-radius: 0;
    }

    body.nav-open { overflow: hidden; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4,
    #features .grid-3,
    .security-grid,
    .cert-row,
    .steps-row,
    .download-grid {
        grid-template-columns: 1fr;
    }

    /* 运营数据：手机端 2×2，避免四行过长 */
    .stats-strip .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.75rem;
    }

    .stat-box {
        padding: 0.75rem 0.35rem;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stat-box:nth-child(2n) { border-right: none; }
    .stat-box:nth-last-child(-n+2) { border-bottom: none; }

    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.8125rem; }

    .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }

    .article-card img { height: 110px; }
    .article-card-body { padding: 0.75rem; }

    .list-item { grid-template-columns: 96px 1fr; gap: 0.75rem; }

    .section { padding: 2.5rem 0; }
    .hero { padding: 1.75rem 0 2.25rem; }
    .hero h1 { font-size: 1.65rem; }
    .hero-desc { font-size: 0.9375rem; margin-bottom: 1.25rem; }
    .hero-badge { font-size: 0.75rem; max-width: 100%; }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    .section-header { margin-bottom: 1.25rem; }
    .section-title { font-size: 1.35rem; }
    .section-lead { margin-bottom: 1.25rem; font-size: 0.9rem; }

    .section-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-bar .btn { width: 100%; }

    .intro-block .prose h3 { font-size: 1.1rem; margin-top: 1.25rem; }

    .site-footer { padding: 2.5rem 0 1.25rem; }
    .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }

    .footer-bottom { font-size: 0.8125rem; }
    .footer-bottom p {
        line-height: 1.6;
        padding: 0 0.25rem;
    }

    .page-main { padding: 1.5rem 0 2.5rem; }
    .page-title { font-size: 1.25rem; }
    .page-desc { font-size: 0.9rem; margin-bottom: 1rem; }

    .content-card { padding: 1rem; }

    .article-header h1 { font-size: 1.25rem; line-height: 1.35; }

    .article-meta {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .article-meta span { margin-right: 0; display: block; }

    .article-cover {
        width: 100%;
        max-height: 220px;
        object-fit: cover;
    }

    .article-body {
        font-size: 0.9375rem;
        overflow-wrap: break-word;
    }

    .article-body img,
    .article-body video,
    .article-body iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    .article-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prenext-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .prenext-row > div { width: 100%; }

    .sidebar-card { padding: 1rem; }
    .sidebar-card:last-child { margin-bottom: 0; }

    .pagebar .pagelist {
        justify-content: center;
        gap: 0.35rem;
    }

    .pagebar .pagelist a {
        padding: 0.5rem 0.65rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 640px) {
    .article-grid { grid-template-columns: 1fr; }
    .article-card img { height: 140px; }

    #features .grid-3,
    .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 0.875rem; }

    .nav-brand img { height: 34px; }

    .list-item {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .list-item img {
        height: 150px;
        width: 100%;
    }

    .list-item h2 { font-size: 1rem; }

    .site-footer .footer-grid { grid-template-columns: 1fr; }

    .related-item {
        grid-template-columns: 72px 1fr;
        gap: 0.65rem;
    }

    .related-item img { height: 56px; }

    .side-hot {
        flex-direction: column;
        align-items: stretch;
    }

    .side-hot img {
        width: 100%;
        height: 120px;
    }

    .cert-item { padding: 1rem; }

    .dl-card-head { gap: 0.75rem; }

    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
}

/* 刘海屏安全区 */
@supports (padding: max(0px)) {
    .site-nav .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .site-footer .container {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
}
