:root {
  --bg: #f6f5f1; --card: #fff; --ink: #1d2330; --muted: #6b7280; --line: #e3e0d8;
  --accent: #1f5f4a; --accent-ink: #fff; --warn: #b45309; --bad: #b91c1c; --light: #f0d9b5; --dark: #b58863;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.top { background: #1d2330; color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: .3px; }
.knight { color: var(--dark); }
nav { display: flex; gap: 18px; align-items: center; }
nav a, nav .linklike { color: #d6dae3; text-decoration: none; font-size: 14px; }
nav a:hover { color: #fff; }
main { padding-top: 24px; padding-bottom: 40px; min-height: 70vh; }
h1 { margin: 0 0 4px; font-size: 26px; }
h2 { margin: 0 0 12px; font-size: 18px; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 14px 0; }
.card.narrow { max-width: 560px; margin: 24px auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.grid2 .card { margin: 0; }
table { border-collapse: collapse; }
table.wide { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card table { width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: #faf9f6; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; } .center { text-align: center; } .left { text-align: left; }
.btn, button.btn { display: inline-block; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: 3px 9px; font-size: 13px; }
.btn:hover { filter: brightness(.96); }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
form.inline { display: inline; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tabs.inline { border: 0; margin: 0; }
.grow { flex: 1; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; background: #e5e7eb; }
.pill.running { background: #dbeafe; color: #1e40af; } .pill.completed { background: #dcfce7; color: #166534; } .pill.setup { background: #fef3c7; color: #92400e; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; background: #e0f2fe; }
.flash.success { background: #dcfce7; } .flash.error { background: #fee2e2; } .flash.warning { background: #fef3c7; }
.warn { color: var(--warn); font-size: 13px; } .ok { color: #15803d; font-size: 13px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 18px; min-width: 120px; }
.stats b { display: block; font-size: 24px; } .stats span { color: var(--muted); font-size: 12px; }
.checks { max-height: 420px; overflow: auto; display: grid; gap: 4px; margin-bottom: 12px; }
input, select { font: inherit; padding: 5px 8px; border: 1px solid #cfcabd; border-radius: 6px; background: #fff; }
form p label { display: block; font-weight: 600; margin-top: 8px; }
form p input[type=text], form p input[type=number], form p input[type=date], form p select { width: 100%; }
.helptext { display: block; color: var(--muted); font-size: 12px; }
.errorlist { color: var(--bad); margin: 4px 0; padding-left: 18px; }
kbd { background: #eee; border: 1px solid #ccc; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 12px; }
.scroll { overflow-x: auto; }
table.cross { background: #fff; border: 1px solid var(--line); }
table.cross th, table.cross td { text-align: center; padding: 4px 8px; }
td.cell { min-width: 52px; font-variant-numeric: tabular-nums; }
td.cell .opp { color: var(--muted); font-size: 12px; margin-right: 5px; }
td.cell .res { font-weight: 700; }
td.cell.w { background: #fffdf8; } td.cell.b { background: #6b5b4b; color: #fff; } td.cell.b .opp { color: #e5d9c9; }
td.cell.bye { background: #eef2ff; } td.cell.f { background: #f3f4f6; }
.chart { width: 100%; height: auto; }
.chart .grid { stroke: var(--line); } .chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; } .chart .dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
footer { padding-bottom: 30px; }
.boards select { min-width: 130px; }
body.cards { background: #fff; }
.cardgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 16px; }
.pcard { border: 1px solid #333; padding: 10px; break-inside: avoid; }
.pcard h3 { margin: 0 0 6px; font-size: 15px; }
.pcard td.box { width: 50px; border-left: 1px solid #999; }
@media print { .noprint, .top, footer { display: none; } .cardgrid { padding: 0; } }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } nav { gap: 10px; flex-wrap: wrap; } .bar { height: auto; padding: 10px 20px; } table.wide { display: block; overflow-x: auto; } }
