:root {
  --bg: #fbfbfa; --surface: #ffffff; --text: #1a1d21; --muted: #5d6672; --line: #e3e5e8;
  --accent: #b3141c; --accent-text: #ffffff; --soft: #f3f4f5;
  --ok: #17663a; --warn: #8a5200; --danger: #a4101c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214; --surface: #171a1d; --text: #e8eaed; --muted: #9ba4af; --line: #2a2f35;
    --accent: #ff6b6f; --accent-text: #160304; --soft: #1e2227;
    --ok: #6fd19a; --warn: #f0b35a; --danger: #ff8087;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.site-header, .site-footer, main { max-width: 760px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
body.wide .site-header, body.wide .site-footer, body.wide main { max-width: 1040px; }
.site-header { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: baseline; padding-top: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; gap: 16px; align-items: baseline; }
.site-header nav a, .site-footer a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { color: var(--accent); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
main { padding-top: 28px; padding-bottom: 48px; min-height: 70vh; }
.site-footer { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 32px; color: var(--muted); font-size: 14px; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 20px; line-height: 1.35; margin: 32px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
.lead { color: var(--muted); font-size: 18px; margin-top: 0; }
.meta { color: var(--muted); font-size: 14px; margin: 0; }
.post-list { list-style: none; padding: 0; }
.post-list li { border-top: 1px solid var(--line); padding: 20px 0; }
.post-list h2 { margin: 4px 0 6px; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { margin-bottom: 0; }
.disclosure { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 14px; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
pre { background: var(--soft); padding: 14px; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin: 18px 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
form.stack { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
label.check { grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-weight: 400; }
label.check input { margin-top: 4px; }
input[type="text"], input[type="email"], input[type="file"], select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
button, .button { display: inline-block; justify-self: start; padding: 9px 16px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
button.secondary, .button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 400; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.notice { border-left: 4px solid var(--accent); background: var(--soft); padding: 12px 16px; border-radius: 4px; font-size: 14px; }
.notice > :first-child { margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.badge { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 0 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.danger { color: var(--danger); }
.badge.plain { color: var(--muted); }
.file-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 12px 0; }
.file-row p { margin: 0; }
.cf-turnstile { min-height: 65px; }
