:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #21262d;
  --text: #e6edf3;
  --text-2: #8b949e;
  --accent: #ff5722;
  --accent-2: #c23b14;
  --border: #30363d;
  --max: 760px;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.55; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
header { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { height: 28px; width: auto; }
.tagline { display: none; }
@media (min-width: 620px) { .tagline { display: block; font-size: 0.78rem; color: var(--text-2); font-weight: 400; } }
nav { background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
nav ul { list-style: none; margin: 0; padding: 0; max-width: var(--max); margin: 0 auto; display: flex; gap: 6px; padding: 8px 18px; }
nav li { white-space: nowrap; }
nav a { display: block; padding: 6px 10px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; color: var(--text-2); }
nav a.active, nav a:hover { background: var(--surface-2); color: var(--text); }
main { max-width: var(--max); margin: 0 auto; padding: 22px 18px 60px; }
.section-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.02em; }
.section-desc { color: var(--text-2); margin: 0 0 22px; font-size: 0.95rem; }
.loading, .error { color: var(--text-2); padding: 30px 0; }
.story-list { display: grid; gap: 18px; }
.story-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color 0.15s; }
.story-card:hover { border-color: var(--accent-2); }
.story-card h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.3; }
.story-card p { margin: 0; color: var(--text-2); font-size: 0.95rem; }
.story-card .meta { margin-top: 12px; font-size: 0.78rem; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; }
.story-card .section-pill { background: var(--surface-2); color: var(--accent); padding: 2px 8px; border-radius: 999px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.pagination { display: flex; justify-content: space-between; margin-top: 28px; }
.pagination button { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px 14px; border-radius: var(--radius); cursor: pointer; }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.story-detail h1 { font-size: 1.7rem; margin: 0 0 12px; line-height: 1.25; }
.story-detail .meta { color: var(--text-2); font-size: 0.85rem; margin-bottom: 22px; }
.story-detail .body { font-size: 1.05rem; line-height: 1.65; color: var(--text); }
.story-detail .body p { margin: 0 0 16px; }
.story-detail .source { font-size: 0.85rem; color: var(--text-2); margin-top: 4px; word-break: break-all; }
.story-detail .source a { color: var(--accent); text-decoration: underline; }
.story-card .source a:hover, .story-detail .source a:hover { color: var(--accent-2); }
.sources { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.sources h3 { margin: 0 0 10px; font-size: 0.9rem; text-transform: uppercase; color: var(--text-2); letter-spacing: 0.04em; }
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li { margin: 0 0 8px; }
.sources a { color: var(--accent); font-size: 0.95rem; }
.entities { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.entities a { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; }
.back { display: inline-block; margin-bottom: 18px; color: var(--accent); font-size: 0.9rem; }
footer { border-top: 1px solid var(--border); color: var(--text-2); font-size: 0.8rem; text-align: center; padding: 24px 18px; }
.story-card .source {
  font-size: 0.78rem;
  color: var(--text-2);
  margin: 0.4rem 0 0.6rem;
  word-break: break-all;
}
.story-card .source a {
  color: var(--accent);
  text-decoration: underline;
}
.story-card .source a:hover {
  color: var(--accent-2);
}
