/* ===== 今日外汇品牌设计系统 v2（2026-10-12）===== */
:root {
    --brand: #E66C1D;
    --brand-dark: #C75A12;
    --brand-soft: #FFF8F0;
    --brand-tint: #FFE4C4;
    --up: #DC2626;
    --down: #16A34A;
}

/* Hero 品牌渐变（替代蓝渐变） */
.hero-brand { background: linear-gradient(135deg, #E66C1D 0%, #D45F14 55%, #B8500D 100%); }
.hero-brand .hero-sub { color: rgba(255,255,255,0.88); }

/* 内页品牌标题 */
.page-title { font-size: 1.75rem; font-weight: 800; letter-spacing: 0.02em; color: #111827; line-height: 1.25; margin-bottom: 0.75rem; }
@media (min-width: 640px) { .page-title { font-size: 2rem; } }
.page-sub { color: #6b7280; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* 数据表格精致化 */
.table-brand tbody tr { transition: background-color 0.15s ease; }
.table-brand tbody tr:nth-child(even) { background-color: #FAFAF9; }
.table-brand tbody tr:hover { background-color: #FFF3E6; }
.table-brand tbody tr:hover td { color: #111827; }

/* 涨跌色 */
.chg-up { color: var(--up); }
.chg-down { color: var(--down); }

/* 微动效：卡片入场 stagger */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: riseIn 0.5s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.13s; }
.stagger > *:nth-child(4) { animation-delay: 0.18s; }
.stagger > *:nth-child(5) { animation-delay: 0.23s; }
.stagger > *:nth-child(6) { animation-delay: 0.28s; }
.stagger > *:nth-child(7) { animation-delay: 0.33s; }
.stagger > *:nth-child(8) { animation-delay: 0.38s; }

.count-up { font-variant-numeric: tabular-nums; }

/* ===== 暗色模式（跟随系统） ===== */
@media (prefers-color-scheme: dark) {
    body { background: #111827; color: #E5E7EB; }
    .bg-white { background-color: #1F2937; }
    .bg-gray-50 { background-color: #151F2C; }
    .bg-gray-100 { background-color: #26313F; }
    .bg-gray-200 { background-color: #374151; }
    .text-gray-900 { color: #F3F4F6; }
    .text-gray-700 { color: #D1D5DB; }
    .text-gray-600 { color: #9CA3AF; }
    .text-gray-500 { color: #9CA3AF; }
    .text-gray-400 { color: #6B7280; }
    .text-gray-300 { color: #6B7280; }
    .border-gray-200 { border-color: #374151; }
    .border-gray-300 { border-color: #4B5563; }
    .border-gray-100 { border-color: #2A3543; }
    .text-red-600, .text-red-500, .text-red-700 { color: #F87171; }
    .text-green-500, .text-green-600 { color: #4ADE80; }
    input, select, textarea { background-color: #1F2937; color: #E5E7EB; border-color: #4B5563; }
    .shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
    .shadow-md { box-shadow: 0 2px 6px rgba(0,0,0,0.55); }
    .shadow-lg { box-shadow: 0 6px 16px rgba(0,0,0,0.6); }
    .table-brand tbody tr:nth-child(even) { background-color: #17202D; }
    .table-brand tbody tr:hover { background-color: #2A2118; }
    .page-title { color: #F3F4F6; }
    .hero-brand { background: linear-gradient(135deg, #B8500D 0%, #A3470C 55%, #8A3B09 100%); }
}

/* 快捷金额 chips */
.qa-chip { padding: 4px 12px; border-radius: 9999px; font-size: 12px; font-weight: 600; border: 1px solid #E5E7EB; background: #fff; color: #4B5563; cursor: pointer; transition: all 0.15s ease; }
.qa-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.qa-swap { border-color: var(--brand-tint); background: var(--brand-soft); color: var(--brand); }
@media (prefers-color-scheme: dark) {
    .qa-chip { background: #1F2937; border-color: #4B5563; color: #D1D5DB; }
    .qa-chip:hover { background: #2A2118; }
    .qa-swap { background: #2A2118; border-color: var(--brand-dark); color: #F0A868; }
}

/* ===== 手动暗色切换（html.dark，与系统偏好同款覆盖，2026-10-12 v3）===== */
html.dark body { background: #111827; color: #E5E7EB; }
html.dark .bg-white { background-color: #1F2937; }
html.dark .bg-gray-50 { background-color: #151F2C; }
html.dark .bg-gray-100 { background-color: #26313F; }
html.dark .bg-gray-200 { background-color: #374151; }
html.dark .text-gray-900 { color: #F3F4F6; }
html.dark .text-gray-700 { color: #D1D5DB; }
html.dark .text-gray-600 { color: #9CA3AF; }
html.dark .text-gray-500 { color: #9CA3AF; }
html.dark .text-gray-400 { color: #6B7280; }
html.dark .text-gray-300 { color: #6B7280; }
html.dark .border-gray-200 { border-color: #374151; }
html.dark .border-gray-300 { border-color: #4B5563; }
html.dark .border-gray-100 { border-color: #2A3543; }
html.dark .text-red-600, html.dark .text-red-500, html.dark .text-red-700 { color: #F87171; }
html.dark .text-green-500, html.dark .text-green-600 { color: #4ADE80; }
html.dark input, html.dark select, html.dark textarea { background-color: #1F2937; color: #E5E7EB; border-color: #4B5563; }
html.dark .shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
html.dark .shadow-md { box-shadow: 0 2px 6px rgba(0,0,0,0.55); }
html.dark .shadow-lg { box-shadow: 0 6px 16px rgba(0,0,0,0.6); }
html.dark .shadow-xl { box-shadow: 0 10px 24px rgba(0,0,0,0.6); }
html.dark .table-brand tbody tr:nth-child(even) { background-color: #17202D; }
html.dark .table-brand tbody tr:hover { background-color: #2A2118; }
html.dark .page-title { color: #F3F4F6; }
html.dark .hero-brand { background: linear-gradient(135deg, #B8500D 0%, #A3470C 55%, #8A3B09 100%); }
html.dark .qa-chip { background: #1F2937; border-color: #4B5563; color: #D1D5DB; }
html.dark .qa-chip:hover { background: #2A2118; }
html.dark .qa-swap { background: #2A2118; border-color: var(--brand-dark); color: #F0A868; }
html.dark .themeToggleBtn { color: #9CA3AF; }
html.dark .themeToggleBtn:hover { color: #F3F4F6; background: #26313F; }

/* ===== riseIn 单类（IntersectionObserver 挂接用）===== */
.riseIn { animation: riseIn 0.5s ease-out both; }

/* ===== hero 大数字 ===== */
.hero-rate-num { font-variant-numeric: tabular-nums; min-width: 7ch; letter-spacing: 0.01em; text-shadow: 0 2px 12px rgba(0,0,0,0.18); }

/* ===== v5: brand utility mappings (blue residue cleanup) ===== */
.bg-brand-soft{background-color:#FFF4EA;}
.bg-brand-tint{background-color:#FFE4D1;}
.border-brand-soft{border-color:#F8CBA3;}
.hv-soft:hover{background-color:#FFF4EA;}
.hv-text-deep:hover{color:#C2591A;}
.hv-deep:hover{background-color:#C2591A;}
.hv-border-brand:hover{border-color:#E66C1D;}
.group:hover .group-hv-deep{background-color:#C2591A;}
.panel-brand{background:linear-gradient(90deg,#FFF4EA 0%,#FFE4D1 100%);}
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:#E66C1D;color:#fff;padding:8px 16px;border-radius:0 0 8px 0;font-size:14px;}
.skip-link:focus{left:0;}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #E66C1D;outline-offset:2px;}
.table-brand th,.table-brand td{font-variant-numeric:tabular-nums;}
.chg-up,.chg-down{font-variant-numeric:tabular-nums;}
/* v5 dark variants */
html.dark .bg-brand-soft{background-color:rgba(230,108,29,0.10);}
html.dark .bg-brand-tint{background-color:rgba(230,108,29,0.18);}
html.dark .border-brand-soft{border-color:rgba(230,108,29,0.35);}
html.dark .hv-soft:hover{background-color:rgba(230,108,29,0.14);}
html.dark .panel-brand{background:linear-gradient(90deg,rgba(230,108,29,0.10),rgba(230,108,29,0.18));}

/* ===== v5b: residual mappings ===== */
.text-brand-deep{color:#9A3D0A;}
.border-brand{border-color:#E66C1D;}
html.dark .text-brand-deep{color:#F79B5C;}
