:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --dim: #8b949e;
  --accent: #f0b429;
  --high: #f85149;
  --medium: #f0b429;
  --low: #3fb950;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem;
}

body > header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
}

h1 { font-size: 1.25rem; letter-spacing: .05em; }
h1::first-letter { color: var(--accent); }

#channels { display: flex; gap: .5rem; }
#channels a { color: var(--dim); text-decoration: none; font-size: .8rem; }
#channels a.active { color: var(--text); border-bottom: 2px solid var(--accent); }

#intro {
  color: var(--dim);
  font-size: .85rem;
  line-height: 1.6;
  margin: 1rem 0 0;
  max-width: 640px;
}

#question {
  font-size: .95rem;
  line-height: 1.5;
  margin-bottom: .75rem;
  color: var(--text);
}

#candidates {
  display: flex;
  gap: .5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 1rem -1rem;
  padding: .5rem 1rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 2.5rem), transparent);
}
#candidates::-webkit-scrollbar { display: none; }

#candidates button {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--dim);
  padding: .35rem .9rem;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  white-space: nowrap;
  flex-shrink: 0;
}
#candidates button.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

#prices { display: flex; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.price { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .9rem; }
.price .source { color: var(--dim); font-size: .7rem; text-transform: uppercase; }
.price .value { font-size: 1.4rem; }

.delta.up { color: #3fb950; }
.delta.down { color: #f85149; }

#ranges { display: flex; gap: .35rem; margin: .5rem 0; }
#ranges button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  border-radius: 6px;
  padding: .3rem .8rem;
  min-height: 36px;
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
#ranges button.active { color: var(--accent); border-color: var(--accent); }

#chart { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }

#timeline { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }

.narration { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; }
.narration header { display: flex; gap: .75rem; align-items: center; color: var(--dim); font-size: .75rem; margin-bottom: .4rem; }
.severity { width: .6rem; height: .6rem; border-radius: 50%; }
.severity.high { background: var(--high); box-shadow: 0 0 6px var(--high); }
.severity.medium { background: var(--medium); }
.severity.low { background: var(--low); }
.narration .spread { margin-left: auto; }

.narration .text { line-height: 1.5; font-size: .9rem; }
.narration .text.blurred {
  filter: blur(0);
  color: transparent;
  text-shadow: 0 0 8px rgba(230,237,243,.5);
  user-select: none;
}

.sources { margin-top: .5rem; font-size: .75rem; }
.sources a { color: var(--dim); }

.confidence {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .1rem .45rem;
  border-radius: 999px;
  border: 1px solid;
}
.confidence.confirmed { color: #3fb950; border-color: #3fb950; }
.confidence.probable { color: #f0b429; border-color: #f0b429; }
.confidence.unclear { color: #8b949e; border-color: #8b949e; }

.pending-note { color: var(--dim); font-style: italic; }

.unlock {
  margin-top: .6rem;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: .5rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#empty { color: var(--dim); text-align: center; padding: 2rem 0; font-size: .85rem; }

#show-older {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--dim);
  border-radius: 8px;
  padding: .7rem;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
#show-older:hover { color: var(--text); border-color: var(--dim); }

#faq { margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
#faq h2 { font-size: .9rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; }
#faq details { border: 1px solid var(--border); border-radius: 8px; padding: .7rem 1rem; margin-bottom: .5rem; background: var(--panel); }
#faq summary { cursor: pointer; font-size: .85rem; min-height: 28px; }
#faq details p { color: var(--dim); font-size: .82rem; line-height: 1.6; margin-top: .5rem; }
