:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #e2e4e9;
  --text: #1a1d23;
  --text-muted: #5b616e;
  --accent: #2f5fdb;
  --accent-soft: #eaf0ff;
  --featured-bg: #16213e;
  --featured-text: #f4f6fb;
  --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 8px 24px rgba(20, 22, 30, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --surface: #1c1f28;
    --surface-2: #23262f;
    --border: #2c303b;
    --text: #eceef2;
    --text-muted: #9aa0ac;
    --accent: #7fa1ff;
    --accent-soft: #202a44;
    --featured-bg: #0d1326;
    --featured-text: #f4f6fb;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.masthead {
  padding: 28px 0 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.topbar-item {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.topbar-item:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--border);
}

.topbar-weather:empty {
  display: none;
}

.version-badge {
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.masthead h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.loading,
.error,
.empty {
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 15px;
}

.featured {
  background: var(--featured-bg);
  color: var(--featured-text);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 28px;
}

.featured-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9db3ff;
  margin-bottom: 8px;
}

.featured h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.3;
}

.featured h2 a {
  color: inherit;
  text-decoration: none;
}

.featured h2 a:hover {
  text-decoration: underline;
}

.points {
  margin: 0 0 10px;
  padding: 0 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

.points li {
  margin-bottom: 4px;
}

.points li::marker {
  color: var(--accent);
}

.featured .points {
  color: #d7ddf0;
}

.featured .points li::marker {
  color: #9db3ff;
}

.featured .meta {
  margin: 0;
  font-size: 12.5px;
  color: #8b93ad;
}

.topic {
  margin-bottom: 30px;
}

.topic h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-list {
  display: flex;
  flex-direction: column;
}

.article-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.article-item:last-child {
  border-bottom: none;
}

.article-item h4 {
  margin: 0 0 6px;
  font-size: 15.5px;
  line-height: 1.35;
}

.article-item h4 a {
  color: var(--text);
  text-decoration: none;
}

.article-item h4 a:hover {
  color: var(--accent);
}

.article-item .points {
  color: var(--text-muted);
}

.article-item .meta {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

.topic-empty {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0 14px;
}

.fun-aside {
  margin: 4px 0 24px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.fun-aside a {
  color: var(--text-muted);
  text-decoration: underline;
}

.site-footer {
  margin-top: 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .masthead {
    padding: 20px 0 16px;
  }

  .featured {
    padding: 18px 16px;
  }
}
