:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #9198a1;
  --accent: #2f81f7;
  --accent-soft: rgba(47, 129, 247, 0.15);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.site-header nav a { margin-left: 18px; color: var(--muted); font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 48px 0 8px; }
.hero h1 { font-size: 2.1rem; margin: 0 0 10px; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 70ch; }

section { margin: 36px 0; }
h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.latest-head { display: flex; align-items: baseline; justify-content: space-between; }
.latest-head h2 { border: 0; padding: 0; }
.permalink { font-size: 0.9rem; }

.digest {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 28px 24px;
}
.digest h1 { font-size: 1.8rem; }
.digest h2 { font-size: 1.3rem; margin-top: 28px; }
.digest h3 { font-size: 1.1rem; margin-top: 22px; }
.digest h3 { color: var(--text); }
.digest a { font-weight: 600; }

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 0.9rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); }
tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

code { background: rgba(110, 118, 129, 0.25); padding: 0.15em 0.4em; border-radius: 6px; font-size: 0.9em; }
pre { background: #010409; border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.archive-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.archive-list li a {
  display: flex; align-items: baseline; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; color: var(--text);
}
.archive-list li a:hover { border-color: var(--accent); text-decoration: none; }
.archive-list .date { font-weight: 700; font-variant-numeric: tabular-nums; }
.archive-list .day { color: var(--muted); font-size: 0.92rem; }

.pager { display: flex; justify-content: space-between; margin: 24px 0 8px; gap: 12px; flex-wrap: wrap; }
.pager a { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; }
.pager .next { margin-left: auto; }
.back { margin-top: 8px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: 0.88rem; }
.site-footer p { margin: 4px 0; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  .digest { padding: 4px 16px 18px; }
  .archive-list li a { flex-direction: column; gap: 2px; }
}
