/* ==========================================================================
   胖哥的维修工作站 — 新版前台样式
   设计语言：午夜玻璃 + 琥珀金渐变，深浅双主题，全部本地资源无外链
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
    --bg: #05070d;
    --bg-soft: #0a0f1a;
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .08);
    --surface-solid: #0e1420;
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .18);
    --text: #e9eefb;
    --text-2: #b3bfd4;
    --muted: #7f8da6;
    --accent: #ffb347;
    --accent-2: #ff7a18;
    --accent-3: #ffd79a;
    --accent-soft: rgba(255, 150, 20, .13);
    --accent-line: rgba(255, 150, 20, .32);
    --glow: rgba(255, 140, 0, .34);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --shadow-sm: 0 10px 28px rgba(0, 0, 0, .35);
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 11px;
    --max: 1240px;
    --hdr-h: 68px;
    --grid-line: rgba(255, 255, 255, .035);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-soft: #ffffff;
    --surface: rgba(255, 255, 255, .72);
    --surface-2: #ffffff;
    --surface-solid: #ffffff;
    --line: rgba(15, 23, 42, .085);
    --line-2: rgba(15, 23, 42, .16);
    --text: #0f172a;
    --text-2: #3b4658;
    --muted: #6c7789;
    --accent: #f08a00;
    --accent-2: #d96b00;
    --accent-3: #b98215;
    --accent-soft: rgba(240, 138, 0, .10);
    --accent-line: rgba(240, 138, 0, .28);
    --glow: rgba(240, 138, 0, .20);
    --shadow-lg: 0 22px 50px rgba(15, 23, 42, .12);
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, .08);
    --grid-line: rgba(15, 23, 42, .04);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 45% at 12% -6%, var(--glow) 0%, transparent 62%),
        radial-gradient(ellipse 55% 40% at 92% 2%, rgba(120, 90, 255, .18) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 108%, var(--glow) 0%, transparent 65%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 46%, var(--bg) 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 85%);
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.skip {
    position: absolute; left: -9999px; top: 8px; z-index: 999;
    background: var(--accent); color: #1a1200; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 12px; }

/* ---------- 3. 顶栏 ---------- */
.hdr {
    position: sticky; top: 0; z-index: 120;
    height: var(--hdr-h);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--line);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .hdr { background: rgba(8, 11, 18, .8); }
    html[data-theme="light"] .hdr { background: rgba(255, 255, 255, .82); }
}

.hdr-in {
    max-width: var(--max); margin: 0 auto; padding: 0 22px; height: 100%;
    display: flex; align-items: center; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px;
    display: grid; place-items: center;
    font-size: 19px; font-weight: 800; color: #23160a;
    background: linear-gradient(140deg, var(--accent-3), var(--accent) 45%, var(--accent-2));
    box-shadow: 0 8px 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 15.5px; letter-spacing: .3px; font-weight: 700; }
.brand-txt i {
    font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .6px;
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
    position: relative; padding: 8px 13px; border-radius: 10px;
    font-size: 14px; color: var(--text-2); transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.on { color: var(--text); background: var(--surface-2); }
.nav a.on::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px;
    border-radius: 2px; background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
}

.hdr-act { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.sbtn {
    display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 12px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--surface); color: var(--muted);
    font-size: 13.5px; transition: border-color .2s, color .2s, background .2s;
}
.sbtn:hover { color: var(--text); border-color: var(--accent-line); background: var(--surface-2); }
.sbtn kbd {
    font-family: var(--font); font-size: 11px; color: var(--muted);
    border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; background: var(--surface-2);
}

.icon-btn {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 16px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
    transition: all .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--surface-2); }

.hdr-cta {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
    border-radius: 11px; font-size: 13.5px; font-weight: 600; color: #23160a;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 50%, var(--accent-2));
    box-shadow: 0 10px 24px var(--glow);
    transition: transform .2s, box-shadow .2s;
}
.hdr-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px var(--glow); }

.menu-btn { display: none; }

/* 移动端下拉菜单 */
.mnav {
    display: none; position: fixed; inset: var(--hdr-h) 0 auto 0; z-index: 110;
    background: var(--surface-solid); border-bottom: 1px solid var(--line);
    padding: 10px 18px 18px; box-shadow: var(--shadow-lg);
}
.mnav.open { display: block; animation: fadeDown .22s ease; }
.mnav a {
    display: block; padding: 12px 10px; border-radius: 10px; font-size: 15px;
    color: var(--text-2); border-bottom: 1px solid var(--line);
}
.mnav a:last-child { border-bottom: 0; }
.mnav a:active { background: var(--surface-2); }

