:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e3e1db;
  --accent: #a4342a;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --surface: #1f1f24;
    --text: #ececec;
    --text-muted: #a1a1a1;
    --border: #333338;
    --accent: #e0776a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.date-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.digest-date {
  font-weight: 600;
  color: var(--accent);
}

#archive-picker {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.loading, .error {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.section summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section summary::-webkit-details-marker { display: none; }

.section summary::after {
  content: "+";
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1.3rem;
}

.section[open] summary::after {
  content: "\2212";
}

.section-body {
  padding: 0 1.25rem 1.25rem;
}

.item {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.item:first-child { border-top: none; }

.item h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 1.5rem 1.25rem 2.5rem;
}
