/* ===== Design System - 清新明亮现代科技风格 ===== */
:root {
    --bg: #f8fafc;
    --bg2: #f1f5f9;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --border: rgba(99, 102, 241, 0.08);
    --border2: rgba(99, 102, 241, 0.15);
    --txt: #0f172a;
    --txt2: #475569;
    --txt3: #94a3b8;
    --accent: #4f46e5;
    --accent2: #6366f1;
    --accent3: #818cf8;
    --accent-g: linear-gradient(135deg, #4f46e5, #7c3aed);
    --accent-g2: linear-gradient(135deg, #4f46e5, #06b6d4);
    --ok: #10b981;
    --ok-bg: rgba(16, 185, 129, 0.08);
    --warn: #d97706;
    --warn-bg: rgba(217, 119, 6, 0.08);
    --err: #ef4444;
    --err-bg: rgba(239, 68, 68, 0.08);
    --blue: #2563eb;
    --blue-bg: rgba(37, 99, 235, 0.08);
    --purple: #7c3aed;
    --purple-bg: rgba(124, 58, 237, 0.08);
    --cyan: #0891b2;
    --cyan-bg: rgba(8, 145, 178, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-lg: 20px;
    --card: #ffffff;
    --shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.08), 0 1px 3px rgba(79, 70, 229, 0.02);
    --shadow-sm: 0 4px 6px -1px rgba(79, 70, 229, 0.05), 0 2px 4px -1px rgba(79, 70, 229, 0.03);
    --shadow-lg: 0 20px 40px -15px rgba(79, 70, 229, 0.12);
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.65;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 40%);
    min-height: 100vh;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt3); }

