/* Theme matched to wardogsnordic.com: same palette, type and square-edged shapes.
   Tokens below are taken from that site's own stylesheet so the two read as one product. */
:root {
  /* Original stats palette: softer and easier on the eye than the community
     site's near-black. Structure and header styling stay as they are. */
  --yellow: #e3a52b;
  --yellow-hi: #f0b944;
  --ink: #121416;
  --bg: #0d0f11;
  --bg-2: #15181c;
  --bg-3: #15181c;
  --line: #262b32;
  --line-soft: #1f242a;
  --text: #dde1e6;
  --muted: #8b939d;
  /* tricolour rule keeps the community site's team colours */
  --blue: #2a6de0;
  --red: #d4222f;
  --green: #00833f;
  --good: #5fbf6a;
  --bad: #e0605a;
  --discord: #5865f2;
  --accent: var(--yellow);
  --panel: var(--bg-3);
  --panel2: #1b1f24;
  --maxw: 1320px;
  /* Header keeps the community site's heavy display face; content uses a condensed
     one that stays readable at table sizes. */
  --brand: "Arial Black", "Archivo Black", Impact, system-ui, sans-serif;
  --head: "Saira Condensed", "Arial Narrow", var(--brand);
  --body: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--yellow); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: 0.04em; line-height: 1.1; margin: 0; text-transform: uppercase; }
h1 { font-size: 34px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
h2.section { margin-top: 8px; font-size: 17px; }
h3.sub { margin: 18px 0 9px; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); font-family: var(--body); font-weight: 800; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.gap { height: 14px; }
.count { font-size: 0.6em; font-family: var(--mono); font-weight: 400; color: var(--muted); }

/* tricolour rule, as on the community site */
.tri { height: 4px; width: 100%; display: flex; }
.tri i { flex: 1; }
.tri i:nth-child(1) { background: var(--blue); }
.tri i:nth-child(2) { background: var(--red); }
.tri i:nth-child(3) { background: var(--green); }

/* header */
/* Grows with its contents rather than forcing a second row at narrow widths. */
.top { display: flex; align-items: center; gap: 16px 20px; padding: 12px 22px; min-height: 74px; border-bottom: 1px solid var(--line); background: rgba(13, 15, 17, 0.94); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 900 15px/1 var(--brand); letter-spacing: 0.12em; white-space: nowrap; }
.brand .logo { height: 38px; width: auto; max-width: 44px; object-fit: contain; }
.brand span { color: var(--yellow); margin-left: 6px; }
nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
nav a { color: var(--muted); transition: color 0.2s; }
nav a:hover, nav a.on { color: var(--yellow); }
.srv { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.srv-item { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 13px; background: var(--panel2); }
main { max-width: var(--maxw); margin: 0 auto; padding: 26px 24px 60px; display: flex; flex-direction: column; gap: 20px; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 0 20px 30px; letter-spacing: 0.06em; }

/* panels */
.panel { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 14px; flex-wrap: wrap; }
.panel-head > a { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.panel-head > a:hover { color: var(--yellow); }
.note { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.callout { border-left: 3px solid var(--yellow); border-radius: 0 6px 6px 0; padding: 10px 14px; background: rgba(227, 165, 43, 0.07); font-size: 14px; margin: 12px 0 0; }
.bad-callout { border-left-color: var(--bad); background: rgba(224, 96, 90, 0.08); }
.empty { color: var(--muted); padding: 26px; text-align: center; }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 960px) { .cols, .cols2 { grid-template-columns: 1fr; } }

/* tables */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 800; color: #aab2bd; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13.5px; }
tbody tr:last-child td { border-bottom: 0; }
/* Alternating row shading: long lists are far easier to follow across. */
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.026); }
tbody tr:hover { background: rgba(227, 165, 43, 0.08); }
th.n, td.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: #cfd5dd; }
td.rank { font-family: var(--mono); color: var(--muted); width: 40px; }
tr.top1 td.rank, td.hl { color: var(--yellow); font-weight: 700; }
th.sortable a { color: inherit; display: inline-block; }
th.sortable a:hover { color: var(--text); }
th.sortable.on { color: var(--yellow); }

/* bits */
.pl { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; vertical-align: middle; }
.av { width: 26px; height: 26px; object-fit: cover; flex: none; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; }
.av-none { display: inline-grid; place-items: center; color: var(--muted); font: 700 12px var(--head); }
.av.lg { width: 88px; height: 88px; font-size: 34px; border-radius: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; text-transform: uppercase; font-size: 12.5px; letter-spacing: 0.06em; }
.chip::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.badge { display: inline-block; font: 800 10px var(--body); text-transform: uppercase; letter-spacing: 0.14em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); vertical-align: middle; }
.badge.live { border-color: rgba(95, 191, 106, 0.45); color: var(--good); }
.badge.off { border-color: rgba(224, 96, 90, 0.45); color: #ff8a86; }
.tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; margin-left: 6px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.1em; }
.place { font: 700 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; letter-spacing: 0.04em; }
.place.p1 { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; align-items: center; margin-top: 8px; }
.panel-head .legend { margin-top: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; box-shadow: 0 0 8px rgba(224, 96, 90, 0.5); }
.dot.on { background: var(--good); box-shadow: 0 0 0 0 rgba(95, 191, 106, 0.5); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 191, 106, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(95, 191, 106, 0); } }

