:root {
  --bg: #fbfaf7;
  --text: #1f1f1d;
  --muted: #6b6a65;
  --rule: #e4e1d9;
  --accent: #9a3b1b;
  --notice-bg: #f3efe6;
  --code-bg: #f1eee8;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 19px/1.65 Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  hyphens: auto;
  overflow-wrap: break-word;
}
main { max-width: 680px; margin: 0 auto; padding: 40px 20px 64px; }

header { border-bottom: 1px solid var(--rule); margin-bottom: 32px; padding-bottom: 20px; }
.notice {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--notice-bg);
  color: var(--muted);
  font: 13px/1.4 system-ui, sans-serif;
}
h1 { font-size: 2em; line-height: 1.2; margin: 0 0 12px; hyphens: manual; }
.meta, .source, footer { font: 15px/1.5 system-ui, sans-serif; color: var(--muted); }
.meta { margin: 0 0 16px; }
.source {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #fff;
}
.source:empty { display: none; }
.source-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.source a { color: var(--accent); word-break: break-all; }

a { color: var(--accent); }
article h2, article h3, article h4 { line-height: 1.3; margin: 1.8em 0 0.5em; hyphens: manual; }
article h1 { font-size: 1.5em; }
article img { max-width: 100%; height: auto; display: block; margin: 1.5em auto; border-radius: 4px; }
article figure { margin: 1.5em 0; }
article figcaption { font: 14px/1.5 system-ui, sans-serif; color: var(--muted); text-align: center; }
article blockquote { margin: 1.5em 0; padding-left: 1em; border-left: 3px solid var(--rule); color: var(--muted); }
article pre, article code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--code-bg); border-radius: 4px; }
article code { padding: 0.1em 0.3em; }
article pre { padding: 1em; overflow-x: auto; }
article pre code { padding: 0; background: none; }
article table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.9em; }
article th, article td { border: 1px solid var(--rule); padding: 0.4em 0.6em; text-align: left; }
article hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

.pdf { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font: 600 16px/1 system-ui, sans-serif;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.pdf-embed { width: 100%; height: 80vh; border: 1px solid var(--rule); border-radius: 8px; }
@media (max-width: 700px) { .pdf-embed { display: none; } }

footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); }
footer p { margin: 0 0 6px; }

@media (max-width: 500px) {
  body { font-size: 18px; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 1.6em; }
}
