:root {
  --bg: #0e1117;
  --fg: #e6edf3;
  --muted: #8b949e;
  --border: #30363d;
  --accent: #58a6ff;
  --card: #161b22;
  --marker: #d29922;
  --marker-hi: #f0883e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
}

header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

.controls label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted);
  gap: 2px;
}

.controls select,
.controls input,
.controls button {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.controls button { cursor: pointer; }
.controls button:hover { border-color: var(--accent); }

.presets {
  display: flex;
  gap: 4px;
  align-self: flex-end;
}

.presets button {
  padding: 4px 8px;
  font-size: 12px;
}

main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  height: calc(100vh - 65px);
}

.chart-pane {
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chart-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.news-pane {
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.news-pane h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.muted { color: var(--muted); font-weight: 400; }

.article {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.article:hover,
.article.active {
  border-color: var(--marker-hi);
}

.article .title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.3;
}

.article .meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.article .snippet {
  font-size: 12px;
  color: var(--fg);
  opacity: 0.85;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article a {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.article a:hover { text-decoration: underline; }

.empty {
  color: var(--muted);
  font-style: italic;
  padding: 12px 0;
}