/* tiles: separate rounded cards, easier to scan than a hairline grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.panel .tiles { margin-top: 16px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel .tile { background: var(--panel2); }
.tile .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; }
.tile .v { font: 600 26px/1.25 var(--mono); color: var(--yellow); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .v a { color: inherit; }
.tile .s { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* live panel */
.live-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.live-meta { margin-left: auto; color: var(--muted); font: 12px/1.7 var(--mono); text-align: right; }
.fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.fcard { border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-2); }
.fname { font: 700 19px var(--head); display: flex; justify-content: space-between; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.fname .fn { display: inline-flex; align-items: center; gap: 9px; }
.fname .ticon { width: 26px; height: 26px; }
.fscore { font: 600 30px/1.2 var(--mono); color: var(--yellow); margin-top: 4px; }
.fscore small { font-size: 13px; color: var(--muted); font-family: var(--mono); font-weight: 400; }
.fmeta { color: var(--muted); font: 12px var(--mono); margin-top: 5px; }
.bar { height: 8px; background: #0b0d0f; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 9px 0 5px; }
.bar i { display: block; height: 100%; background: var(--c); transition: width 0.6s; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-top: 18px; }
main > .boards { margin-top: 0; }
.board { border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); background: var(--bg-3); min-width: 0; overflow: hidden; }
.board h3 { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 80%); }
.board td, .board th { padding: 8px 12px; font-size: 13px; }
.board .av { width: 22px; height: 22px; }

/* controls */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { padding: 9px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2); color: var(--muted); font: 800 11.5px var(--body); letter-spacing: 0.12em; text-transform: uppercase; transition: 0.18s; }
.tab:hover { border-color: #39404a; color: var(--text); }
.tab.on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
label { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; display: inline-flex; gap: 9px; align-items: center; }
select, input[type='search'], input[type='text'] { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; font: 400 14px var(--body); text-transform: none; letter-spacing: 0; }
select:focus, input:focus, textarea:focus { outline: 0; border-color: var(--yellow); }
input[type='search'] { min-width: 240px; }
button { background: var(--yellow); color: var(--ink); border: 0; border-radius: 7px; padding: 11px 22px; font: 900 12px var(--body); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; transition: background 0.18s; }
button:hover { background: var(--yellow-hi); }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; }
.hsearch { margin-left: auto; }
.hsearch input[type='search'] { width: 190px; min-width: 0; padding: 8px 11px; }