/* ===== Nav ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 12px rgba(79, 110, 247, 0.04);
}
.navbar .brand {
    display: flex;
    align-items: center;
    margin-right: 2.5rem;
}
.navbar .brand-text {
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    background: var(--accent-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.02em;
}
.navbar .brand-logo {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    display: block;
    border-radius: 4px;
}
.navbar .links { display: flex; gap: .25rem; }
.navbar .links a {
    color: var(--txt2);
    text-decoration: none;
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.navbar .links a:hover { color: var(--accent); background: rgba(79, 110, 247, 0.08); }
.navbar .links a.on { color: #fff; background: var(--accent-g); box-shadow: 0 2px 12px rgba(79, 110, 247, 0.3); }
.navbar .links a.on::after { display: none; }

/* Hamburger Menu Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--txt);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Layout ===== */
.container { max-width: 1320px; margin: 0 auto; padding: 1.75rem 2rem; }
.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .35rem;
    background: var(--accent-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-sub { color: var(--txt2); font-size: .875rem; margin-bottom: 1.75rem; }

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-g);
    opacity: 0;
    transition: var(--transition);
}
.card:hover { border-color: rgba(79, 110, 247, 0.2); box-shadow: var(--shadow); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card h2, .card h3 { color: var(--txt); font-size: .95rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -.01em; }
.card h3 { display: flex; align-items: center; gap: .5rem; }

/* ===== Stats Grid ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.stat:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-g);
    opacity: 0;
    transition: var(--transition);
}
.stat:hover::before { opacity: 1; }
.stat::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background: var(--accent-g);
    border-radius: 50%;
    opacity: 0.04;
    transition: var(--transition);
}
.stat:hover::after { opacity: 0.08; transform: scale(1.2); }
.stat .lb { font-size: .75rem; color: var(--txt2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: .4rem; }
.stat .vl { font-size: 1.75rem; font-weight: 800; color: var(--txt); letter-spacing: -.03em; }
.stat .sub { font-size: .75rem; color: var(--txt3); margin-top: .25rem; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
thead { position: sticky; top: 0; z-index: 10; }
th {
    background: linear-gradient(180deg, #f5f7ff, #eef1fb);
    color: var(--accent);
    font-weight: 700;
    padding: .8rem 1rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid var(--border);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: var(--transition);
}
th:hover { color: var(--purple); background: linear-gradient(180deg, #eef1ff, #e8ebf8); }
th .arr { font-size: .65rem; margin-left: .3rem; opacity: .6; }
td {
    padding: .7rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--txt);
    transition: var(--transition);
}
tr:hover td { background: rgba(79, 110, 247, 0.04); }
tr.hl td { background: rgba(16, 185, 129, 0.08); color: var(--ok); font-weight: 600; }
tr.wr td { background: rgba(239, 68, 68, 0.06); color: var(--err); }
.fund-detail-row td { background: var(--bg) !important; }
.fund-detail-row td > div { animation: slideDown 0.25s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.fund-name-link:hover { text-decoration: underline; }

/* ===== Pills ===== */
.pill { display: inline-block; padding: .2rem .65rem; border-radius: 20px; font-size: .6875rem; font-weight: 700; letter-spacing: .01em; }
.pg { background: var(--ok-bg); color: var(--ok); }
.py { background: var(--warn-bg); color: var(--warn); }
.pr { background: var(--err-bg); color: var(--err); }
.pb { background: var(--blue-bg); color: var(--blue); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: -.01em;
}
.btn-p {
    background: var(--accent-g);
    color: #fff;
    box-shadow: 0 4px 20px rgba(79, 110, 247, 0.3);
}
.btn-p:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(79, 110, 247, 0.4); }
.btn-p:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== Custom Multi-Select ===== */
.ms-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}
.ms-wrap label {
    display: block;
    font-weight: 700;
    margin-bottom: .5rem;
    font-size: .8125rem;
    color: var(--txt);
}
.ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .85rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: .8125rem;
    color: var(--txt2);
    min-height: 42px;
}
.ms-trigger:hover { border-color: var(--accent2); }
.ms-trigger.open { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.15); }
.ms-trigger .ms-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-trigger .ms-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s;
    color: var(--txt3);
    flex-shrink: 0;
}
.ms-trigger.open .ms-arrow { transform: rotate(180deg); }
.ms-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-g);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    margin-right: .5rem;
}
.ms-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 320px;
    overflow: hidden;
    display: none;
    animation: dropIn .15s ease-out;
}
.ms-dropdown.show { display: flex; flex-direction: column; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ms-search {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}
.ms-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: .4rem .6rem;
    font-size: .8125rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: var(--surface2);
}
.ms-search input:focus { border-color: var(--accent); background: var(--surface); }
.ms-list {
    overflow-y: auto;
    padding: .35rem 0;
    flex: 1;
}
.ms-opt {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: .8125rem;
}
.ms-opt:hover { background: rgba(79, 110, 247, 0.06); }
.ms-opt.selected { background: rgba(79, 110, 247, 0.1); }
.ms-cb {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    background: var(--surface);
}
.ms-opt.selected .ms-cb {
    background: var(--accent);
    border-color: var(--accent);
}
.ms-opt.selected .ms-cb::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}
.ms-opt-info { flex: 1; min-width: 0; }
.ms-opt-name { font-weight: 600; color: var(--txt); }
.ms-opt-rank { font-size: 0.75rem; color: var(--accent2); margin-right: 0.3rem; font-weight: 700; }
.ms-opt-meta { font-size: .6875rem; color: var(--txt3); margin-top: .1rem; }
.ms-footer {
    padding: .5rem .75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: .5rem;
    background: var(--surface2);
}
.ms-footer button {
    flex: 1;
    padding: .35rem;
    border: none;
    border-radius: var(--radius-xs);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.ms-footer .ms-sel-all { background: var(--accent); color: #fff; }
.ms-footer .ms-sel-all:hover { background: var(--accent2); }
.ms-footer .ms-clear { background: var(--surface); color: var(--txt2); border: 1px solid var(--border); }
.ms-footer .ms-clear:hover { color: var(--err); border-color: var(--err); }

/* ===== Forms ===== */
select {
    background: var(--surface);
    color: var(--txt);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .55rem .85rem;
    font-size: .8125rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6178' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2rem;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.15); }
.fg { margin-bottom: 1.25rem; }
.fg label { display: block; font-weight: 700; margin-bottom: .45rem; font-size: .8125rem; color: var(--txt); }
.fg .rd { display: flex; justify-content: space-between; font-size: .75rem; color: var(--txt3); margin-top: .35rem; }
.fg .rd strong { color: var(--accent); font-size: .875rem; font-weight: 700; }

/* Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    opacity: 0.8;
}
input[type=range]:hover { opacity: 1; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(79, 110, 247, 0.4), 0 0 0 3px var(--accent);
    cursor: pointer;
    transition: var(--transition);
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 2px 14px rgba(79, 110, 247, 0.5), 0 0 0 4px var(--accent); }
input[type=range]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(79, 110, 247, 0.4), 0 0 0 3px var(--accent);
    cursor: pointer;
    border: none;
}

/* ===== Grids ===== */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
.cht { position: relative; width: 100%; max-width: 480px; margin: 0 auto; }

/* ===== Tags ===== */
.tag {
    display: inline-block;
    background: var(--purple-bg);
    color: var(--purple);
    padding: .2rem .6rem;
    border-radius: var(--radius-xs);
    font-size: .6875rem;
    font-weight: 700;
    margin-left: .4rem;
}

/* ===== Algorithm Card ===== */
.algo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.algo-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--txt);
    transition: var(--transition);
}
.algo-toggle:hover { background: rgba(79, 110, 247, 0.04); }
.algo-arrow {
    transition: transform .2s;
    color: var(--txt3);
}
.algo-card.open .algo-arrow { transform: rotate(180deg); }
.algo-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.algo-card.open .algo-content { max-height: 800px; }
.algo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0 1.25rem 1.25rem;
}
.algo-item {
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 1rem;
}
.algo-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}
.algo-weight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 26px;
    border-radius: 13px;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 0 8px;
}
.algo-item p {
    font-size: .8125rem;
    color: var(--txt2);
    line-height: 1.6;
    margin: 0;
}
.algo-note {
    margin: 0 1.25rem 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(79, 110, 247, 0.08), rgba(124, 93, 248, 0.08));
    border-radius: var(--radius-sm);
    font-size: .8125rem;
    color: var(--txt2);
    line-height: 1.7;
    border-left: 3px solid var(--accent);
}

