:root { --pico-font-size: 100%; }
body > header, body > main, body > footer { padding-top: .5rem; }
.brand { font-weight: 700; text-decoration: none; }
.staging-banner { background: #b45309; color: #fff; text-align: center; padding: .25rem; font-size: .85rem; }
nav ul li a.active { font-weight: 700; text-decoration: underline; }
.flash { padding: .6rem .9rem; border-radius: .4rem; margin-bottom: .6rem; }
.flash.ok { background: #e7f6ec; color: #14532d; }
.flash.error { background: #fdecec; color: #7f1d1d; }
@media (prefers-color-scheme: dark) {
  .flash.ok { background: #14321f; color: #c9f2d6; }
  .flash.error { background: #3b1616; color: #fbd0d0; }
}
table.compact td, table.compact th { padding: .3rem .5rem; font-size: .92rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--pico-muted-color); }
.small { font-size: .85rem; }
.tag { display: inline-block; padding: .05rem .45rem; border-radius: 1rem; font-size: .75rem; font-weight: 600;
       background: var(--pico-secondary-background); color: var(--pico-secondary-inverse); }
.tag.green { background: #15803d; color: #fff; }
.tag.amber { background: #b45309; color: #fff; }
.tag.grey { background: #6b7280; color: #fff; }
.event h3 { margin-bottom: .3rem; }
.race-label { font-weight: 600; margin: .6rem 0 .2rem; }
.scroll { overflow-x: auto; }
.inline { display: inline; }
.inline-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form input { margin: 0; padding: .25rem .4rem; height: auto; }
.inline-form input[name=mark] { width: 6rem; }
.inline-form input[name=reason] { width: 14rem; }
.inline-form button { margin: 0; padding: .25rem .6rem; width: auto; }
button.link { background: none; border: none; color: var(--pico-primary); padding: 0; margin: 0; width: auto; text-decoration: underline; }
details.working summary { font-size: .85rem; }
details.working ol { font-size: .85rem; margin: .3rem 0 0 1rem; }
tr.adjusted td { background: color-mix(in srgb, #f59e0b 12%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
textarea.mono { font-family: ui-monospace, monospace; font-size: .85rem; }
.rules-scroll { overflow-x: auto; }
table.rules-matrix { font-size: .8rem; }
table.rules-matrix th, table.rules-matrix td { padding: .2rem .3rem; white-space: nowrap; }
table.rules-matrix input[type=text] { width: 3.6rem; padding: .15rem .3rem; margin: 0; height: auto; font-size: .8rem; }
table.rules-matrix input.wide { width: 4.6rem; }
table.rules-matrix td.changed { background: color-mix(in srgb, #f59e0b 25%, transparent); }
.rules-actions { display: flex; gap: .6rem; }
.rules-actions button { width: auto; }
