/* Dark navy card-panel theme with the four APL accessibility themes. */
:root {
  --bg: #0a1220; --panel: #111c30; --panel2: #16243d; --line: #22344f;
  --text: #e6edf7; --muted: #8fa3bf; --accent: #3b82f6; --accent-text: #fff;
  --good: #34d399; --bad: #f87171;
  --diamond: #6fd6ff; --gold: #e3b341; --silver: #b8c4d4; --bronze: #c98a55; --common: #7f8ea3;
}
:root[data-theme="light"] {
  --bg: #f1f4f9; --panel: #fff; --panel2: #f5f7fb; --line: #d8dfea;
  --text: #14213a; --muted: #5a6a82; --accent: #1d4ed8;
  --good: #047857; --bad: #b91c1c;
  --diamond: #0e7fb5; --gold: #96700a; --silver: #56657a; --bronze: #8f5524; --common: #6b7789;
}
:root[data-theme="contrast"] {
  --bg: #000; --panel: #000; --panel2: #111; --line: #fff;
  --text: #fff; --muted: #e5e5e5; --accent: #ffe600; --accent-text: #000;
  --good: #00ff7b; --bad: #ff6b6b;
  --diamond: #7fe3ff; --gold: #ffe600; --silver: #fff; --bronze: #ffb26b; --common: #ccc;
}
:root[data-theme="cb"] {
  --accent: #56b4e9; --accent-text: #00121f; --good: #56b4e9; --bad: #e69f00;
  --diamond: #56b4e9; --gold: #f0e442; --silver: #d0d7e2; --bronze: #e69f00; --common: #8a97aa;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: 70vh; }

.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.brand img { height: 56px; width: auto; max-width: 160px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 22px; font-weight: 800; }
.brand-tag { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.banner { display: block; max-height: 220px; overflow: hidden; border-bottom: 1px solid var(--line); }
.banner img { display: block; width: 100%; max-height: 220px; object-fit: cover; object-position: center; }
@media (max-width: 640px) { .banner, .banner img { max-height: 110px; } .brand-name { font-size: 18px; } .brand img { height: 44px; } }
.brand-preview { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.brand-preview img { max-height: 80px; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); padding: 4px; }
.brand:hover { text-decoration: none; }
.user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 2px; overflow-x: auto; }
.nav a { padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.on { color: var(--text); border-bottom-color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0; }

.btn, button, select, input[type=text], input[type=number], input[type=date], input[type=search] {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; }
.btn, button { cursor: pointer; font-weight: 600; font-size: 13px; display: inline-block; }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
input.n { width: 52px; padding: 4px 6px; text-align: center; }

h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 0; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.card > .head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel2);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card > .body { padding: 16px; }
.grid { display: grid; gap: 18px; }
.grid.main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 860px) { .grid.main, .grid.two { grid-template-columns: minmax(0, 1fr); } }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
th a { color: inherit; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel2); }
.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); }
.small { font-size: 13px; }

.ovr { display: inline-block; min-width: 34px; padding: 1px 6px; border-radius: 5px; text-align: center;
  font-weight: 800; border: 2px solid currentColor; }
.ovr.diamond { color: var(--diamond); } .ovr.gold { color: var(--gold); } .ovr.silver { color: var(--silver); }
.ovr.bronze { color: var(--bronze); } .ovr.common { color: var(--common); }
.ovr.big { font-size: 34px; min-width: 76px; padding: 6px 12px; border-width: 3px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }

.news { padding: 16px; border-bottom: 1px solid var(--line); }
.news:last-child { border-bottom: 0; }
.news h3 { margin: 6px 0 6px; font-size: 18px; }
.news p { margin: 0; color: var(--muted); }
.news .meta { font-size: 12px; color: var(--muted); }
.news.lead h3 { font-size: 26px; line-height: 1.2; }
.news.lead p { font-size: 16px; color: var(--text); }

.score { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); gap: 12px; }
.score:last-child { border-bottom: 0; }
.score .t { display: flex; justify-content: space-between; gap: 16px; }
.score .w { font-weight: 800; }
.score .lines { flex: 1; }

.hero { display: flex; gap: 20px; align-items: center; padding: 20px; flex-wrap: wrap; }
.hero img { width: 120px; border-radius: 8px; }
.hero h1 { margin: 0 0 4px; }
.stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 10px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.attr { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.attr .track { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.attr .fill { height: 100%; background: var(--accent); }
.attr b { text-align: right; }
.capbar { height: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin-top: 8px; }
.capbar div { height: 100%; background: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.notice { padding: 12px 16px; border: 1px solid var(--accent); border-radius: 8px; margin-bottom: 16px; background: var(--panel); }
.empty { padding: 24px; text-align: center; color: var(--muted); }
ul.clean { margin: 0; padding-left: 18px; }
ul.clean li { margin-bottom: 6px; }