/* ===== Fund List in Chart ===== */
.fund-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}
.fund-tag {
    display: inline-block;
    background: var(--surface2);
    color: var(--txt2);
    padding: .2rem .5rem;
    border-radius: 4px;
    font-size: .6875rem;
    cursor: default;
    transition: var(--transition);
}
.fund-tag:hover {
    background: var(--blue-bg);
    color: var(--accent);
}

/* ===== Loading ===== */
.ld { text-align: center; padding: 2.5rem; color: var(--txt3); }
.ld::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-right-color: var(--purple);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin-bottom: .75rem;
}
.ld::after { content: '加载中'; display: block; font-size: .8125rem; margin-top: .5rem; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }



/* ===== Segmented Control ===== */
.seg-control {
    display: inline-flex;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}
.seg-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    border: none;
    border-radius: 7px;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    color: var(--txt2);
    white-space: nowrap;
}
.seg-btn:hover {
    color: var(--txt);
    background: rgba(79, 110, 247, 0.06);
}
.seg-btn.on {
    background: var(--accent-g);
    color: #fff;
    box-shadow: 0 2px 12px rgba(79, 110, 247, 0.3);
}
.seg-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ===== Portfolio Tabs ===== */
.pf-tabs {
    display: flex;
    gap: .25rem;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 1rem;
    width: fit-content;
    border: 1px solid var(--border);
}
.pf-tab {
    background: transparent;
    color: var(--txt2);
    border: none;
    padding: .5rem 1.2rem;
    border-radius: 7px;
    font-size: .8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.pf-tab:hover { color: var(--txt); background: rgba(79, 110, 247, 0.06); }
.pf-tab.on { background: var(--accent-g); color: #fff; box-shadow: 0 2px 12px rgba(79, 110, 247, 0.3); }
.pf-panel { animation: fadeIn .25s ease-out; }



/* ===== SEO FAQ ===== */
.seo-faq {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.seo-faq .seo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--txt);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.seo-faq .seo-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--accent-g);
    border-radius: 2px;
}
.faq-item {
    margin-bottom: 1.5rem;
}
.faq-item:last-child {
    margin-bottom: 0;
}
.faq-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--txt);
    margin-bottom: 0.5rem;
}
.faq-item p {
    font-size: 0.85rem;
    color: var(--txt2);
    line-height: 1.6;
}
.faq-item p strong {
    color: var(--txt);
    font-weight: 500;
}

/* ===== Article Content (Investment Guide) ===== */
.article-container {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    border: 1px solid var(--border);
    margin-top: 1.5rem;
}
.article-content {
    color: var(--txt2);
    line-height: 1.7;
    font-size: 0.95rem;
}
.article-content h2 {
    color: var(--txt);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
.article-content h2:first-child {
    margin-top: 0;
}
.article-content p {
    margin-bottom: 1rem;
}
.article-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}
.article-content strong {
    color: var(--txt);
    font-weight: 600;
}
.article-content h3 {
    color: var(--txt);
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.article-content ol li { margin-bottom: 0.5rem; }
.article-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border2);
    transition: var(--transition);
}
.article-content a:hover {
    color: var(--accent2);
    border-bottom-color: var(--accent2);
}
.article-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    background: var(--bg2);
    color: var(--purple);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}
.quote-block {
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0;
    color: var(--txt);
    font-size: 0.9rem;
}

/* ===== FAQ Collapsible ===== */
.seo-faq details {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}
.seo-faq details:last-of-type {
    border-bottom: none;
}
.seo-faq summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--txt);
    cursor: pointer;
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--txt3);
    transition: var(--transition);
}
.seo-faq details[open] summary::after {
    content: '−';
}
.seo-faq details p {
    font-size: 0.85rem;
    color: var(--txt2);
    line-height: 1.6;
    padding: 0.25rem 0 0.75rem;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.45);
    padding: 2rem;
}
.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-info {
    font-size: .75rem;
    color: var(--txt3);
    line-height: 1.8;
}
.footer-info strong {
    color: var(--txt2);
    font-weight: 600;
}
.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: .75rem;
    color: var(--txt3);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--accent);
}

