/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: "Roboto", "PingFang SC", "Microsoft YaHei", sans-serif; background: #F5F7FA; color: #1A1A1A; line-height: 1.625; min-height: 100vh; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font: inherit; }
[hidden] { display: none !important; }

/* ===== CSS VARIABLES ===== */
:root {
  --blue-orange: #FF6B00;
  --blue-deep: #0A2540;
  --blue-neon: #00E5A0;
  --blue-bg: #F5F7FA;
  --blue-white: #FFFFFF;
  --blue-ink: #1A1A1A;
  --blue-gray: #6C7A89;
  --blue-success: #00C853;
  --blue-danger: #FF3B30;
  --blue-gradient: linear-gradient(135deg, #FF6B00 0%, #0A2540 100%);
  --blue-font-display: "Anton", "Impact", "Staatliches", "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --blue-font-body: "Roboto", "PingFang SC", "Microsoft YaHei", sans-serif;
  --blue-mono: "Roboto Mono", "Courier New", monospace;
  --blue-radius: 16px;
  --blue-radius-sm: 8px;
  --blue-shadow: 0 8px 30px rgba(10, 37, 64, 0.12);
  --blue-nav-h: 76px;
  --blue-container: 1280px;
  --blue-gutter: clamp(16px, 4vw, 40px);
  --blue-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--blue-font-display); font-weight: 400; line-height: 1.1; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); }
p { max-width: 70ch; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue-neon); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue-orange); color: var(--blue-white); }

/* ===== SKIP LINK ===== */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue-deep); color: var(--blue-white); padding: 12px 20px; z-index: 9999; border-radius: 0 0 8px 0; font-weight: 700; }
.skip-link:focus { left: 0; top: 0; color: #fff; }

/* ===== CONTAINERS ===== */
.site-main { display: block; }
#main-content { scroll-margin-top: var(--blue-nav-h); }
.container { width: min(var(--blue-container), 100% - var(--blue-gutter) * 2); margin-inline: auto; }
.section { position: relative; padding-block: clamp(48px, 8vw, 96px); }

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.site-header[data-scrolled="true"] {
  background: var(--blue-deep);
  border-bottom-color: rgba(0, 229, 160, 0.5);
  box-shadow: 0 6px 20px rgba(10, 37, 64, 0.3);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  width: min(var(--blue-container), 100% - var(--blue-gutter) * 2);
  margin-inline: auto;
  min-height: var(--blue-nav-h);
  gap: 20px;
  position: relative;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; background: var(--blue-orange);
  border-radius: 4px 12px 4px 12px; position: relative; flex-shrink: 0;
  box-shadow: 4px 4px 0 rgba(0, 229, 160, 0.5);
}
.brand-mark::after { content: ""; position: absolute; inset: 8px; border: 2px solid var(--blue-white); border-radius: 2px 8px 2px 8px; }
.brand-text { font-family: var(--blue-font-display); font-size: 1.75rem; color: var(--blue-white); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.brand-tag { margin-left: 6px; }
.site-header[data-scrolled="true"] .brand-text { color: var(--blue-white); }
.ui-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-neon); color: var(--blue-deep); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; font-family: var(--blue-mono); }
.ui-chip::before { content: "●"; font-size: 0.6rem; }

/* ===== NAVIGATION ===== */
.site-nav { display: flex; align-items: center; }
.nav-toggle { display: none; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item { margin: 0; }
.nav-link {
  display: flex; align-items: baseline; gap: 6px;
  color: var(--blue-white); font-size: 0.9rem; font-weight: 600;
  padding: 10px 12px; border-radius: 6px; position: relative;
  transition: background var(--blue-transition), color var(--blue-transition);
  opacity: 0.92;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); color: var(--blue-neon); opacity: 1; }
