/* Follows the OS light/dark preference via prefers-color-scheme. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --panel: #f4f5f8;
  --text: #1a1c22;
  --muted: #5b6172;
  --accent: #2563eb;
  --border: #e2e5ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #161922;
    --text: #e6e8ee;
    --muted: #99a0b3;
    --accent: #6ea8fe;
    --border: #232838;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
h1 { font-size: 1.9rem; margin: 0 0 .25rem; }
h2 { margin-top: 2.2rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
h3 { margin-top: 1.6rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.sub { color: var(--muted); margin: 0 0 2rem; }
.back { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); }
.empty { color: var(--muted); }

.today {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 22px 18px;
  margin: 0 0 2.5rem;
}
.today-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
}
.today-head h2 { border: 0; margin: 1rem 0 .5rem; font-size: 1.25rem; }
.today-head a { font-size: .9rem; white-space: nowrap; }
.today :where(ul, ol) { padding-left: 1.2rem; margin: .5rem 0 0; }
.today li { margin: .4rem 0; }

sup.cite { font-size: .7em; line-height: 0; }
sup.cite a { text-decoration: none; padding: 0 1px; }
sup.cite a:hover { text-decoration: underline; }
:target { scroll-margin-top: 1rem; }
#sources + ol li:target { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 4px; }
#sources { scroll-margin-top: 1rem; }

.archive-h { font-size: 1.1rem; color: var(--muted); }
.digest-list { list-style: none; padding: 0; margin: 0; }
.digest-list li { margin: 0 0 10px; }
.digest-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px;
}
.digest-list a:hover { border-color: var(--accent); text-decoration: none; }
.d-date { font-variant-numeric: tabular-nums; font-weight: 600; }
.d-pretty { color: var(--muted); font-size: .9rem; }
article :where(ul, ol) { padding-left: 1.3rem; }
article li { margin: .35rem 0; }
article code {
  background: var(--panel); border: 1px solid var(--border);
  padding: .1rem .35rem; border-radius: 5px; font-size: .9em;
}
article blockquote {
  border-left: 3px solid var(--border); margin: 1rem 0; padding: .1rem 1rem; color: var(--muted);
}
footer {
  max-width: 760px; margin: 0 auto; padding: 24px;
  color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border);
}
