/* templateicl1 / D 杂志分区式 / build 2026-09-09 cl1-v4
 * 参考站：cricfytvap.net | 原创 cl1- 前缀 + 原创色值
 * 主色 #e06818（暖琥珀橙，异于参考 #ef6b06 / templatein22 #e67012）
 * v2：增补正文自带 details/summary（AI 内容原生 FAQ）样式，对齐 Kadence accordion 视觉基因
 * v3：修复按钮/nav 链接色被 `.cl1-body a`（特异性 0-1-1）覆盖成橙底橙字；首页 h2 负上边距贴 zone 顶成分区头带（消除与正文分离感，odd zone 换差异色增强分区边界）；手机端 zone 左右内边距 16→20px
 * v4：手机端 zone 左右内边距 20→24px（v3 变化小无感知）、header 左右同步 16→20px；h2 负边距同步 -24px（JS initZones 重写见 main.js v4）
 */

/* === Token === */
:root {
    --cl1-orange: #e06818;
    --cl1-orange-deep: #b85010;
    --cl1-ink: #1c1c22;
    --cl1-canvas: #f2f3f5;
    --cl1-zone-alt: #e9eaee;
    --cl1-surface: #ffffff;
    --cl1-text: #2a2a30;
    --cl1-text-soft: #5a5a65;
    --cl1-border: #e2e2e8;
    --cl1-shadow: 6px 7px 0 0 var(--cl1-ink);
    --cl1-shadow-hover: 14px 14px 0 0 var(--cl1-ink);
    --cl1-radius-btn: 4px;
    --cl1-radius-card: 10px;
    --cl1-maxw: 1100px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }
body.cl1-body {
    margin: 0;
    font-family: 'Space Grotesk', 'Noto Sans', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--cl1-text);
    background: var(--cl1-canvas);
}
body.cl1-body a { color: var(--cl1-orange); text-decoration: underline; }
body.cl1-body a:hover { color: var(--cl1-orange-deep); }
body.cl1-body img { max-width: 100%; height: auto; }
body.cl1-body p:empty { display: none; }

/* === Header === */
.cl1-header {
    background: var(--cl1-surface);
    border-bottom: 3px solid var(--cl1-orange);
    position: sticky; top: 0; z-index: 100;
}
.cl1-header__inner {
    max-width: var(--cl1-maxw); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
}
.cl1-branding { display: flex; align-items: center; gap: 10px; }
.cl1-body .cl1-branding__link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cl1-ink); }
.cl1-branding__logo { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.cl1-branding__name { font-weight: 700; font-size: 1.1rem; color: var(--cl1-ink); }
.cl1-nav { display: flex; gap: 8px; align-items: center; }
.cl1-body .cl1-nav__link {
    text-decoration: none; color: var(--cl1-ink); font-weight: 600; font-size: 0.95rem;
    padding: 6px 14px; border-radius: var(--cl1-radius-btn);
    transition: background 0.2s, color 0.2s;
}
.cl1-body .cl1-nav__link:hover { background: var(--cl1-orange); color: var(--cl1-surface); }
.cl1-menu-toggle {
    display: none; background: none; border: 2px solid var(--cl1-ink);
    border-radius: var(--cl1-radius-btn); padding: 6px 10px; cursor: pointer;
    font-size: 1.2rem; color: var(--cl1-ink);
}

/* === Hero === */
.cl1-hero {
    background: var(--cl1-surface);
    border-radius: var(--cl1-radius-card);
    box-shadow: 0 2px 30px rgba(0,0,0,0.12);
    border: 3px solid var(--cl1-orange);
    max-width: var(--cl1-maxw); margin: 24px auto; padding: 40px 30px;
    text-align: center;
}
.cl1-hero__title { font-size: 2rem; font-weight: 800; color: var(--cl1-ink); margin: 0 0 16px; }
.cl1-hero__icon { width: 119px; height: 119px; border-radius: 12px; margin: 0 auto 16px; display: block; }
.cl1-hero__lead { font-size: 1.05rem; color: var(--cl1-text-soft); max-width: 680px; margin: 0 auto 20px; }
.cl1-hero--special .cl1-hero__icon { width: 113px; height: 113px; }
.cl1-hero--special .cl1-hero__title { font-size: 1.6rem; }

/* === App Info Row (Hero 内) === */
.cl1-appinfo {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px;
    list-style: none; padding: 0; margin: 0 auto 20px; max-width: 600px;
}
.cl1-appinfo__item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.88rem; color: var(--cl1-text-soft);
}
.cl1-appinfo__item svg { width: 18px; height: 18px; stroke: var(--cl1-orange); fill: none; stroke-width: 2; }
.cl1-appinfo__value { font-weight: 600; color: var(--cl1-text); }

