:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b23;
  --line: #2b3440;
  --text: #e6edf3;
  --muted: #9aa7b4;
  --green: #3fb950;
  --red: #ff6b6b;
  --yellow: #d29922;
  --blue: #58a6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  margin-top: 6px;
}

main {
  padding: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.notice {
  background: linear-gradient(135deg, #15233a, #151b23);
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

.trends-panel { margin-bottom: 18px; }

.trend-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.trend-card:first-of-type { margin-top: 12px; }
.trend-card p { line-height: 1.55; }
.risk { color: var(--yellow); font-size: 12px; margin-top: 8px; }
.execution-badge { display: inline-block; margin-top: 10px; padding: 6px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; }
.trend-verdict { font-size: 12px; font-weight: 700; margin-top: 6px; }
.trend-links { display: flex; gap: 8px; align-items: flex-start; }
.trend-links a { color: var(--blue); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }

details {
  margin-top: 18px;
}

summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 18px;
}

.badge {
  border: 1px solid var(--red);
  color: var(--red);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; }
  main, .topbar { padding: 18px; }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.row:first-child {
  border-top: 0;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.ok {
  color: var(--green);
}

.blocked {
  color: var(--red);
}

.watch {
  color: var(--blue);
}

.warn {
  color: var(--yellow);
}
