:root {
  --red: #E3262B;
  --bg: #f6f4f0;
  --card: #ffffff;
  --ink: #16161a;
  --muted: #6b6b72;
  --line: #e4e1da;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121214; --card: #1c1c20; --ink: #ecebe8; --muted: #9a9aa2; --line: #2c2c32; --red: #f0403f; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

.top {
  position: sticky; top: 0; z-index: 2;
  background: var(--red); color: #fff;
  padding: env(safe-area-inset-top) 0 0;
}
.brand { display: flex; align-items: baseline; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: 12px 16px 6px; }
.brand h1 { margin: 0; font: 900 24px/1 Georgia, "Times New Roman", serif; letter-spacing: -.3px; }
.brand h1 span { font-weight: 400; }
.brand p { margin: 0; font-size: 13px; opacity: .85; }

#tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 720px; margin: 0 auto; padding: 6px 16px 12px; }
#tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 5px 12px; border-radius: 99px; font-size: 14px; background: rgba(255,255,255,.16); white-space: nowrap; }
.tab.on { background: #fff; color: var(--red); font-weight: 600; }

main { max-width: 720px; margin: 0 auto; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); }
section h3 {
  margin: 22px 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--red);
  border-bottom: 2px solid var(--red); padding-bottom: 4px;
}

.story { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.head { display: block; width: 100%; }
.body::after { content: ""; display: block; clear: both; }
.body img { float: left; width: 76px; height: 76px; margin: 12px 12px 4px 0; border-radius: 8px; object-fit: cover; background: var(--line); }
.meta { display: block; font-size: 12.5px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.meta em { font-style: normal; font-weight: 600; color: var(--red); margin-left: 4px; }
.meta em span { white-space: nowrap; }
.meta i { font-style: normal; margin-left: 4px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); white-space: nowrap; }
.story h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.3; font-weight: 700; overflow-wrap: break-word; }
.body p { margin: 8px 0 0; }
.story:not(.open) .body p { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.more { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--red); }

.sources { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.sources li { margin: 4px 0; }
.sources a { color: var(--muted); text-decoration: none; }
.sources a b { color: var(--ink); margin-right: 4px; }

.empty { color: var(--muted); text-align: center; margin: 48px 0; }
