:root {
  --bg: #f6f5f1;
  --fg: #1d1c1a;
  --muted: #6b6862;
  --line: #dedbd3;
  --card: #ffffff;
  --ok: #1f7a4d;
  --warn: #a15c00;
  --bad: #b3261e;
  --accent: #c2410c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --fg: #ecebe6;
    --muted: #9b988f;
    --line: #2c2b28;
    --card: #1c1b19;
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --accent: #fb923c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 36px 0 10px; font-weight: 600; }
p { margin: 0 0 14px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, .snippet:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.lede { color: var(--muted); margin-bottom: 28px; }
.lede.big { color: var(--fg); font-size: 17px; margin-bottom: 12px; }
.jump { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* usernames come from attackers and can be one long word */
.note, .stats, .log li { overflow-wrap: anywhere; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
footer { margin-top: 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }
footer p { margin: 0 0 6px; }
/* footer as a sibling of main: same column as main's content */
main:not(:last-child) { padding-bottom: 0; }
body > footer { width: calc(100% - 32px); max-width: 728px; margin: 48px auto 64px; }
/* readable headings on recipe pages */
.doc h2 { font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--fg); margin-top: 32px; }

/* status page */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tile .s:empty { display: none; }
.bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--fg); opacity: 0.55; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.row:first-child { border-top: 0; }
.row .r { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .l { min-width: 0; overflow-wrap: anywhere; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.empty { color: var(--muted); font-size: 14px; padding: 10px 14px; }
#stamp { font-size: 13px; color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.log li:first-child { border-top: 0; }
.log b { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--muted); margin-right: 8px; }
.crumb { font-size: 14px; margin-bottom: 18px; }
.snippet { font-family: var(--mono); font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.snip-wrap { margin: 0 0 14px; }
.snip-wrap .snippet { margin: 0; }
.copy { display: block; margin: 0 0 4px auto; min-height: 28px; font-family: inherit; font-size: 12px; line-height: 1.4; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 4px 10px; cursor: pointer; }
.copy:hover { color: var(--fg); }
.day { margin-top: 28px; }
.day h2 { margin: 0 0 6px; font-size: 13px; }
.day:target h2, .day.current h2 { color: var(--accent); }
.day:focus { outline: none; }
.day .date { font-family: var(--mono); font-weight: 400; margin-left: 8px; text-transform: none; letter-spacing: 0; }
.stats { font-size: 15px; margin-bottom: 6px; }
.muted { color: var(--muted); }
.tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
