/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", "Noto Sans TC", Roboto, Arial, sans-serif;
  color: #1f2937;
  background: #f3f4f6;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===== Header ===== */
.site-header {
  background: #1e2a44;
  color: #f9fafb;
  padding: 22px 40px 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-text h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text .subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 2px;
}

/* 3-way 圈圈語言切換器 */
.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: rgba(255,255,255,0.08);
  padding: 4px;
  border-radius: 999px;
}

.lang-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lang-circle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.lang-circle.active {
  background: #fff;
  color: #1e2a44;
  border-color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Nav links */
.header-nav {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  font-size: 13px;
}

.header-nav a {
  color: #9ca3af;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
}

.header-nav a.active,
.header-nav a:hover {
  color: #fff;
  border-bottom-color: #10b981;
}

/* ===== Stats Bar ===== */
.stats-bar {
  background: #1e2a44;
  padding: 20px 40px 24px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.stat-block {
  display: flex;
  flex-direction: column;
}

.stat-block .num {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.stat-block .num .dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot.high { background: #ef4444; }
.dot.medium { background: #f59e0b; }
.dot.low { background: #10b981; }

.stat-block .label {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ===== Alert Banner ===== */
.alert-banner {
  background: #fef7e0;
  border-left: 4px solid #f59e0b;
  padding: 16px 40px;
  margin: 0;
}

.alert-banner h2 {
  font-size: 15px;
  color: #92400e;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-banner ul {
  list-style: none;
  padding: 0;
}

.alert-banner li {
  padding: 5px 0;
  font-size: 14px;
  color: #1f2937;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.alert-banner li::before {
  content: "\1F534";
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-banner li strong {
  color: #111827;
  font-weight: 600;
}

/* ===== Filter Bar ===== */
.filter-bar {
  background: #fff;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e5e7eb;
}

.filter-bar .label {
  color: #6b7280;
  font-size: 13px;
  margin-right: 4px;
}

.pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pill:hover { background: #f9fafb; }

.pill.active {
  background: #1e2a44;
  color: #fff;
  border-color: #1e2a44;
}

/* ===== News Section ===== */
.news-section {
  padding: 28px 40px 60px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-divider {
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* ===== Card ===== */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.card-meta .src { color: #6b7280; }
.card-meta .dt  { color: #6b7280; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

.tag.company { background: #dbeafe; color: #1d4ed8; }
.tag.category { background: #f3f4f6; color: #4b5563; }

.threat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-left: auto;
}

.threat-badge.high { background: #fee2e2; color: #b91c1c; }
.threat-badge.medium { background: #fef3c7; color: #b45309; }
.threat-badge.low { background: #d1fae5; color: #047857; }

.threat-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.threat-badge.high::before { background: #ef4444; }
.threat-badge.medium::before { background: #f59e0b; }
.threat-badge.low::before { background: #10b981; }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.45;
  margin: 6px 0 10px;
}

.card-title a:hover { color: #1d4ed8; }

.card-desc {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 14px;
  flex-grow: 1;
}

.analysis {
  background: #eff6ff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.6;
}

.analysis .analysis-head {
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

/* ===== Recommendations ===== */
.recommendations {
  background: #fff;
  border-left: 4px solid #10b981;
  padding: 18px 22px;
  margin: 0 40px 28px;
  border-radius: 6px;
}

.recommendations h3 {
  font-size: 15px;
  color: #065f46;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recommendations ul {
  list-style: none;
  padding: 0;
}

.recommendations li {
  padding: 5px 0 5px 16px;
  position: relative;
  font-size: 14px;
  color: #1f2937;
}

.recommendations li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 28px;
  color: #6b7280;
  font-size: 13px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.site-footer a { color: #1d4ed8; }
.site-footer a:hover { text-decoration: underline; }

/* ===== Archive Page ===== */
.archive-list {
  max-width: 720px;
  margin: 36px auto;
  padding: 0 40px;
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s ease;
}

.archive-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.archive-item .date {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.archive-item .meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.archive-item .arrow {
  font-size: 18px;
  color: #9ca3af;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-header { padding: 18px 20px 0; }
  .stats-bar { padding: 16px 20px 18px; gap: 20px; }
  .stat-block .num { font-size: 22px; }
  .alert-banner { padding: 14px 20px; }
  .filter-bar { padding: 12px 20px; gap: 8px; }
  .news-section { padding: 22px 20px 40px; }
  .recommendations { margin: 0 20px 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .header-nav { overflow-x: auto; }
}
