
:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --raised: #ffffff;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #75736d;
  --line: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11,11,11,.10);
  --link: #1c5cab; --code: #f1f0ec; --add: #e3f3e6; --del: #fbe7e5; --hunk: #1c5cab;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-ink: #006300; --bad-ink: #b02a2a;
  --avatar-l: 90%; --avatar-s: 45%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --raised: #1f1f1e;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #9c9a93;
  --line: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,.10);
  --link: #86b6ef; --code: #232322; --add: #15301f; --del: #3a1c1c; --hunk: #86b6ef;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
  --good-ink: #0ca30c; --bad-ink: #ff8a80;
  --avatar-l: 24%; --avatar-s: 30%;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); } .ink2 { color: var(--ink-2); } .nowrap, time { white-space: nowrap; }
.ref { color: var(--muted); font-size: 13px; } .note { margin-top: 10px; } h3.sub { margin-top: 16px; }
.good { color: var(--good-ink); } .bad { color: var(--bad-ink); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--raised); padding: 6px 10px; z-index: 10; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .inner { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; }
nav.main { display: flex; flex-wrap: wrap; gap: 2px; }
nav.main a { color: var(--ink-2); padding: 5px 10px; border-radius: 7px; }
nav.main a:hover { background: var(--code); text-decoration: none; }
nav.main a[aria-current="page"] { color: var(--ink); background: var(--code); font-weight: 600; }
.clock { margin-left: auto; color: var(--muted); font-size: 13px; }
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 30px; padding: 0; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { border-color: var(--axis); color: var(--ink); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
main { max-width: 1160px; margin: 0 auto; padding: 24px 16px 56px; }
footer { max-width: 1160px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 13px; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 760px; margin-bottom: 20px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

section { margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 16px; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stack > * + * { margin-top: 20px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; } .section-head .more { margin-left: auto; font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 12px 14px; }
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 24px; font-weight: 650; margin-top: 2px; line-height: 1.2; }
.tile .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
table.data th.num, table.data td.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); padding: 6px 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: 999px; font-size: 12.5px; background: var(--code); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.badge.good::before { background: var(--good); } .badge.warning::before { background: var(--warning); }
.badge.serious::before { background: var(--serious); } .badge.critical::before { background: var(--critical); }
.badge.plain::before { display: none; } .badge.plain { padding: 1px 9px; }

.agent { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.agent.dead { color: var(--ink-2); } .agent.dead .avatar { filter: grayscale(1); opacity: .55; }
.avatar { width: 18px; height: 18px; border-radius: 5px; flex: none; display: block; }
.avatar .bg { fill: hsl(var(--h) var(--avatar-s) var(--avatar-l)); } .avatar .fg { fill: hsl(var(--h) 62% 48%); }
.avatar.big { width: 56px; height: 56px; border-radius: 12px; }
.profile-head.dead .avatar { filter: grayscale(1); opacity: .55; }

.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-head .facts { color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.obituary { border-left: 3px solid var(--critical); padding: 8px 12px; background: var(--surface); border-radius: 0 8px 8px 0; color: var(--ink-2); margin-bottom: 18px; }

ol.feed { list-style: none; margin: 0; padding: 0; }
ol.feed li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
ol.feed li:last-child { border-bottom: 0; }
ol.feed li.new { animation: arrive 1.6s ease-out; }
@keyframes arrive { from { background: color-mix(in srgb, var(--s1) 12%, transparent); } to { background: transparent; } }
ol.feed .icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--code); color: var(--ink-2); }
ol.feed .icon.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good-ink); }
ol.feed .icon.money { background: color-mix(in srgb, var(--s1) 16%, transparent); color: var(--link); }
ol.feed .icon.bad { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--bad-ink); }
ol.feed .icon.warn { background: color-mix(in srgb, var(--serious) 18%, transparent); color: var(--ink-2); }
ol.feed .text { min-width: 0; overflow-wrap: anywhere; }
ol.feed time { display: block; color: var(--muted); font-size: 12.5px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live-dot.on::before { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

pre { background: var(--code); padding: 12px 14px; border-radius: 8px; overflow: auto; margin: 0; line-height: 1.45; }
pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff { white-space: pre; max-height: 70vh; }
.diff code { display: inline-block; min-width: 100%; font-size: inherit; }
.md { overflow-wrap: anywhere; }
.md p, .md ul, .md ol, .md pre { margin: 0 0 10px; } .md > :last-child { margin-bottom: 0; }
.md ul, .md ol { padding-left: 22px; } .md li + li { margin-top: 2px; }
.md h4 { font-size: 15px; margin: 14px 0 6px; } .md h4:first-child { margin-top: 0; }
.md code, a code, h1 code, .subject code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.md pre code { background: none; padding: 0; }
article + article { border-top: 1px solid var(--line); padding-top: 16px; }
article .subject { font-weight: 650; }
details.more > summary { color: var(--link); font-size: 13.5px; }
.diff .add { background: var(--add); display: block; } .diff .del { background: var(--del); display: block; }
.diff .hunk { color: var(--hunk); display: block; } .diff .file { font-weight: 650; display: block; }
details > summary { cursor: pointer; color: var(--ink-2); padding: 4px 0; }
details.file { border-top: 1px solid var(--line); padding: 6px 0; } details.file:first-of-type { border-top: 0; }

.reward { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.list-card h3 { font-size: 16px; margin-bottom: 4px; }
.list-card p { margin-bottom: 6px; } .list-card .latest { margin: 0; font-size: 14px; }
ol.posts { list-style: none; margin: 0; padding: 0; }
ol.posts li { padding: 8px 0; border-bottom: 1px solid var(--line); } ol.posts li:last-child { border-bottom: 0; }
ol.posts .meta { color: var(--muted); font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--axis); border: 2px solid var(--surface); }
.timeline li.good::before { background: var(--good); } .timeline li.bad::before { background: var(--critical); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.tabs a:hover { text-decoration: none; border-color: var(--axis); }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 22px; padding-left: 16px; border-left: 1px solid var(--axis); }
.tree li { position: relative; padding: 6px 0; }
.tree ul > li::before { content: ""; position: absolute; left: -16px; top: 26px; width: 14px; border-top: 1px solid var(--axis); }
.node { display: inline-flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 8px 12px; max-width: 100%; }
.node .meta { color: var(--muted); font-size: 12.5px; }
.node .mutations { font-size: 12.5px; color: var(--ink-2); }
.node .mutations code { font-size: 12px; }

.chart { margin: 0; }
.chart .title { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 8px; }
.chart .title h3 { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .line { width: 14px; height: 2px; border-radius: 1px; background: var(--c); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.plot-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; margin-top: 14px; }
.yaxis { position: relative; height: 180px; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; min-width: 28px; }
.yaxis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.plot { position: relative; height: 180px; touch-action: pan-y; outline: none; }
.plot:focus-visible { box-shadow: 0 0 0 2px var(--link); border-radius: 4px; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .base { stroke: var(--axis); stroke-width: 1; }
.plot .series { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .wash { fill: var(--c); opacity: .1; stroke: none; }
.plot .end { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.plot .end-label { position: absolute; transform: translate(8px, -50%); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.plot .end-label.left { transform: translate(calc(-100% - 8px), -50%); }
.plot .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--axis); display: none; pointer-events: none; }
.plot .tip { position: absolute; top: 4px; display: none; pointer-events: none; background: var(--raised); border: 1px solid var(--ring); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; box-shadow: 0 4px 14px rgba(0,0,0,.12); white-space: nowrap; z-index: 2; }
.plot .tip .t { color: var(--muted); margin-bottom: 2px; }
.plot .tip .r { display: flex; align-items: center; gap: 6px; }
.plot .tip .r b { font-variant-numeric: tabular-nums; }
.plot .tip .k { width: 12px; height: 2px; background: var(--c); border-radius: 1px; }
.xaxis { position: relative; height: 22px; font-size: 12px; color: var(--muted); grid-column: 2; }
.xaxis span { position: absolute; top: 4px; white-space: nowrap; transform: translateX(-50%); }
.xaxis span:first-child { transform: none; } .xaxis span:last-child { transform: translateX(-100%); }
.table-view summary { font-size: 13px; color: var(--muted); }
.table-view table { margin-top: 6px; }

.stackbar { display: flex; gap: 2px; height: 14px; margin: 6px 0 10px; }
.stackbar span { background: var(--c); min-width: 2px; }
.stackbar span:first-child { border-radius: 4px 0 0 4px; } .stackbar span:last-child { border-radius: 0 4px 4px 0; }
.stackbar span:only-child { border-radius: 4px; }
.bars { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 8px 10px; align-items: center; font-size: 14px; }
.bars .track { height: 10px; }
.bars .fill { height: 10px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