.nav-link[aria-current="page"] { color: var(--blue-white); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--blue-orange); border-radius: 2px 2px 0 0; }
.nav-index { font-family: var(--blue-mono); font-size: 0.65rem; color: var(--blue-orange); opacity: 0.85; }
.header-meta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-stats { display: inline-flex; gap: 8px; }
.stat-dot {
  font-family: var(--blue-mono); font-size: 0.6rem; color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2); padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.08em;
}
.stat-dot.live { color: var(--blue-neon); border-color: var(--blue-neon); background: rgba(0, 229, 160, 0.1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--blue-font-body); font-weight: 700; border-radius: 8px; padding: 12px 26px; transition: background var(--blue-transition), color var(--blue-transition), transform var(--blue-transition), box-shadow var(--blue-transition); cursor: pointer; border: 2px solid transparent; font-size: 0.95rem; line-height: 1.2; }
.btn-primary { background: var(--blue-orange); color: var(--blue-white); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.btn-primary:hover { background: #ff8030; transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2); }
.btn-ghost { background: transparent; color: var(--blue-neon); border-color: var(--blue-neon); }
.btn-ghost:hover { background: rgba(0, 229, 160, 0.1); transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 6px; }
.header-cta { background: var(--blue-neon); color: var(--blue-deep); border: none; }
.header-cta:hover { background: var(--blue-white); color: var(--blue-deep); box-shadow: none; transform: translateY(-2px); }
.header-progress { position: absolute; bottom: -2px; left: 0; height: 2px; width: 100%; background: var(--blue-neon); transform: scaleX(0); transform-origin: left center; opacity: 0; }
.site-header[data-scrolled="true"] .header-progress { opacity: 1; }

/* ===== FOOTER ===== */
.site-footer { background: var(--blue-deep); color: rgba(255, 255, 255, 0.85); padding-top: 72px; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, 0.04) 24%, rgba(255, 255, 255, 0.04) 24.1%, transparent 24.1%); }
.footer-grid { width: min(var(--blue-container), 100% - var(--blue-gutter) * 2); margin-inline: auto; display: grid; grid-template-columns: 1.2fr 2.4fr; gap: clamp(32px, 6vw, 80px); position: relative; padding-bottom: 48px; }
.footer-brand .brand-text { color: var(--blue-white); font-size: 2rem; }
.footer-tagline { margin-top: 16px; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }
.footer-contact { margin-top: 24px; display: grid; gap: 8px; }
.contact-line { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; }
.contact-line a { color: var(--blue-white); border-bottom: 1px solid transparent; transition: border-color 200ms; }
.contact-line a:hover { border-bottom-color: var(--blue-orange); }
.mono-label { font-family: var(--blue-mono); font-size: 0.6rem; color: var(--blue-neon); background: rgba(0, 229, 160, 0.08); padding: 2px 8px; border-radius: 4px; width: 52px; flex-shrink: 0; }
.social-links { display: flex; gap: 10px; margin-top: 24px; }
.social-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; font-weight: 700; font-size: 0.8rem; color: var(--blue-white); transition: all 200ms; cursor: default; }
.social-btn:hover { background: var(--blue-orange); border-color: var(--blue-orange); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35); }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-heading { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--blue-orange); font-family: var(--blue-mono); padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; transition: color 200ms, padding-left 200ms; padding-left: 0; }
.footer-links a:hover { color: var(--blue-neon); padding-left: 6px; }
.archive-toggle { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(0, 229, 160, 0.2); padding: 12px 14px; border-radius: 8px; color: var(--blue-white); width: 100%; justify-content: space-between; transition: background 200ms, border-color 200ms; }
.archive-toggle:hover { background: rgba(0, 229, 160, 0.1); }
.archive-toggle-icon { width: 14px; height: 14px; border-right: 2px solid var(--blue-neon); border-bottom: 2px solid var(--blue-neon); transform: rotate(45deg); transition: transform 300ms; margin-top: -4px; }
.archive-toggle[aria-expanded="true"] .archive-toggle-icon { transform: rotate(-135deg); margin-top: 4px; }
.archive-index { font-family: var(--blue-mono); font-size: 0.65rem; color: var(--blue-orange); }
.archive-panel { max-height: 0; overflow: hidden; transition: max-height 400ms ease, margin-top 300ms ease; margin-top: 0; border-left: 2px solid rgba(0, 229, 160, 0.3); padding-left: 14px; }
.archive-panel[data-open="true"] { max-height: 300px; margin-top: 12px; }
.archive-list { display: grid; gap: 8px; }
.archive-list a { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; position: relative; padding-left: 16px; transition: color 200ms; }
.archive-list a::before { content: "▸"; position: absolute; left: 0; color: var(--blue-neon); }
.archive-list a:hover { color: var(--blue-white); }
.archive-note { margin-top: 12px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); }
.footer-bottom { width: min(var(--blue-container), 100% - var(--blue-gutter) * 2); margin-inline: auto; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 18px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.footer-icp { font-family: var(--blue-mono); padding: 4px 12px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 4px; }
.footer-status { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--blue-neon); }
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-neon); box-shadow: 0 0 12px var(--blue-neon); animation: pulse 2s infinite alternate; }
@keyframes pulse { from { opacity: 0.6; transform: scale(0.9); } to { opacity: 1; transform: scale(1.1); } }