/* === Button === */
.cl1-body .cl1-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--cl1-orange); color: var(--cl1-surface);
    text-decoration: none; font-weight: 700; font-size: 1.05rem;
    padding: 12px 28px; border-radius: var(--cl1-radius-btn);
    box-shadow: var(--cl1-shadow);
    transition: box-shadow 0.25s, transform 0.25s;
}
.cl1-body .cl1-btn:hover { box-shadow: var(--cl1-shadow-hover); transform: translate(-2px, -2px); color: var(--cl1-surface); }
.cl1-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* === Magazine Zones (D 骨架核心) === */
.cl1-zones { max-width: var(--cl1-maxw); margin: 0 auto; }
.cl1-zone {
    padding: 32px 30px; margin-bottom: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    overflow: hidden;
}
.cl1-zone--even { background: var(--cl1-surface); }
.cl1-zone--odd { background: var(--cl1-zone-alt); }
.cl1-zone--first {
    border-top-left-radius: var(--cl1-radius-card);
    border-top-right-radius: var(--cl1-radius-card);
}
.cl1-zone--last {
    border-bottom-left-radius: var(--cl1-radius-card);
    border-bottom-right-radius: var(--cl1-radius-card);
    margin-bottom: 24px;
}

/* === Article Content === */
.cl1-article { font-size: 1rem; line-height: 1.8; }
.cl1-article p { margin: 0 0 16px; }

/* H2：首页橙底+左右18px墨边，负上边距贴 zone 顶成分区头带；下载页纯加粗 */
.cl1-home .cl1-article h2 {
    background: var(--cl1-orange); color: var(--cl1-surface);
    text-align: center; font-weight: 800; font-size: 1.4rem;
    padding: 14px 24px; margin: -32px -30px 20px;
    border-left: 18px solid var(--cl1-ink); border-right: 18px solid var(--cl1-ink);
    border-radius: 0;
}
.cl1-special .cl1-article h2 {
    font-weight: 700; font-size: 1.3rem; color: var(--cl1-ink);
    margin: 0 0 14px; padding: 0; background: none; border: none;
}

/* H3：橙色虚线下划线 */
.cl1-article h3 {
    font-weight: 700; font-size: 1.15rem; color: var(--cl1-ink);
    margin: 24px 0 10px; padding-bottom: 6px;
    border-bottom: 2px dashed var(--cl1-orange);
}

/* UL：纯 CSS 橙色勾图标 */
.cl1-article ul:not([class]) {
    list-style: none; padding-left: 0; margin: 0 0 16px;
}
.cl1-article ul:not([class]) li {
    position: relative; padding-left: 32px; margin-bottom: 8px;
}
.cl1-article ul:not([class]) li::before {
    content: ''; position: absolute; left: 0; top: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--cl1-orange);
}
.cl1-article ul:not([class]) li::after {
    content: ''; position: absolute; left: 5px; top: 8px;
    width: 8px; height: 12px;
    border-right: 2px solid var(--cl1-surface); border-bottom: 2px solid var(--cl1-surface);
    transform: rotate(45deg);
}

/* OL：默认编号 */
.cl1-article ol { padding-left: 24px; margin: 0 0 16px; }
.cl1-article ol li { margin-bottom: 6px; }

/* Table */
.cl1-article table {
    width: 100%; border-collapse: collapse; margin: 0 0 20px;
    font-size: 0.95rem;
}
.cl1-article table td, .cl1-article table th {
    padding: 10px 14px; border: 1px solid var(--cl1-border);
}
.cl1-article table th, .cl1-article table td:first-child {
    background: var(--cl1-canvas); font-weight: 600; color: var(--cl1-ink);
}

