:root {
  color-scheme: light dark;
  --bg: #f4f5f8;
  --paper: #ffffff;
  --paper-hover: #fcfcfe;
  --text: #202126;
  --muted: #686d79;
  --line: #e2e4ea;
  --accent: #006ac8;
  --dot: #32a87c;
  --control: #e8eaf0;
  --active: #ffffff;
  --quote: #edeff4;
  --morning-bg: #eaf5ef;
  --morning-text: #246445;
  --breaking-bg: #eaf1fc;
  --breaking-text: #245899;
  --card-shadow: 0 2px 12px rgba(29, 36, 56, .035);
  --active-shadow: 0 1px 4px rgba(29, 36, 56, .1);
}

* { box-sizing: border-box; }
html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: #c8ddfa; color: #172943; }
.shell { max-width: 740px; margin: auto; padding: 0 28px; }
.masthead { padding: 38px 0 26px; border-bottom: 1px solid var(--line); }
.brand {
  display: inline-block;
  color: var(--text);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand-dot { color: var(--dot); }
.filters {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 4px;
  width: 360px;
  max-width: 100%;
  margin-top: 24px;
  padding: 4px;
  border-radius: 14px;
  background: var(--control);
}
.filters a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.filters a[aria-current] { background: var(--active); box-shadow: var(--active-shadow); color: var(--text); }
.filters a:hover { color: var(--text); }
.feed { list-style: none; margin: 0; padding: 0; }
.day-divider { margin: 27px 0 13px; padding-left: 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.post-card { margin-bottom: 14px; border-radius: 20px; background: var(--paper); box-shadow: var(--card-shadow); }
.card-link { display: block; padding: 25px 28px 24px; color: var(--text); text-decoration: none; border-radius: inherit; overflow-wrap: anywhere; }
.card-link:hover { background: var(--paper-hover); }
.card-link:focus-visible { outline-offset: 3px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.type { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 7px; font-size: 11px; line-height: 1.4; font-weight: 600; }
.type.morning { background: var(--morning-bg); color: var(--morning-text); }
.type.breaking { background: var(--breaking-bg); color: var(--breaking-text); }
.post-card h2 { margin: 17px 0 10px; font-size: 23px; line-height: 1.3; font-weight: 620; letter-spacing: -.55px; text-wrap: pretty; }
.excerpt { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.card-bottom { margin-top: 21px; color: var(--muted); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.feed-end { margin: 34px 0 40px; text-align: center; color: var(--muted); font-size: 12px; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 1; padding: 12px; border-radius: 12px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.back-nav { margin: 26px 0 35px; font-size: 13px; }
.back-nav a, .article-end a { text-decoration: none; }
.article-header h1 { margin: 20px 0 18px; font-size: 36px; line-height: 1.18; font-weight: 650; letter-spacing: -1px; overflow-wrap: anywhere; text-wrap: pretty; }
.article-meta { color: var(--muted); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.article-lead { margin: 25px 0; color: var(--muted); font-size: 19px; line-height: 1.6; }
.article-body { font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.article-body p { margin: 0 0 22px; }
.article-body h2 { margin: 38px 0 16px; font-size: 24px; line-height: 1.35; font-weight: 620; letter-spacing: -.5px; }
.article-body h3, .article-body h4, .article-body h5, .article-body h6 { margin: 28px 0 13px; font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.3px; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 24px; }
.article-body li { margin: 8px 0; padding-left: 5px; }
.article-body blockquote { margin: 24px 0; padding: 20px 23px; border-radius: 16px; background: var(--quote); }
.article-body blockquote p:last-child { margin: 0; }
.article-body code { padding: 2px 4px; border-radius: 4px; background: var(--quote); font-size: .87em; }
.article-body pre { padding: 16px; border-radius: 14px; background: var(--quote); white-space: pre-wrap; }
.article-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.sources { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { margin: 0 0 13px; font-size: 16px; font-weight: 600; }
.sources ul { padding-left: 19px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.article-end { margin: 36px 0 23px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 13px; }
.empty { padding: 40px 0; color: var(--muted); }
.empty-page { padding: 60px 0 70px; }
.empty-page h1 { margin: 0 0 16px; font-size: 30px; font-weight: 650; letter-spacing: -.8px; }
.empty-page p { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171b;
    --paper: #222329;
    --paper-hover: #27282f;
    --text: #f1f2f5;
    --muted: #a4a6b2;
    --line: #31323b;
    --accent: #88baff;
    --dot: #6bd4aa;
    --control: #23242b;
    --active: #3a3b44;
    --quote: #25262d;
    --morning-bg: #273b32;
    --morning-text: #a0d7ba;
    --breaking-bg: #29374c;
    --breaking-text: #b0cbf4;
    --card-shadow: none;
    --active-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  }
}

@media (max-width: 560px) {
  .shell { padding: 0 20px; }
  .masthead { padding: 29px 0 23px; }
  .brand { font-size: 26px; letter-spacing: -.9px; }
  .filters { width: 100%; margin-top: 20px; }
  .filters a { padding: 0 6px; font-size: 12px; }
  .day-divider { margin-top: 24px; font-size: 11px; }
  .card-link { padding: 23px 23px 22px; }
  .post-card h2 { font-size: 21px; letter-spacing: -.4px; }
  .excerpt { font-size: 14px; line-height: 1.7; }
  .article-header h1 { font-size: 31px; letter-spacing: -.8px; }
  .article-lead { font-size: 17px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 22px; }
}

@media print {
  .back-nav, .article-end, .filters, .site-footer { display: none; }
  :root { --bg: white; --paper: white; --text: black; --muted: #444; --line: #ddd; --accent: black; --quote: #eee; --card-shadow: none; }
  .shell { max-width: none; }
  a { text-decoration: underline; }
  .post-card { break-inside: avoid; }
}
