html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #0a0a0a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Sticky disclaimer + news header ---------- */

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
}

.disclaimer-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: #ffeb3b;
  color: #1a1a00;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px 16px;
  border-top: 1px solid #d4b800;
  text-transform: uppercase;
}

.news-header {
  background: #ffffff;
  padding: 22px 32px 16px;
  border-bottom: 1px solid #ececec;
}

.news-header:empty {
  display: none;
}

.header-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #999;
  font-weight: 400;
  margin-bottom: 6px;
}

.header-title {
  display: block;
  font-size: 19px;
  font-weight: 500;
  color: #0a0a0a;
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 6px;
}

.header-title:hover {
  text-decoration: underline;
}

.header-summary {
  font-size: 14px;
  color: #555;
  font-weight: 300;
  line-height: 1.5;
  margin: 0 0 8px;
  max-width: 80ch;
}

.header-sources {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.04em;
}

/* fade content swap when news changes */
.news-header > * {
  animation: header-in 380ms ease-out both;
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Log + lines ---------- */

.log {
  margin: 0;
  padding: 18px 32px 80px;
  white-space: pre-wrap;
  word-break: break-word;
}

.line {
  margin: 0 0 6px;
  animation: line-in 320ms ease-out both;
}

@keyframes line-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.line .ts {
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-right: 2px;
}

.line .who {
  color: #0a0a0a;
  font-weight: 600;
}

.line .body {
  color: #0a0a0a;
  font-weight: 300;
}

.line .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: hsl(var(--hue, 220) 55% 92%);
  color: hsl(var(--hue, 220) 45% 30%);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: middle;
  position: relative;
  top: -1px;
  flex-shrink: 0;
  overflow: hidden;
}

.line .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.line-error {
  color: #b00020;
  font-size: 12px;
  opacity: 0.8;
}

/* ---------- News divider (between chapters) ---------- */

.news-divider {
  margin: 28px 0 14px;
  padding-top: 12px;
  border-top: 1px solid #cccccc;
  font-size: 12px;
  color: #6a6a6a;
  font-weight: 300;
  animation: line-in 320ms ease-out both;
}

.news-date {
  color: #999;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.news-divider a {
  color: #6a6a6a;
  text-decoration: underline;
  text-decoration-color: #cfcfcf;
  text-underline-offset: 2px;
}

.news-divider a:hover {
  color: #0a0a0a;
  text-decoration-color: #0a0a0a;
}

.divider-arrow {
  color: #b0b0b0;
  margin-right: 4px;
}

.divider-sources {
  color: #999;
  margin-left: 6px;
}

/* ---------- Caret ---------- */

.caret {
  display: inline-block;
  width: 0.55ch;
  margin-left: 1px;
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

::selection {
  background: #0a0a0a;
  color: #ffffff;
}
