:root { color-scheme: dark; }
* { box-sizing: border-box; }
/* Author display rules (.pill etc.) beat the UA's [hidden] { display:none }
 * — without this, the header badges ignore the hidden attribute entirely. */
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.5 ui-sans-serif, system-ui, sans-serif; background: #14120e; color: #e8e2d4; }
header { padding: 12px 22px; border-bottom: 1px solid #2c2820; display: flex; align-items: center; gap: 12px; }
h1 { font-size: 16px; margin: 0; letter-spacing: .04em; }
h1 span { color: #c9973f; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #a99c7f; margin: 0 0 10px; }
.spacer { flex: 1; }
nav { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid #2c2820; }
nav button { background: none; border: none; border-bottom: 2px solid transparent; color: #a99c7f; padding: 6px 12px; cursor: pointer; font-size: 13.5px; border-radius: 0; }
nav button.active { color: #e8e2d4; border-bottom-color: #c9973f; }
nav button:hover { color: #e8e2d4; }
main { max-width: 1100px; margin: 0 auto; padding: 18px 22px 60px; display: grid; gap: 18px; }
section { border: 1px solid #2c2820; border-radius: 10px; padding: 14px 16px; background: #191612; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { padding: 4px 8px; text-align: left; border-bottom: 1px solid #241f18; vertical-align: top; }
th { color: #8a8271; font-weight: 500; white-space: nowrap; }
.ok { color: #7cba6d; } .bad { color: #d4756a; } .warn { color: #d9a441; } .muted { color: #8a8271; }
button { background: #241f18; color: #e8e2d4; border: 1px solid #3a3428; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; }
button:hover { border-color: #c9973f; }
button.danger { color: #d4756a; }
button.small { padding: 2px 8px; font-size: 11.5px; }
input, select { background: #100e0b; color: #e8e2d4; border: 1px solid #3a3428; border-radius: 6px; padding: 5px 8px; font-size: 13px; }
input[type="number"] { width: 90px; }
label { color: #a99c7f; font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
pre { background: #100e0b; border-radius: 8px; padding: 10px; overflow: auto; max-height: 320px; font-size: 12px; white-space: pre-wrap; }
#login { max-width: 420px; margin: 80px auto; text-align: center; }
#login input { width: 280px; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 11.5px; border: 1px solid #3a3428; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.card { border: 1px solid #2c2820; border-radius: 8px; padding: 10px 12px; background: #1c1915; }
.card .num { font-size: 20px; font-weight: 600; }
.card .lbl { font-size: 11.5px; color: #8a8271; }
.spark { display: block; width: 100%; height: 36px; margin-top: 4px; }
.msg { font-size: 12.5px; color: #8a8271; min-height: 1em; }
.banner { border: 1px solid #6b4a41; background: #241713; border-radius: 10px; padding: 10px 14px; }
.banner.bad { color: #d4756a; }
.banner button { vertical-align: baseline; }
main h1 { margin: 10px 0 -8px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #a99c7f; }
main h1 .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.err { color: #d4756a; }
details { border: 1px solid #241f18; border-radius: 8px; padding: 6px 10px; background: #1c1915; }
summary { cursor: pointer; color: #a99c7f; }
.progress { height: 5px; background: #241f18; border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: #c9973f; }
dialog { background: #191612; color: #e8e2d4; border: 1px solid #3a3428; border-radius: 10px; padding: 16px 18px; max-width: 440px; }
dialog::backdrop { background: rgba(10, 9, 7, 0.65); }
dialog h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #a99c7f; }
dialog p { margin: 0 0 12px; white-space: pre-wrap; }
dialog input { width: 100%; margin-bottom: 12px; }
dialog .row { justify-content: flex-end; }
#upgrade-log { max-height: 380px; }
