/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --critical: #dc2626;
  --critical-bg: #fef2f2;
  --high: #ea580c;
  --high-bg: #fff7ed;
  --medium: #ca8a04;
  --medium-bg: #fefce8;
  --low: #16a34a;
  --low-bg: #f0fdf4;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.site-logo svg { width: 28px; height: 28px; }

.site-nav { display: flex; gap: 0.25rem; }
.site-nav a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== Hero / Stats Bar ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ===== Section Headings ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-critical { background: var(--critical-bg); color: var(--critical); }
.badge-high { background: var(--high-bg); color: var(--high); }
.badge-medium { background: var(--medium-bg); color: var(--medium); }
.badge-low { background: var(--low-bg); color: var(--low); }

.badge-category {
  background: #f3f4f6;
  color: #374151;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.card-regions {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more {
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ===== Article / Single View ===== */
.article {
  max-width: 820px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.article-body h1 { font-size: 1.75rem; font-weight: 800; margin: 2rem 0 1rem; }
.article-body h2 { font-size: 1.4rem; font-weight: 700; margin: 1.75rem 0 0.75rem; color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article-body h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; color: var(--text-muted); }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body strong { font-weight: 700; }

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.article-body code {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.article-body th, .article-body td {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: #f9fafb;
  font-weight: 700;
}

.article-body hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

/* ===== Report List ===== */
.report-list { margin-bottom: 3rem; }

.report-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.report-item:hover { box-shadow: var(--shadow-lg); }

.report-info { display: flex; align-items: center; gap: 1rem; }

.report-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.report-title { font-weight: 700; font-size: 1rem; }
.report-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }

.report-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.report-stat { display: flex; align-items: center; gap: 0.35rem; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; gap: 0.75rem; }
  .article-body { padding: 1.5rem; }
  .report-item { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}