/* Discord button, in the community site's blurple */
.dc { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; background: var(--discord); color: #fff; font: 800 12px var(--body); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: background 0.18s; }
.dc:hover { background: #6d78f5; color: #fff; }
.dc svg { width: 19px; height: 19px; }
.dc-count { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: #e6e8ff; }
.dc .dot { box-shadow: none; animation: none; }

/* match & player */
.hero-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.hero-row h1 { margin: 6px 0; }
.winner { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 20px; }
.winner .muted { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; }
.hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero h1 { margin-bottom: 6px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px var(--mono); }
.chart .grid { stroke: var(--line); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.bars a { flex: 1; background: var(--c); opacity: 0.85; min-width: 4px; max-width: 28px; }
.bars a:hover { opacity: 1; }

/* activity heatmap */
table.heat { border-collapse: separate; border-spacing: 2px; width: auto; }
table.heat th { background: none; border: 0; padding: 0 6px 4px 0; }
th.hm-h { font-size: 9.5px; color: var(--muted); letter-spacing: 0; text-align: center; width: 22px; }
th.hm-d { font-size: 10.5px; color: var(--muted); text-align: right; padding-right: 8px; }
td.hm-c { width: 22px; height: 20px; padding: 0; border: 0; border-radius: 3px; }
table.heat tbody tr:hover, table.heat tr:nth-child(even) { background: none; }
.flag { width: 18px; height: 13px; object-fit: cover; border: 1px solid var(--line); border-radius: 2px; flex: none; vertical-align: middle; }
.flag.big { width: 30px; height: 22px; margin-right: 10px; }

/* donut charts on player profiles */
.piewrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.piewrap svg { flex: none; }
.pielegend { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; }
.pielegend span { display: inline-flex; align-items: center; gap: 9px; }
.pielegend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.pielegend b { font-family: var(--mono); font-weight: 600; }
.pielegend em { font-style: normal; color: var(--muted); }

/* maps, factions, records */
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kv div { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; display: flex; flex-direction: column; }
.kv span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; }
.kv b { font: 600 17px var(--mono); margin-top: 3px; }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #0b0d0f; border: 1px solid var(--line); }
.split i { background: var(--c); }
.links { display: flex; gap: 18px; margin-top: 14px; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.fpanel { border-top: 3px solid var(--c); }
.recgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
ol.rec { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
ol.rec li::marker { color: var(--muted); font-family: var(--mono); }
ol.rec b { font-family: var(--mono); color: var(--yellow); margin-left: 4px; }
.panel.has-banner { overflow: hidden; }
.mapimg { display: block; width: calc(100% + 48px); margin: -22px -24px 18px; aspect-ratio: 8 / 3; object-fit: cover; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }

/* admin */
.copy { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 9px; font: 700 10.5px var(--body); letter-spacing: 0.1em; text-transform: uppercase; margin-left: 8px; cursor: pointer; }
.copy:hover { color: var(--yellow); background: var(--panel2); }
.idgrid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; align-items: center; margin: 18px 0 0; }
.idgrid dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 800; }
.idgrid dd { margin: 0; overflow-wrap: anywhere; }
.idbig { font: 900 20px var(--mono); color: var(--yellow); }
.ticon { width: 18px; height: 18px; object-fit: contain; flex: none; }
.chip.has-icon::before { display: none; }
.board h3 .ticon { width: 20px; height: 20px; }
form.inline { display: inline; }
button.mini { padding: 4px 11px; font-size: 10.5px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; letter-spacing: 0.1em; }
button.mini:hover { border-color: var(--yellow); color: var(--yellow); background: var(--bg-2); }
button.danger:hover { border-color: var(--red); color: #ff8a93; }
tr.dim td { opacity: 0.55; }
td.warnish { color: var(--yellow); }
.mini-link { font-size: 10.5px; color: var(--yellow); margin-right: 8px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; }
.editform { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; font: 400 14.5px var(--body); text-transform: none; letter-spacing: 0; }
.field.checkbox { flex-direction: row; align-items: center; gap: 10px; text-transform: none; font-size: 13.5px; letter-spacing: 0; font-weight: 400; color: var(--text); }
.field.checkbox input { width: 18px; height: 18px; accent-color: var(--yellow); }
.field textarea { resize: vertical; }

@media (max-width: 700px) {
  .top { height: auto; padding: 12px 14px; gap: 12px; }
  main { padding: 16px 14px 40px; }
  .hsearch, .hsearch input[type='search'] { width: 100%; margin-left: 0; }
  .srv { margin-left: 0; }
  .live-meta { margin-left: 0; text-align: left; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 24px; }
  .boards { grid-template-columns: 1fr; }
}
