/* ===========================================================
   SEO优化研究院 · 左侧栏镜像布局
   配色：暖石墨 底 + 青绿 主 + 珊瑚 点缀
   编码：UTF-8
   2026-07-30 移动端优化（属性/CSS 层；DOM 标签与文案未动）
   =========================================================== */

:root {
    --main:    #12897e;   /* 青绿，主色 */
    --main-d:  #0d6b62;
    --coral:   #f2634a;   /* 珊瑚，点缀 */
    --ink:     #22282e;
    --ink2:    #5c6570;
    --ink3:    #97a0aa;
    --bg:      #eef1ee;   /* 暖灰绿底 */
    --card:    #ffffff;
    --line:    #dfe4e0;
    --r:       10px;
    --sh:      0 2px 6px rgba(34,40,46,.06);
    --sh-h:    0 10px 26px rgba(34,40,46,.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.75; color: var(--ink); background: var(--bg); font-size: 15px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; overflow-wrap: break-word; -webkit-text-size-adjust: 100%;
}
a { color: var(--main); text-decoration: none; }

.wide { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.flow { padding: 24px 22px; }

/* 进度条：scaleX 合成层（配套 JS 写 transform） */
.scrollbar {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%;
    transform: scaleX(0); transform-origin: 0 0;
    background: var(--coral); z-index: 1200; will-change: transform;
}

/* 顶栏 */
.nav {
    background: var(--card); box-shadow: var(--sh); position: sticky; top: 0; z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
}
.nav__box { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo {
    font-weight: 700; font-size: 1.3rem; color: var(--ink);
    display: inline-flex; align-items: center; gap: 3px; min-height: 44px;
}
.logo__b {
    background: var(--main); color: #fff; padding: 3px 9px; border-radius: 6px;
    font-size: .95rem; margin-right: 5px;
}
.menu { display: flex; gap: 28px; }
.menu a {
    color: var(--ink2); font-weight: 500; font-size: .95rem; padding: 6px 0; position: relative;
    display: inline-flex; align-items: center; min-height: 44px;
}
.menu a.cur { color: var(--main); font-weight: 600; }
.menu a.cur::after {
    content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 3px;
    background: var(--main); border-radius: 2px;
}
.hamb {
    display: none; font-size: 1.5rem; background: none; border: none; color: var(--ink); cursor: pointer;
    width: 44px; height: 44px; align-items: center; justify-content: center; flex-shrink: 0;
}
.pop { background: var(--card); box-shadow: var(--sh); border-top: 1px solid var(--line); }
.pop.closed { display: none; }
.pop a {
    display: flex; align-items: center; min-height: 48px; padding: 12px 22px;
    border-bottom: 1px solid var(--line); color: var(--ink2); font-weight: 500;
}

/* 面包屑 */
.path {
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
    font-size: .86rem; color: var(--ink3); margin-bottom: 22px;
}
.path a { color: var(--ink3); display: inline-flex; align-items: center; min-height: 44px; }
.path i { font-style: normal; color: var(--line); }
.path em { color: var(--ink2); font-style: normal; font-weight: 500; }

/* 镜像双栏：左侧栏 + 右正文 */
.two { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 30px; margin-bottom: 42px; }
.two .col-l, .two .col-r { min-width: 0; }

/* 左侧栏 */
.col-l { display: flex; flex-direction: column; gap: 20px; }
.pod { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; }
.pod__t {
    font-size: 1.02rem; font-weight: 600; color: var(--ink); margin-bottom: 15px;
    position: relative; padding-left: 12px;
}
.pod__t::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 4px; height: 15px;
    background: var(--coral); border-radius: 2px;
}
.find {
    display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--r); padding: 9px 13px;
}
.find input { flex: 1; border: none; background: none; outline: none; font-size: .92rem; color: var(--ink); min-width: 0; }
.find span { color: var(--ink3); }
.list { list-style: none; }
.list li + li { margin-top: 2px; }
.list a {
    display: flex; align-items: center; min-height: 44px; color: var(--ink2);
    font-size: .92rem; padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.thumbs { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.thumbs a { display: flex; gap: 11px; align-items: center; min-height: 58px; }
.thumbs img {
    width: 58px; height: 58px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--bg);
}
.thumbs span { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.thumbs b { font-weight: 500; font-size: .86rem; line-height: 1.4; color: var(--ink2); }
.thumbs i { font-style: normal; font-size: .74rem; color: var(--ink3); }

/* 右正文 */
.col-r { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.head { padding: 30px 34px; border-bottom: 1px solid var(--line); }
.cate {
    display: inline-block; font-size: .8rem; font-weight: 700; color: #fff; background: var(--main);
    padding: 5px 14px; border-radius: 5px; margin-bottom: 15px; letter-spacing: .5px;
}
.h1 { font-size: 1.95rem; line-height: 1.32; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.info { display: flex; flex-wrap: wrap; gap: 18px; font-size: .84rem; color: var(--ink3); align-items: center; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); font-weight: 500; }
.who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

.body { padding: 30px 34px; }
.abs {
    background: linear-gradient(135deg, rgba(18,137,126,.07), rgba(242,99,74,.05));
    border-left: 4px solid var(--main); padding: 18px 22px; border-radius: 0 var(--r) var(--r) 0;
    margin-bottom: 26px;
}
.abs strong { display: block; color: var(--main-d); margin-bottom: 7px; font-size: 1.05rem; }

.pics { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 26px 0; }
.pics img {
    width: 100%; max-width: 100%; height: 205px; object-fit: cover; border-radius: var(--r);
    display: block; background: var(--bg);
}

.txt p { margin-bottom: 17px; line-height: 1.85; }
.txt h2 {
    font-size: 1.45rem; font-weight: 700; color: var(--ink); margin: 26px 0 14px;
    padding-left: 13px; border-left: 4px solid var(--main);
}
.key {
    background: rgba(242,99,74,.06); border: 1px solid rgba(242,99,74,.2);
    padding: 18px 22px; border-radius: var(--r); margin: 26px 0;
}
.key strong { display: block; color: var(--coral); margin-bottom: 7px; font-size: 1.05rem; }

.tags {
    display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
    margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
}
.tags__t { font-weight: 600; color: var(--ink); margin-right: 4px; }
.tags a {
    display: inline-flex; align-items: center; min-height: 44px; font-size: .84rem; color: var(--main);
    background: rgba(18,137,126,.08); padding: 5px 13px; border-radius: 16px;
}

/* 相关文章 */
.more { margin: 42px 0; }
.more__t {
    font-size: 1.4rem; font-weight: 700; color: var(--ink); margin-bottom: 22px;
    padding-left: 14px; border-left: 5px solid var(--coral);
}
.more__g { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 22px; }
.mc { display: block; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.mc img {
    width: 100%; max-width: 100%; height: 155px; object-fit: cover; display: block; background: var(--bg);
}
.mc__b { padding: 16px 18px; }
.mc__c { font-size: .76rem; font-weight: 600; color: var(--coral); text-transform: uppercase; }
.mc__b h3 {
    font-size: 1.06rem; font-weight: 600; line-height: 1.4; color: var(--ink);
    margin: 7px 0 10px; overflow-wrap: break-word;
}
.mc__b p { font-size: .8rem; color: var(--ink3); }

/* 关键词导航 */
.wall { margin: 42px 0; padding: 32px; background: var(--main); border-radius: var(--r); color: #fff; }
.wall__t { font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; }
.wall__p { font-size: .92rem; color: rgba(255,255,255,.8); margin-bottom: 20px; max-width: 720px; }
.wall__c { display: flex; flex-wrap: wrap; gap: 10px; }
.wall__c a {
    display: inline-flex; align-items: center; min-height: 44px; font-size: .89rem; font-weight: 500;
    color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    padding: 8px 16px; border-radius: 18px;
}

/* 页脚 */
.ft { background: #1a2420; color: rgba(255,255,255,.75); padding: 46px 0 24px; margin-top: 50px; }
.ft__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 28px; }
.ft__c h3 { color: #fff; font-size: 1.08rem; font-weight: 600; margin-bottom: 16px; }
.ft__c a {
    display: flex; align-items: center; min-height: 44px; color: rgba(255,255,255,.62);
    font-size: .88rem; margin-bottom: 4px;
}
.ft__c p { font-size: .88rem; color: rgba(255,255,255,.55); line-height: 1.7; }
.ft__cr {
    text-align: center; padding-top: 22px; margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; color: rgba(255,255,255,.5);
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
}

/* 回到顶部 */
.up {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    width: 44px; height: 44px; border-radius: 50%; background: var(--main); color: #fff;
    border: none; font-size: 1.2rem; cursor: pointer; box-shadow: var(--sh-h);
    opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility .25s, transform .25s; z-index: 900;
}
.up.vis { opacity: 1; visibility: visible; }

/* 响应式：窄屏侧栏下沉到正文之后（DOM 不改，仅 order） */
@media (max-width: 992px) {
    .two { grid-template-columns: 1fr; gap: 24px; }
    .col-l { order: 2; }
    .col-r { order: 1; }
}
@media (max-width: 768px) {
    body { font-size: 16px; }
    .menu { display: none; }
    .hamb { display: flex; }
    .h1 { font-size: 1.35rem; line-height: 1.35; }
    .info { gap: 10px; }
    .head, .body { padding: 18px; }
    /* 保持 2 列图库，压低单卡高度 */
    .pics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pics img { height: 130px; }
    .more__g { grid-template-columns: 1fr; }
    .wall { padding: 22px; }
    .nav__box { height: 56px; }
    .find { min-height: 44px; }
    .find input { font-size: 16px; } /* 防 iOS 聚焦缩放 */
    .thumbs b {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
}
@media (hover: hover) {
    a { transition: color .18s; }
    a:hover { color: var(--coral); }
    .list a:hover { color: var(--main); padding-left: 4px; }
    .tags a:hover { background: var(--main); color: #fff; }
    .mc { transition: transform .2s, box-shadow .2s; }
    .mc:hover { transform: translateY(-4px); box-shadow: var(--sh-h); }
    .wall__c a:hover { background: var(--coral); border-color: var(--coral); }
    .ft__c a:hover { color: var(--coral); }
    .up:hover { transform: translateY(-3px); background: var(--main-d); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important; animation-duration: .01ms !important;
    }
    .up, .up.vis { transform: none !important; }
}
