:root {
  --bg: #f6f8fb;
  --card: #fff;
  --text: #1a1f36;
  --muted: #6b7280;
  --accent: #c41e3a;
  --accent2: #1e4d8c;
  --border: #e5e7eb;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: #111827;
  color: #fff;
  padding: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 56px; height: 56px; border-radius: 9px; object-fit: contain; flex-shrink: 0; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { letter-spacing: .03em; }
.brand small { color: #94a3b8; margin-top: 3px; font-size: .68rem; font-weight: 400; }
.main-nav { align-self: stretch; display: flex; }
.main-nav a { display: flex; align-items: center; color: #cbd5e1; padding: 0 1rem; border-bottom: 3px solid transparent; font-size: .9rem; }
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom-color: var(--accent); text-decoration: none; }

.hero {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
}
.hero h1 { margin-top: 0; }
.stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; color: var(--accent); }
.stat span { font-size: 0.85rem; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

.card-list { display: flex; flex-direction: column; gap: 0.75rem; }
.card, .hotspot-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: inherit;
  transition: box-shadow 0.15s;
}
.card:hover, .hotspot-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); text-decoration: none; }
.card h3 { margin: 0.25rem 0; font-size: 1.05rem; }
.card-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.heat { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.heat.large { font-size: 1rem; }

.badge {
  display: inline-block;
  background: #eef2ff;
  color: var(--accent2);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.tag {
  display: inline-block;
  background: #f3f4f6;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin: 0.15rem 0.15rem 0 0;
}
.tag.exam { background: #fef3c7; color: #92400e; }
.tags { margin-top: 0.5rem; }

.news-feed { list-style: none; padding: 0; margin: 0; }
.news-feed li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 0.5rem; }
.news-feed.full .news-item { padding: 1rem 1.25rem; }
.meta { color: var(--muted); font-size: 0.85rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.filter-bar a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}
.filter-bar a.active { background: var(--accent2); color: #fff; border-color: var(--accent2); }

.summary-box, .insight-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.cross-card { margin-bottom: 1rem; color: inherit; }
.cross-card h4 { margin: 0.75rem 0 0.25rem; font-size: 0.9rem; }

.empty { color: var(--muted); padding: 1rem; background: var(--card); border-radius: var(--radius); }
.empty code { background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; }
.lead { color: var(--muted); }
.btn-link { display: inline-block; margin-top: 0.5rem; font-weight: 600; }
.page-back-nav { margin-bottom: 1rem; }
.page-back {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--accent2);
  font-size: .84rem;
  font-weight: 600;
}
.page-back:hover { text-decoration: none; background: #f8fafc; border-color: #cbd5e1; }
.raw-text { white-space: pre-wrap; font-size: 0.95rem; color: #374151; }
.entity-list { padding-left: 1.25rem; }

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .footer-org {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.hotspot-header { margin-bottom: 1rem; }
.article-detail h1 { font-size: 1.5rem; line-height: 1.35; }

/* TAScope 风格情报概览 */
.overview-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.2rem 4rem;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 28%, rgba(196,30,58,.38), transparent 20%),
    linear-gradient(125deg, #111827 0%, #172554 65%, #1e3a5f 100%);
  box-shadow: 0 16px 40px rgba(15,23,42,.18);
}
.overview-hero::after {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, transparent 35%, #000);
}
.overview-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.eyebrow { display: block; color: #fda4af; font-size: .68rem; font-weight: 800; letter-spacing: .17em; }
.eyebrow.dark { color: var(--accent); }
.overview-hero h1 { margin: .65rem 0 1rem; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.1; letter-spacing: -.035em; }
.overview-hero h1 em { color: #fda4af; font-style: normal; }
.overview-hero p { max-width: 620px; color: #cbd5e1; font-size: 1.03rem; }
.hero-actions { display: flex; gap: .65rem; margin-top: 1.5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .55rem 1rem; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 650; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--accent); }
.button.secondary { color: var(--text); background: #fff; border-color: var(--border); }
.overview-hero .button.secondary { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.hero-status { position: relative; z-index: 1; display: grid; justify-items: center; min-width: 220px; color: #cbd5e1; }
.status-orbit { display: grid; place-items: center; align-content: center; width: 155px; height: 155px; border: 1px solid rgba(255,255,255,.27); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.04), 0 0 0 35px rgba(255,255,255,.025); }
.status-orbit span { font-size: 2.8rem; line-height: 1; font-weight: 800; color: #fff; }
.status-orbit small { margin-top: .5rem; }
.hero-status p { margin: 1.8rem 0 .1rem; font-size: .82rem; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.13); }
.hero-page-views {
  margin-top: .35rem;
  padding-top: .35rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-page-views strong { color: #fff; font-size: .9rem; }

.metric-strip { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); margin: -1.8rem 2rem 2rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.metric-tile { appearance: none; width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .75rem; min-width: 0; padding: 1.15rem 1.25rem; border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.metric-tile:last-child { border-right: 0; }
.metric-tile:hover { text-decoration: none; background: #fafafa; }
.metric-tile small, .metric-tile strong { display: block; line-height: 1.2; }
.metric-tile small { color: var(--muted); font-size: .73rem; }
.metric-tile strong { margin-top: 3px; font-size: 1.55rem; }
.metric-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font-size: .72rem; font-weight: 800; }
.metric-icon.blue { background: #dbeafe; color: #1d4ed8; }
.metric-icon.red { background: #ffe4e6; color: #be123c; }
.metric-icon.green { background: #d1fae5; color: #047857; }
.metric-icon.amber { background: #fef3c7; color: #b45309; }
.metric-note { grid-column: 2; color: var(--muted); font-size: .68rem; }

.section-heading, .panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.section-heading { margin: 1.5rem 0 .8rem; }
.section-heading h2, .panel-head h2 { margin: .1rem 0 0; font-size: 1.25rem; }
.period-switch { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.period-switch select, .search-form input, .search-form select { padding: .48rem .7rem; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); }
.weekly-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.weekly-card { position: relative; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.weekly-card > small { display: block; color: var(--muted); }
.weekly-card strong { display: inline-block; margin: .35rem .55rem 0 0; font-size: 1.8rem; }
.weekly-card span { vertical-align: 3px; padding: .1rem .35rem; border-radius: 4px; font-size: .67rem; font-weight: 700; }
.weekly-card span.up { color: #047857; background: #d1fae5; }
.weekly-card span.down { color: #be123c; background: #ffe4e6; }
.weekly-card p { margin: .2rem 0 0; color: var(--muted); font-size: .72rem; }

.insight-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem; margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: linear-gradient(90deg, #fff 0%, #fff7ed 100%); border: 1px solid #fed7aa; border-radius: 12px; }
.insight-symbol { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 1.3rem; }
.insight-banner h2 { display: inline; margin: 0 .7rem 0 0; font-size: 1rem; }
.insight-banner .insight-date { display: block; margin: .35rem 0 .5rem; font-size: .72rem; color: #94a3b8; font-weight: 600; }
.insight-banner p { display: block; margin-top: .25rem; color: #475569; font-size: .9rem; }
.insight-banner > a { font-size: .8rem; font-weight: 700; white-space: nowrap; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dashboard-panel { padding: 1.25rem 1.35rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.panel-head { align-items: center; margin-bottom: 1rem; }
.panel-head small { color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.panel-head > span, .panel-head > a { color: var(--muted); font-size: .72rem; }
.distribution-list { display: grid; gap: .72rem; }
.distribution-row { display: grid; grid-template-columns: 74px 1fr 34px 40px; align-items: center; gap: .5rem; font-size: .76rem; }
.distribution-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.distribution-row strong, .distribution-row small { text-align: right; }
.distribution-row small { color: var(--muted); }
.bar-track { overflow: hidden; height: 7px; background: #eef2f7; border-radius: 99px; }
.bar-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, #1e4d8c, #60a5fa); }
.exam-bars .bar-track i { background: linear-gradient(90deg, #c41e3a, #fb7185); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: .6rem; padding: .65rem 0; border-bottom: 1px solid #f1f5f9; }
.rank-list li:last-child { border-bottom: 0; }
.rank { color: #94a3b8; font: 700 .72rem monospace; }
.rank-list a strong, .rank-list a small { display: block; }
.rank-list a { min-width: 0; color: var(--text); }
.rank-list a strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .84rem; }
.rank-list a small { color: var(--muted); font-size: .67rem; }
.rank-list b { color: var(--accent); font-size: .78rem; }
.cross-preview { display: grid; gap: .5rem; }
.cross-preview a { position: relative; display: block; padding: .7rem .85rem; border-radius: 8px; background: #f8fafc; color: var(--text); }
.cross-preview a:hover { background: #f1f5f9; text-decoration: none; }
.cross-preview span { color: var(--accent); font-size: .66rem; font-weight: 700; }
.cross-preview strong { display: block; font-size: .84rem; }
.cross-preview p { margin: .18rem 3rem 0 0; color: var(--muted); font-size: .71rem; line-height: 1.4; }
.cross-preview small { position: absolute; right: .75rem; bottom: .7rem; color: #64748b; font-size: .64rem; }
.latest-section { margin-top: 1.5rem; }
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.latest-card { display: block; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.latest-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15,23,42,.06); text-decoration: none; }
.latest-card h3 { margin: .55rem 0 .45rem; font-size: .91rem; line-height: 1.45; }
.latest-card p { color: var(--muted); font-size: .75rem; }

.sources-dialog { width: min(820px, calc(100vw - 2rem)); max-height: 82vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 25px 80px rgba(15,23,42,.3); }
.sources-dialog::backdrop { background: rgba(15,23,42,.62); backdrop-filter: blur(2px); }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: .1rem 0 0; }
.dialog-head button { border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 1.8rem; }
.source-summary { padding: .8rem 1.25rem; color: var(--muted); font-size: .8rem; background: #f8fafc; }
.source-list { overflow: auto; max-height: 52vh; padding: .5rem 1.25rem; }
.source-item { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; padding: .75rem 0; border-bottom: 1px solid #f1f5f9; }
.source-item strong { font-size: .84rem; }
.source-item small { display: block; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; }
.source-state { align-self: center; padding: .15rem .45rem; border-radius: 99px; font-size: .66rem; }
.source-state.enabled, .source-state.ok { color: #047857; background: #d1fae5; }
.source-state.disabled { color: #64748b; background: #e2e8f0; }
.source-state.error { color: #be123c; background: #ffe4e6; }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--border); border-bottom: 0; }
.dialog-actions > span { margin-right: auto; color: var(--muted); font-size: .75rem; }

.search-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.search-form input { flex: 1; min-width: 220px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.5rem 0; }
.pagination a { padding: .4rem .7rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

.translation-panel, .exam-analysis-panel {
  margin-top: 1.35rem;
  padding: 1.35rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.translation-panel { border-top: 3px solid var(--accent2); }
.exam-analysis-panel { border-top: 3px solid var(--accent); }
.detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.detail-section-head h2 { margin: .12rem 0 0; }
.ai-label, .exam-direction {
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
}
.ai-label { color: #1d4ed8; background: #dbeafe; }
.exam-direction { color: #9f1239; background: #ffe4e6; }
.translation-text { color: #334155; line-height: 1.9; }
.translation-text p { margin: 0 0 .8rem; }
.exam-analysis-copy { padding: .85rem 1rem; color: #334155; background: #fff7ed; border-radius: 8px; }
.exam-analysis-panel h3 { margin: 1.1rem 0 .65rem; font-size: .95rem; }
.exam-point-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.exam-point-list article { padding: .8rem .9rem; background: #f8fafc; border-radius: 8px; }
.exam-point-list strong { font-size: .86rem; }
.exam-point-list p { margin: .25rem 0; color: #475569; font-size: .78rem; }
.exam-point-list small { color: var(--muted); font-size: .7rem; }
.question-box { margin-top: 1rem; padding: .85rem 1rem; background: #fefce8; border: 1px solid #fef08a; border-radius: 8px; }
.question-box h3 { margin-top: 0; }
.question-box ol { margin-bottom: 0; padding-left: 1.25rem; }
.question-box li { margin: .35rem 0; color: #3f3f46; font-size: .82rem; }
.analysis-pending { margin: 0; padding: .85rem 1rem; color: var(--muted); background: #f8fafc; border-radius: 8px; }
.sync-notice {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  padding: .75rem 1rem;
  color: #fff;
  background: #111827;
  border-radius: 8px;
  font-size: .8rem;
}

@media (max-width: 900px) {
  .overview-hero { padding: 2.5rem 2rem; }
  .hero-status { display: none; }
  .metric-strip, .weekly-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-tile:nth-child(even) { border-right: 0; }
  .metric-tile:not(:last-child) { border-bottom: 1px solid var(--border); }
  .latest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .header-inner { align-items: flex-start; padding-top: .7rem; }
  .main-nav { width: 100%; overflow-x: auto; }
  .main-nav a { min-height: 42px; padding: 0 .75rem; white-space: nowrap; }
  .overview-hero { min-height: 300px; padding: 2rem 1.25rem; border-radius: 12px; }
  .metric-strip { margin: -1.2rem .55rem 1.5rem; }
  .metric-tile { padding: .8rem; }
  .metric-icon { display: none; }
  .metric-note { grid-column: 1; }
  .weekly-grid, .dashboard-grid, .latest-grid { grid-template-columns: 1fr; }
  .exam-point-list { grid-template-columns: 1fr; }
  .insight-banner { grid-template-columns: auto 1fr; }
  .insight-banner > a { grid-column: 2; }
  .section-heading { align-items: center; }
}