@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 4. 通用区块 ---------- */
.sec { margin: 62px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.sec-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
    margin-bottom: 9px;
}
.sec-eyebrow::before {
    content: ""; width: 18px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
}
.sec-title { font-size: 26px; font-weight: 700; letter-spacing: .5px; margin: 0; }
.sec-desc { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.sec-more { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.sec-more:hover { color: var(--accent); }

/* ---------- 5. 首页 Hero ---------- */
.hero { position: relative; padding: 78px 0 20px; text-align: center; overflow: hidden; }
.hero-in { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }

.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px; border-radius: 999px; font-size: 12.5px; letter-spacing: .8px;
    color: var(--accent); background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}
.hero-tag .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
    font-size: clamp(32px, 5.4vw, 58px); line-height: 1.14; letter-spacing: -1px;
    margin: 22px 0 0; font-weight: 800;
}
.hero h1 .grad {
    background: linear-gradient(100deg, var(--accent-3), var(--accent) 40%, var(--accent-2) 78%, #ff5e7a);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
    font-size: clamp(13.5px, 1.7vw, 16px); color: var(--text-2);
    margin: 18px auto 0; max-width: 660px; letter-spacing: .4px;
}

.hero-search {
    max-width: 620px; margin: 34px auto 0; position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 9px 9px 18px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line-2);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: border-color .25s, box-shadow .25s;
}
.hero-search:focus-within {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm);
}
.hero-search .ico { font-size: 16px; opacity: .7; }
.hero-search input {
    flex: 1; min-width: 0; height: 40px; border: 0; background: transparent;
    font-size: 15px; outline: none;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search button {
    height: 40px; padding: 0 20px; border: 0; border-radius: 12px;
    font-size: 14px; font-weight: 600; color: #23160a;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 50%, var(--accent-2));
    transition: transform .18s, filter .18s;
}
.hero-search button:hover { transform: translateY(-1px); filter: brightness(1.05); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 20px; }
.chip {
    font-size: 12.5px; color: var(--text-2); padding: 6px 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    transition: all .2s;
}
.chip:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.hero-stats {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 42px;
    margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line);
}
.hstat { display: flex; flex-direction: column; gap: 3px; }
.hstat b {
    font-size: 26px; font-weight: 800; letter-spacing: -.5px;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hstat span { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }

/* ---------- 6. 分类卡片 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }

.cat-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    padding: 22px 22px 18px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s;
    isolation: isolate;
}
.cat-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 62%);
    transition: opacity .35s;
}
.cat-card::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity .35s;
}
.cat-card:hover { transform: translateY(-6px); border-color: var(--accent-line); box-shadow: 0 22px 50px var(--glow); }
.cat-card:hover::before,
.cat-card:hover::after { opacity: 1; }

.cat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cat-ico {
    width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
    font-size: 26px; line-height: 1;
    background: linear-gradient(140deg, var(--accent-soft), transparent);
    border: 1px solid var(--accent-line);
}
.cat-badge {
    font-size: 11.5px; color: var(--accent); padding: 3px 10px; border-radius: 999px;
    background: var(--accent-soft); border: 1px solid var(--accent-line); white-space: nowrap;
}
.cat-name { font-size: 18.5px; font-weight: 700; margin: 16px 0 0; letter-spacing: .3px; }
.cat-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 8px 0 0; }
.cat-preview { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 14px 0 0; }
.cat-preview li {
    font-size: 11.5px; color: var(--text-2); padding: 3px 9px; border-radius: 7px;
    background: var(--surface-2); max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
    font-size: 13px; color: var(--muted);
}
.cat-go { color: var(--accent); font-weight: 600; transition: transform .25s; }
.cat-card:hover .cat-go { transform: translateX(4px); }

/* ---------- 7. 常用直达 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.quick {
    display: flex; align-items: center; gap: 11px; padding: 13px 15px;
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    transition: all .22s;
}
.quick:hover { transform: translateY(-3px); border-color: var(--accent-line); background: var(--surface-2); }
.quick .q-ico {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
    font-size: 18px; background: var(--accent-soft); border: 1px solid var(--accent-line); flex-shrink: 0;
}
.quick .q-txt { min-width: 0; }
.quick b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 8. 联系条 ---------- */
.cta {
    position: relative; overflow: hidden; margin: 62px 0;
    padding: 38px 34px; border-radius: 26px;
    background: linear-gradient(120deg, var(--accent-soft), transparent 55%), var(--surface);
    border: 1px solid var(--accent-line);
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta::after {
    content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
    border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 68%);
    pointer-events: none;
}
.cta h3 { margin: 0; font-size: 23px; letter-spacing: .3px; }
.cta p { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.cta-act { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 24px;
    border-radius: 13px; font-size: 14.5px; font-weight: 600; transition: all .22s;
}
.btn-primary {
    color: #23160a;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 50%, var(--accent-2));
    box-shadow: 0 12px 28px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }

/* ---------- 9. 页脚 ---------- */
.ftr { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.ftr-in {
    max-width: var(--max); margin: 0 auto; padding: 44px 22px 30px;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 30px;
}
.ftr h4 { font-size: 15px; margin: 0 0 14px; letter-spacing: .5px; }
.ftr p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.ftr ul a { font-size: 13px; color: var(--muted); }
.ftr ul a:hover { color: var(--accent); }
.ftr-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.ftr-bar {
    max-width: var(--max); margin: 0 auto; padding: 16px 22px 30px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--muted);
}

/* ---------- 10. 内页头部 ---------- */
.phead { padding: 46px 0 6px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { opacity: .5; }
.phead h1 {
    font-size: clamp(26px, 3.6vw, 40px); margin: 16px 0 0; letter-spacing: -.4px; font-weight: 800;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.phead h1 .p-ico {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 23px; background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.phead .p-desc { font-size: 14.5px; color: var(--muted); margin: 12px 0 0; max-width: 760px; }

/* ---------- 11. 工具条 / 筛选 ---------- */
.toolbar {
    position: sticky; top: calc(var(--hdr-h) + 10px); z-index: 60;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 26px 0 24px; padding: 11px 12px; border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border: 1px solid var(--line); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .toolbar { background: rgba(10, 14, 22, .86); }
    html[data-theme="light"] .toolbar { background: rgba(255, 255, 255, .88); }
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.tab {
    font-size: 13px; padding: 7px 15px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
    transition: all .2s;
}
.tab:hover { color: var(--accent); border-color: var(--accent-line); }
.tab.on {
    color: #23160a; font-weight: 600; border-color: transparent;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
    box-shadow: 0 8px 20px var(--glow);
}
.tabs .tab .n { opacity: .65; font-size: 11.5px; margin-left: 4px; }

.filter-box {
    display: flex; align-items: center; gap: 8px; min-width: 220px;
    padding: 0 12px; height: 38px; border-radius: 11px;
    background: var(--surface); border: 1px solid var(--line);
}
.filter-box input { border: 0; background: transparent; outline: none; font-size: 13.5px; width: 100%; }
.filter-box .ico { opacity: .6; font-size: 14px; }

/* ---------- 12. 条目卡片 ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }

.item {
    position: relative; overflow: hidden; display: flex; gap: 14px;
    padding: 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s, box-shadow .28s;
}
.item::before {
    content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 65%);
    transition: opacity .3s;
}
.item:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 18px 40px var(--glow); }
.item:hover::before { opacity: 1; }
.item > * { position: relative; z-index: 1; }

.item-ico {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center;
    font-size: 22px; background: linear-gradient(140deg, var(--accent-soft), transparent);
    border: 1px solid var(--accent-line);
}
.item-body { min-width: 0; flex: 1; }
.item-name {
    font-size: 15px; font-weight: 650; letter-spacing: .2px; word-break: break-word;
    display: flex; align-items: center; gap: 7px;
}
.item:hover .item-name { color: var(--accent); }
.item-desc { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-top: 6px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
    font-size: 11px; padding: 2.5px 9px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
}
.tag.acc { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.item-arrow { color: var(--muted); font-size: 13px; align-self: center; transition: transform .25s, color .25s; }
.item:hover .item-arrow { color: var(--accent); transform: translateX(3px); }

/* 紧凑型（图标 + 名称） */
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 13px; }
.nav-card {
    position: relative; overflow: hidden; padding: 20px 12px 16px; border-radius: var(--radius);
    text-align: center; background: var(--surface); border: 1px solid var(--line);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.nav-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 16px 34px var(--glow); }
.nav-card .n-ico { font-size: 26px; line-height: 1; display: block; margin-bottom: 10px; }
.nav-card .n-name { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.nav-card .n-desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

.group-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 16px; font-weight: 700; margin: 40px 0 16px; letter-spacing: .3px;
}
.group-title::before {
    content: ""; width: 4px; height: 17px; border-radius: 3px;
    background: linear-gradient(180deg, var(--accent-3), var(--accent-2));
}
.group-title .g-n { font-size: 12px; color: var(--muted); font-weight: 500; }
.group-title:first-child { margin-top: 0; }

/* ---------- 13. 文章 ---------- */
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.art-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    padding: 22px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s, box-shadow .28s;
}
.art-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 20px 44px var(--glow); }
.art-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.art-cat { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 3px 11px; border-radius: 999px; }
.art-title { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 14px 0 0; }
.art-card:hover .art-title { color: var(--accent); }
.art-sum { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 10px 0 0; }
.art-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: auto; padding-top: 16px; font-size: 12.5px; color: var(--muted);
}
.art-foot .go { color: var(--accent); font-weight: 600; }

/* 单篇阅读 */
.post-wrap { max-width: 820px; margin: 0 auto; }
.post {
    padding: 42px 46px 48px; border-radius: 26px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.post h1 { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.4; margin: 0 0 16px; letter-spacing: -.3px; }
.post-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: 13px; color: var(--muted); padding-bottom: 20px; margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.post-body { font-size: 15.5px; line-height: 1.95; color: var(--text-2); }
.post-body h3 {
    font-size: 18px; color: var(--text); margin: 34px 0 12px; padding-left: 13px;
    border-left: 4px solid var(--accent); line-height: 1.5;
}
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--text); }
.post-body code {
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px;
    background: var(--accent-soft); color: var(--accent);
    padding: 2px 7px; border-radius: 6px;
}
.post-body table {
    width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px;
    border-radius: 12px; overflow: hidden;
}
.post-body th, .post-body td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
.post-body th { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.post-foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- 14. 下载中心 ---------- */
.dl-layout { display: grid; grid-template-columns: 232px 1fr; gap: 24px; align-items: start; margin-top: 26px; }
.dl-side {
    position: sticky; top: calc(var(--hdr-h) + 16px);
    padding: 14px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
}
.dl-side h4 {
    font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase;
    color: var(--muted); margin: 4px 0 12px; padding-left: 8px;
}
.dl-cats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-cat {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: var(--text-2);
    cursor: pointer; transition: all .18s;
}
.dl-cat:hover { background: var(--surface-2); color: var(--text); }
.dl-cat.on {
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
    color: #23160a; font-weight: 600;
}
.dl-cat .n { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.dl-cat.on .n { background: rgba(255, 255, 255, .3); color: #23160a; }

.dl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dl-head h2 { font-size: 19px; margin: 0; }
.dl-head .cnt { font-size: 13px; color: var(--muted); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dl-card {
    display: flex; flex-direction: column; gap: 13px; padding: 18px;
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.dl-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 16px 36px var(--glow); }
.dl-top { display: flex; gap: 13px; align-items: flex-start; }
.dl-ico {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
    font-size: 22px; background: linear-gradient(140deg, var(--accent-soft), transparent);
    border: 1px solid var(--accent-line);
}
.dl-info { min-width: 0; flex: 1; }
.dl-name { font-size: 14.5px; font-weight: 650; line-height: 1.5; word-break: break-word; }
.dl-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.dl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dl-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: auto; padding-top: 13px; border-top: 1px dashed var(--line);
    font-size: 12px; color: var(--muted);
}
.dl-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px;
    border: 0; border-radius: 10px; font-size: 13px; font-weight: 600; color: #23160a;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
    transition: transform .18s, filter .18s;
}
.dl-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.dl-btn[disabled] { opacity: .45; cursor: not-allowed; background: var(--surface-2); color: var(--muted); }

/* ---------- 15. 搜索面板 ---------- */
.palette { position: fixed; inset: 0; z-index: 300; display: none; }
.palette.open { display: block; }
.palette-mask { position: absolute; inset: 0; background: rgba(3, 5, 10, .62); backdrop-filter: blur(6px); animation: fadeIn .18s ease; }
.palette-box {
    position: relative; width: min(680px, calc(100% - 32px)); margin: 12vh auto 0;
    border-radius: 20px; overflow: hidden;
    background: var(--surface-solid); border: 1px solid var(--line-2);
    box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
    animation: popIn .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
.pal-in { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.pal-in .ico { font-size: 17px; opacity: .6; }
.pal-in input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; }
.pal-in kbd {
    font-size: 11px; color: var(--muted); border: 1px solid var(--line);
    border-radius: 5px; padding: 2px 6px;
}
.pal-list { max-height: 54vh; overflow: auto; padding: 8px; }
.pal-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px;
    border-radius: 12px; cursor: pointer;
}
.pal-row .r-ico {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    font-size: 16px; background: var(--surface-2); border: 1px solid var(--line);
}
.pal-row .r-body { min-width: 0; flex: 1; }
.pal-row .r-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-row .r-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-row .r-cat { font-size: 11px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pal-row.sel { background: var(--accent-soft); }
.pal-row.sel .r-name { color: var(--accent); }
.pal-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.pal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 17px; border-top: 1px solid var(--line);
    font-size: 12px; color: var(--muted);
}

/* ---------- 16. 悬浮联系 & 回顶 ---------- */
/* ---------- 15.5 论文助手悬浮窗（右侧贴边） ---------- */
.pfloat {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 135; display: flex; align-items: stretch;
}
.pfloat-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    width: 46px; padding: 18px 0; border: 1px solid var(--accent-line); border-right: 0;
    border-radius: 14px 0 0 14px; cursor: pointer; font: inherit;
    background: linear-gradient(160deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
    color: #23160a; box-shadow: 0 12px 30px var(--glow);
    transition: width .22s, filter .22s;
}
.pfloat-tab:hover { filter: brightness(1.06); }
.pf-ico { font-size: 19px; line-height: 1; }
.pf-label {
    writing-mode: vertical-rl; letter-spacing: 3px; font-size: 13px; font-weight: 700;
}
.pfloat-tab::after {
    content: ""; position: absolute; right: 8px; top: 14px; width: 7px; height: 7px;
    border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 3px rgba(255, 77, 79, .25);
    animation: pfPulse 2.2s ease-in-out infinite;
}
@keyframes pfPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }

.pfloat-body {
    width: 262px; max-width: 78vw; padding: 18px 16px 16px; position: relative;
    background: var(--surface-solid, #0e1420); border: 1px solid var(--accent-line);
    border-right: 0; border-radius: 16px 0 0 16px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .45);
    opacity: 0; visibility: hidden; transform: translateX(12px);
    transition: all .26s cubic-bezier(.2, .8, .2, 1); max-height: 76vh; overflow: auto;
}
.pfloat.open .pfloat-body { opacity: 1; visibility: visible; transform: none; }
.pfloat-x {
    position: absolute; right: 10px; top: 8px; width: 24px; height: 24px;
    border: 0; border-radius: 7px; background: transparent; color: var(--muted);
    font-size: 16px; line-height: 1; cursor: pointer;
}
.pfloat-x:hover { color: var(--accent); }
.pf-title { font-size: 15px; font-weight: 700; letter-spacing: .3px; padding-right: 22px; }
.pf-text { font-size: 12.5px; color: var(--muted); line-height: 1.85; margin-top: 8px; }
.pf-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pf-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 12.5px; padding: 7px 10px; border-radius: 9px;
    background: var(--surface-2, rgba(255, 255, 255, .05)); border: 1px solid var(--line);
}
.pf-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-p { color: var(--accent); font-weight: 700; flex: none; }
.pf-p.pf-days { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.pf-btn {
    display: flex; align-items: center; justify-content: center; height: 42px; margin-top: 13px;
    border-radius: 12px; font-size: 14px; font-weight: 700; color: #23160a; text-decoration: none;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 50%, var(--accent-2));
    box-shadow: 0 10px 24px var(--glow); transition: transform .18s;
}
.pf-btn:hover { transform: translateY(-1px); text-decoration: none; }
.pf-tip { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 9px; }

@media (max-width: 700px) {
    .pfloat { top: auto; bottom: 84px; transform: none; }
    .pfloat-tab { width: 40px; padding: 14px 0; }
    .pf-label { font-size: 12px; letter-spacing: 2px; }
    .pfloat-body { width: 240px; }
}

/* ---------- 16. 悬浮联系 & 回顶 ---------- */
.dock { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.dock-panel {
    width: 246px; padding: 18px; border-radius: 18px;
    background: var(--surface-solid); border: 1px solid var(--accent-line);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(10px) scale(.96);
    transition: all .25s cubic-bezier(.2, .8, .2, 1);
    transform-origin: bottom right;
}
.dock.open .dock-panel { opacity: 1; visibility: visible; transform: none; }
.dock-panel .d-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dock-panel .d-text { font-size: 13px; color: var(--muted); line-height: 1.75; margin-top: 9px; }
.dock-panel .d-phone {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    margin-top: 13px; padding: 11px; border-radius: 11px;
    font-size: 15px; font-weight: 700; color: #23160a;
    background: linear-gradient(135deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
}
.dock-fab {
    width: 54px; height: 54px; border-radius: 50%; border: 0; font-size: 22px;
    display: grid; place-items: center; color: #23160a;
    background: linear-gradient(140deg, var(--accent-3), var(--accent) 50%, var(--accent-2));
    box-shadow: 0 14px 32px var(--glow);
    transition: transform .25s;
}
.dock-fab:hover { transform: scale(1.06); }
.dock.open .dock-fab { transform: rotate(90deg); }
.to-top {
    position: fixed; left: 20px; bottom: 20px; z-index: 130;
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    font-size: 17px; background: var(--surface-solid); border: 1px solid var(--line);
    color: var(--text-2); box-shadow: var(--shadow-sm);
    opacity: 0; visibility: hidden; transition: all .25s;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { color: var(--accent); border-color: var(--accent-line); }

/* ---------- 17. 提示 / 空白 ---------- */
.toast {
    position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
    padding: 12px 22px; border-radius: 12px; font-size: 14px; z-index: 400;
    background: var(--surface-solid); border: 1px solid var(--accent-line);
    color: var(--text); box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty {
    padding: 64px 20px; text-align: center; color: var(--muted); font-size: 14px;
    border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
}
.hide { display: none !important; }

/* ---------- 18. 滚动出现动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1080px) {
    .ftr-in { grid-template-columns: 1fr 1fr; gap: 26px; }
    .dl-layout { grid-template-columns: 1fr; }
    .dl-side { position: static; }
    .dl-cats { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
    .dl-cat { flex: none; }
}

@media (max-width: 900px) {
    .nav { display: none; }
    .menu-btn { display: grid; }
    .hdr-cta { display: none; }
    .sbtn kbd { display: none; }
}

@media (max-width: 640px) {
    :root { --hdr-h: 60px; }
    .wrap, .hdr-in, .ftr-in, .ftr-bar { padding-left: 15px; padding-right: 15px; }
    .hero { padding: 46px 0 12px; }
    .hero h1 { margin-top: 16px; }
    .hero-search { flex-direction: column; align-items: stretch; padding: 12px; gap: 9px; }
    .hero-search .ico { display: none; }
    .hero-search input { height: 42px; padding: 0 6px; text-align: center; }
    .hero-search button { height: 44px; }
    .hero-stats { gap: 12px 26px; }
    .hstat b { font-size: 22px; }
    .sec { margin: 44px 0; }
    .sec-title { font-size: 21px; }
    .cat-grid { grid-template-columns: 1fr; }
    .item-grid, .dl-grid, .art-grid { grid-template-columns: 1fr; }
    .nav-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
    .nav-card { padding: 16px 8px 13px; }
    .nav-card .n-ico { font-size: 22px; }
    .nav-card .n-name { font-size: 12.5px; }
    .post { padding: 26px 20px 32px; border-radius: 20px; }
    .post-body { font-size: 15px; }
    .cta { padding: 26px 20px; border-radius: 20px; }
    .cta h3 { font-size: 19px; }
    .toolbar { top: calc(var(--hdr-h) + 6px); padding: 9px; }
    .filter-box { min-width: 0; width: 100%; }
    .brand-txt i { display: none; }
    .ftr-in { grid-template-columns: 1fr; }
    .dock { right: 14px; bottom: 14px; }
    .dock-panel { width: 78vw; }
    .to-top { left: 14px; bottom: 14px; }
    .palette-box { margin-top: 8vh; }
}

@media print {
    .hdr, .dock, .to-top, .ftr, .cta { display: none; }
    body::before, body::after { display: none; }
}