/* Figure (图片替换产物) */
.cl1-figure { margin: 20px 0; text-align: center; }
.cl1-figure img {
    max-width: 100%; height: auto; border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* === App Info Table (下载页) === */
.cl1-apptable { max-width: var(--cl1-maxw); margin: 0 auto 24px; padding: 0 20px; }
.cl1-apptable__table {
    width: 100%; border-collapse: collapse; background: var(--cl1-surface);
    border-radius: var(--cl1-radius-card); overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.cl1-apptable__row { border-bottom: 1px solid var(--cl1-border); }
.cl1-apptable__row:last-child { border-bottom: none; }
.cl1-apptable__label {
    width: 35%; padding: 12px 16px; text-align: left;
    font-weight: 700; color: var(--cl1-ink); background: var(--cl1-canvas);
    font-size: 0.92rem;
}
.cl1-apptable__data { padding: 12px 16px; color: var(--cl1-text); font-size: 0.92rem; }

/* === FAQ 手风琴（由 JS 生成） === */
.cl1-faq { margin: 20px 0; }
.cl1-faq__item {
    border: 1px solid var(--cl1-border); border-radius: var(--cl1-radius-card);
    margin-bottom: 10px; overflow: hidden;
    border-left: 4px solid var(--cl1-orange); border-right: 4px solid var(--cl1-orange);
}
.cl1-faq__trigger {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 14px 16px; background: var(--cl1-surface);
    border: none; cursor: pointer; text-align: left;
    font-weight: 700; font-size: 1rem; color: var(--cl1-ink);
}
.cl1-faq__trigger:hover { background: var(--cl1-canvas); }
.cl1-faq__icon {
    width: 24px; height: 24px; border-radius: 50%; background: var(--cl1-ink);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--cl1-surface); font-size: 1.2rem; font-weight: 700;
    transition: transform 0.25s;
}
.cl1-faq__item--open .cl1-faq__icon { transform: rotate(45deg); }
.cl1-faq__panel {
    display: none; padding: 0 16px 16px; background: var(--cl1-surface);
    font-size: 0.95rem; color: var(--cl1-text-soft); line-height: 1.7;
}
.cl1-faq__item--open .cl1-faq__panel { display: block; }

/* === 正文自带 details/summary（AI 内容原生 FAQ 折叠） === */
.cl1-article details {
    background: var(--cl1-surface);
    border: 1px solid var(--cl1-border);
    border-left: 4px solid var(--cl1-orange);
    border-right: 4px solid var(--cl1-orange);
    border-radius: var(--cl1-radius-card);
    margin-bottom: 10px;
    overflow: hidden;
}
.cl1-article details summary {
    padding: 14px 16px;
    font-weight: 700;
    color: var(--cl1-ink);
    cursor: pointer;
    list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cl1-article details summary::-webkit-details-marker { display: none; }
.cl1-article details summary::after {
    content: '+';
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--cl1-ink); color: var(--cl1-surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.cl1-article details[open] summary::after { content: '\2212'; }
.cl1-article details summary:hover { background: var(--cl1-canvas); }
.cl1-article details p { margin: 0; padding: 0 16px 14px; }

/* === Footer === */
.cl1-footer {
    background: var(--cl1-orange); color: var(--cl1-surface);
    text-align: center; padding: 20px;
    font-size: 0.9rem; margin-top: 24px;
}
.cl1-footer a { color: var(--cl1-surface); }
.cl1-footer__links { margin-top: 8px; }
.cl1-footer__links a { margin: 0 8px; text-decoration: none; }
.cl1-footer__links a:hover { text-decoration: underline; }

/* === Back to Top === */
.cl1-top {
    position: fixed; bottom: 30px; right: 30px; z-index: 200;
    width: 40px; height: 40px; border-radius: 4px;
    background: var(--cl1-orange); color: var(--cl1-surface);
    border: none; cursor: pointer; font-size: 1.2rem;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}
.cl1-top--show { display: flex; }

/* === Responsive === */
@media (max-width: 768px) {
    .cl1-header__inner { padding: 10px 20px; }
    .cl1-branding__logo { width: 40px; height: 40px; }
    .cl1-branding__name { font-size: 1rem; }
    .cl1-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--cl1-surface); border-top: 2px solid var(--cl1-orange); padding: 12px; gap: 4px; }
    .cl1-nav--open { display: flex; }
    .cl1-menu-toggle { display: block; }
    .cl1-hero { margin: 16px; padding: 24px 16px; }
    .cl1-hero__title { font-size: 1.5rem; }
    .cl1-hero__icon { width: 90px; height: 90px; }
    .cl1-zone { padding: 20px 24px 26px; }
    .cl1-home .cl1-article h2 { margin: -24px -24px 16px; font-size: 1.2rem; border-left-width: 12px; border-right-width: 12px; padding: 10px 16px; }
    .cl1-article h3 { font-size: 1.05rem; }
    .cl1-btn { padding: 10px 20px; font-size: 1rem; }
    .cl1-top { bottom: 20px; right: 16px; }
}