/* ===== MEDIA / IMAGE CONTAINERS ===== */
.media-cover { position: relative; overflow: hidden; border-radius: var(--blue-radius); background: var(--blue-deep); }
.media-cover img, .media-cover video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.05); transition: transform 400ms cubic-bezier(0.2, 0.8, 0.4, 1); }
.media-cover:hover img { transform: scale(1.04); }
.media-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10, 37, 64, 0.35), transparent 40%, transparent 70%, rgba(255, 107, 0, 0.2)); pointer-events: none; }
.media-cover--tall { aspect-ratio: 4 / 5; }
.media-cover--wide { aspect-ratio: 16 / 9; }
.media-cover--square { aspect-ratio: 1 / 1; }

/* ===== GENERIC COMPONENTS ===== */
.data-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--blue-mono); font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.data-badge[data-dir="up"] { color: var(--blue-success); background: rgba(0, 200, 83, 0.12); }
.data-badge[data-dir="up"]::after { content: "↑"; }
.data-badge[data-dir="down"] { color: var(--blue-danger); background: rgba(255, 59, 48, 0.12); }
.data-badge[data-dir="down"]::after { content: "↓"; }
.data-badge[data-dir="hold"] { color: var(--blue-gray); background: rgba(108, 122, 137, 0.12); }
.data-badge[data-dir="hold"]::after { content: "→"; }
.blue-card { background: var(--blue-white); border-radius: var(--blue-radius); box-shadow: var(--blue-shadow); padding: clamp(16px, 4vw, 32px); transition: transform 240ms ease, box-shadow 240ms ease; }
.blue-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(10, 37, 64, 0.15); }
.blue-card--flush { padding: 0; overflow: hidden; }
.blue-card__title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.blue-card__num { font-family: var(--blue-mono); font-size: 0.7rem; color: var(--blue-orange); }
.blue-card__divider { height: 2px; background: linear-gradient(90deg, var(--blue-orange), var(--blue-neon), transparent); margin: 16px 0; }

/* ===== MOBILE NAV ===== */
@media (max-width: 1024px) {
  .nav-wrap { flex-wrap: wrap; min-height: 68px; padding-block: 10px; }
  .brand-text { font-size: 1.5rem; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 10px 8px; color: var(--blue-white); font-weight: 700; font-size: 0.8rem; }
  .nav-toggle-box { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
  .nav-toggle-box span { height: 2px; background: var(--blue-white); border-radius: 2px; transition: transform 240ms, opacity 240ms; }
  .site-nav { order: 3; width: 100%; }
  .nav-list { display: flex; overflow-x: auto; gap: 0; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--blue-neon) rgba(0, 0, 0, 0.2); }
  .nav-list::-webkit-scrollbar { height: 4px; }
  .nav-list::-webkit-scrollbar-thumb { background: var(--blue-neon); border-radius: 9px; }
  .nav-item { flex-shrink: 0; }
  .nav-link { white-space: nowrap; padding: 8px 12px; }
  .nav-index { display: none; }
  .header-stats { display: none; }
  .header-cta { margin-left: auto; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col-wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav-wrap { gap: 8px; }
  .header-cta { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-status { margin-left: 0; }
  .footer-grid { padding-bottom: 24px; }
  .archive-panel[data-open="true"] { max-height: 340px; }
}

/* ===== RESPONSIVE MOBILE NAV CLOSED STATE ===== */
@media (max-width: 1024px) {
  .nav-list { display: flex; }
  .nav-toggle-text { display: none; }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible, button:focus-visible, .nav-toggle:focus-visible, .archive-toggle:focus-visible {
  outline: 3px solid var(--blue-neon);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(0, 229, 160, 0.2);
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .blue-card:hover, .btn:hover { transform: none; }
  .media-cover:hover img { transform: none; }
  .status-pulse { animation: none; }
  .header-progress { transition: none; }
  .archive-panel { transition: none; }
}

/* ===== ACCESSIBILITY HELPERS ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
@media (max-width: 1024px) {
  .sr-only.desktop-only { display: block; }
}

/* ===== DATA PROGRESS BAR ===== */
.site-header .header-progress { opacity: 1; }
