/* 东方财富下载落地站 - 红色财经门户风 */
:root {
  --primary: #C8102E;
  --primary-bright: #E8382B;
  --primary-dark: #8B0A1E;
  --bg-soft: #F7F5F3;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e5e0db;
  --white: #ffffff;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif", "Songti SC", "SimSun", serif;
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.75;
  font-size: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-bright);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.site-nav {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(139, 10, 30, 0.25);
}

.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand:hover {
  color: var(--white);
}

.brand svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--white);
  padding: 8px 14px;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover {
  color: var(--white);
  opacity: 0.9;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.nav-links a.active {
  border-bottom-color: var(--white);
  font-weight: 700;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 55%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero .lead {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 36em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 420px;
  height: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1.4;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  background: #fff5f5;
}

.btn-primary:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn-red {
  background: var(--primary);
  color: var(--white);
}

.btn-red:hover {
  background: var(--primary-bright);
}

.btn-red:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn-ghost {
  background: var(--bg-soft);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--white);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--primary-dark);
}

.section-head p {
  margin: 0 auto;
  max-width: 40em;
  color: var(--text-muted);
}

.section-intro {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* Capability grid */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cap-item {
  padding: 8px 4px;
}

.cap-item .icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 16, 46, 0.08);
  border-radius: 8px;
  margin-bottom: 14px;
  color: var(--primary);
}

.cap-item .icon-wrap svg {
  width: 26px;
  height: 26px;
}

.cap-item h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--primary-dark);
}

.cap-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Stats bar */
.stats-bar {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.92;
}

/* Feature alternate */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse .feature-text {
  order: 2;
}

.feature-row.reverse .feature-media {
  order: 1;
}

.feature-text h3 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: var(--primary-dark);
}

.feature-text p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.feature-media {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  min-height: 220px;
}

.feature-media svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

/* Platform cards */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.platform-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 18px;
  text-align: center;
}

.platform-card .plat-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(200, 16, 46, 0.08);
  border-radius: 10px;
}

.platform-card .plat-icon svg {
  width: 28px;
  height: 28px;
}

.platform-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.platform-card p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 3.2em;
}

/* Compare table */
.compare-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.compare-table tbody tr:nth-child(even) {
  background: #faf8f6;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
}

.check {
  color: var(--primary);
  font-weight: 700;
}

/* Reviews */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-item {
  padding: 4px 0;
}

.review-item blockquote {
  margin: 0 0 14px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.review-meta {
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.review-meta span {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* FAQ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: var(--primary-dark);
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

/* Download page */
.download-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}

.download-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.download-main h1 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--primary-dark);
}

.download-main .lead {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
}

.badge svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 56px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -17px;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.req-block h3 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.req-block ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.req-block li {
  margin-bottom: 8px;
}

.changelog {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.changelog li:first-child {
  padding-top: 0;
}

.changelog .ver {
  font-weight: 700;
  color: var(--primary);
  margin-right: 10px;
}

.changelog .date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.changelog p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

/* Article page */
.article-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 48px 0 40px;
}

.article-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
}

.article-hero p {
  margin: 0;
  opacity: 0.95;
  max-width: 40em;
}

.article {
  background: var(--white);
  padding: 48px 0 64px;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
}

.article-body h2 {
  margin: 36px 0 14px;
  font-size: 1.4rem;
  color: var(--primary-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(200, 16, 46, 0.15);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 1.15rem;
  color: var(--primary);
}

.article-body p {
  margin: 0 0 16px;
  color: var(--text);
  text-align: justify;
}

.article-body ul {
  margin: 0 0 16px;
  padding-left: 1.3em;
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: 8px;
}

.cta-box {
  margin: 36px 0;
  padding: 28px 24px;
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
}

.cta-box p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.cta-box .btn {
  margin-right: 10px;
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  background: #2a1518;
  color: #d8d0ce;
  padding: 40px 0 28px;
  font-size: 0.92rem;
}

.site-footer a {
  color: #f0c8c8;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-grid p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-safe {
  background: rgba(255, 255, 255, 0.06);
  padding: 14px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  color: #a89896;
  line-height: 1.7;
}

/* Spinner used by download.js */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .download-main,
  .feature-row,
  .feature-row.reverse .feature-text,
  .feature-row.reverse .feature-media,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-text,
  .feature-row.reverse .feature-media {
    order: unset;
  }

  .cap-grid,
  .review-grid {
    grid-template-columns: 1fr 1fr;
  }

  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .site-nav .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
  }

  .cap-grid,
  .review-grid,
  .platform-grid,
  .req-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .section {
    padding: 48px 0;
  }
}