/* ===== Article Preview Cards (Homepage) ===== */
.article-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.article-preview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.article-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-g);
    opacity: 0;
    transition: var(--transition);
}
.article-preview-card:hover {
    border-color: rgba(79, 110, 247, 0.2);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}
.article-preview-card:hover::before { opacity: 1; }
.article-preview-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .6rem;
    color: var(--txt);
}
.article-preview-card h3 a {
    color: var(--txt);
    text-decoration: none;
    transition: var(--transition);
}
.article-preview-card h3 a:hover { color: var(--accent); }
.article-preview-card p {
    font-size: .8125rem;
    color: var(--txt2);
    line-height: 1.65;
    flex: 1;
}
.article-preview-card .read-more {
    margin-top: .75rem;
    font-size: .8125rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: var(--transition);
}
.article-preview-card .read-more:hover { gap: .5rem; color: var(--accent2); }

/* ===== Accessibility ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--bg2) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-xs);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-line { height: 14px; margin-bottom: .5rem; border-radius: 4px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-card { height: 120px; border-radius: var(--radius); }

/* ===== Article Enhancements ===== */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .85rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.article-content table th {
    background: linear-gradient(180deg, #f5f7ff, #eef1fb);
    color: var(--accent);
    padding: .7rem .9rem;
    text-align: left;
    font-weight: 700;
    font-size: .8rem;
    border-bottom: 2px solid var(--border);
    cursor: default;
    text-transform: none;
    letter-spacing: normal;
}
.article-content table td {
    padding: .6rem .9rem;
    border-bottom: 1px solid var(--border);
    color: var(--txt);
    text-align: left;
}
.article-content table tr:last-child td { border-bottom: none; }
.article-content table tr:hover td { background: rgba(79, 110, 247, 0.03); }
.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(99, 102, 241, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--txt);
    font-size: .9rem;
}
.article-content blockquote p { margin-bottom: 0; }
.article-content figure {
    margin: 1.5rem 0;
    text-align: center;
}
.article-content figcaption {
    font-size: .75rem;
    color: var(--txt3);
    margin-top: .5rem;
}

/* ===== Print Styles ===== */
@media print {
    .navbar, .nav-toggle, footer, .btn, .seg-control, .ms-wrap { display: none !important; }
    .container { max-width: 100%; padding: 0; }
    .card, .article-container { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .article-content { font-size: 11pt; line-height: 1.8; }
    .article-content h2 { page-break-after: avoid; }
    a { color: #000; text-decoration: underline; }
}

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s ease-out; }

/* ===== 手机响应式 ===== */
@media (max-width: 1024px) {
    .container { padding: 1.5rem; }
    .g2 { grid-template-columns: 1fr; }
    .g3 { grid-template-columns: 1fr 1fr; }
    .article-preview-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
        height: 56px;
        flex-wrap: nowrap;
    }
    .navbar .brand { margin-right: auto; font-size: 1rem; }
    .nav-toggle { display: flex; }
    .navbar .links {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 1rem;
        gap: .25rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }
    .navbar .links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .navbar .links a {
        padding: .75rem 1rem;
        font-size: .9rem;
        width: 100%;
        text-align: left;
    }
    .container { padding: 1rem; }
    .g2, .g3 { grid-template-columns: 1fr; gap: 1rem; }
    .article-preview-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .page-title { font-size: 1.3rem; }
    .page-sub { font-size: .8125rem; margin-bottom: 1.25rem; }
    .card { padding: 1.25rem; }
    .stat { padding: 1rem; }
    .stat .vl { font-size: 1.5rem; }
    .table-wrap { margin: 0 -1rem; border-radius: 0; border-left: none; border-right: none; }
    table { font-size: .75rem; }
    th, td { padding: .6rem .5rem; }
    .btn { width: 100%; }
    .pf-tabs { width: 100%; }
    .pf-tab { flex: 1; text-align: center; }
    .cht { max-width: 100%; }
    .ms-dropdown { max-height: 250px; }
    .seg-control { width: 100%; }
    .seg-btn { flex: 1; justify-content: center; padding: .5rem .75rem; font-size: .8125rem; }
    .article-container { padding: 1.25rem; }
    .seo-faq { padding: 1.25rem; }
    .algo-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 1rem; }
    .footer-links { gap: .75rem; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
    .stat .vl { font-size: 1.25rem; }
}
