:root {
  --brand-500: #007aff;
  --brand-50: #e8f2ff;
  --brand-800: #003b82;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #8e8e93;
  --muted-bg: #f2f2f7;
  --border: #e5e5ea;
  --radius: 1.2rem;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: DM Sans, ui-sans-serif, sans-serif, system-ui;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Language toggle */
.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  gap: 0.25rem;
  background: var(--muted-bg);
  border-radius: 999px;
  padding: 0.2rem;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}
.lang-toggle button.active {
  background: var(--brand-500);
  color: #fff;
}

/* Header */
.header { margin-bottom: 2.5rem; padding-top: 1rem; }
.header h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--fg); }
.header .subtitle { font-size: 1rem; color: var(--muted); margin-top: 0.5rem; }
.header .meta { font-family: JetBrains Mono, monospace; font-size: 0.8rem; color: var(--muted); margin-top: 0.75rem; opacity: 0.7; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--fg); margin-top: 0.25rem; letter-spacing: -0.02em; }
.stat-card .value .unit { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.stat-card .unit { font-size: 0.8rem; color: var(--muted); }

/* Section headings */
h2 { font-size: 1.25rem; font-weight: 600; color: var(--fg); margin: 2rem 0 1rem; }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--fg); margin-bottom: 0.75rem; }
.card p { color: #48484a; font-size: 0.9rem; margin-bottom: 0.5rem; }
.card p strong { color: var(--fg); }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); margin: 0.75rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { background: var(--muted-bg); color: #3c3c43; font-weight: 600; text-align: left; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 0.55rem 1rem; border-bottom: 1px solid var(--border); color: #3c3c43; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--muted-bg); }

/* Badges */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 500; }
.badge.ok { background: #e9f9ee; color: #34c759; }
.badge.warn { background: #fff8e1; color: #f57c00; }
.badge.alert { background: #ffecea; color: #ff3b30; }
.badge.info { background: var(--brand-50); color: var(--brand-800); }

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

/* Chart */
.chart-box { position: relative; height: 320px; margin: 1.5rem 0; padding: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Findings list */
.findings { list-style: none; padding: 0; }
.findings li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.findings li:last-child { border-bottom: none; }
.findings li strong { display: inline-block; min-width: 2rem; color: var(--brand-500); }

/* Highlight */
.highlight { background: var(--brand-50); padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 500; color: var(--brand-800); }

/* Footer */
.footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); text-align: center; }
