/* The tracker's look (tools/shadowverse-discovery/tracker_gui.ps1): dark, one accent, figures
   with their weight shown. Dark is the page's own look, not only the system's. */
:root {
  --bg: #16181e; --panel: #1f222a; --panel-2: #262a34; --ink: #eceef2; --muted: #9aa0ad; --line: #2f333d;
  --accent: #2e6bd1; --link: #8fb8ff; --win: #4cd964; --loss: #ff6b6b; --warn: #ffc04d; --bar: rgba(143, 184, 255, 0.22);
  --c-elf: #6cc36c; --c-royal: #e8c547; --c-witch: #7b95ff; --c-dragon: #ff9a3c; --c-nightmare: #c45ad8; --c-bishop: #e8e2c8; --c-nemesis: #4fc3d9;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 "Segoe UI", "Yu Gothic UI", "Hiragino Sans", Meiryo, sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
h1 { font-size: 17px; margin: 0; letter-spacing: 0.02em; }
h1 .sub { font-size: 13px; font-weight: normal; color: var(--muted); margin-left: 6px; }
h2 { font-size: 15px; margin: 28px 0 8px; }
h3 { font-size: 14px; margin: 18px 0 6px; }
.tag { font-size: 11px; font-weight: normal; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 8px; vertical-align: 2px; }
main { max-width: 980px; margin: 0 auto; padding: 18px 20px; }
footer { max-width: 980px; margin: 24px auto; padding: 0 20px 28px; color: var(--muted); font-size: 12px; }
a { color: var(--link); }
button, select { font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover, select:hover { border-color: #444a58; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; margin-top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.warn { color: var(--warn); }
.notice { border: 1px solid var(--warn); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.notice p { margin: 4px 0; white-space: pre-wrap; }
.intro { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 16px; color: var(--muted); font-size: 13px; }

/* Headline figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-sub { color: var(--muted); font-size: 12px; }

/* Tables: panels with quiet rules */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tbody tr:last-child > td { border-bottom: none; }
th { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; background: var(--panel-2); }
tbody tr:hover > td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.deck { cursor: pointer; }
tr.deck:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
tr.detail > td { padding: 4px 12px 14px 28px; background: var(--panel-2); }
table.inner { border: none; background: transparent; }
td.res.win { color: var(--win); font-weight: 600; }
td.res.loss { color: var(--loss); font-weight: 600; }

/* Figures with a bar (added by app.mjs decorate): a win rate against 50%, a share as a part */
td.bar { background-repeat: no-repeat; background-size: var(--v, 0%) 4px; background-position: right 12px bottom 4px; }
td.bar.rate { background-image: linear-gradient(var(--rate-color, var(--link)), var(--rate-color, var(--link))); }
td.bar.rate.up { --rate-color: var(--win); }
td.bar.rate.down { --rate-color: var(--loss); }
td.bar.share { background-image: linear-gradient(var(--link), var(--link)); }
/* A figure's weight: few decided matches are dim, provisional ones plain, both marked. */
.lv-few { color: var(--muted); }
.lv-few.bar { --rate-color: #5b6170 !important; }
.badge { display: inline-block; font-size: 10px; line-height: 1.6; padding: 0 6px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
.badge.provisional { border-color: #5a4a22; color: var(--warn); }

/* Class dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--muted); }
.dot.Elf { background: var(--c-elf); } .dot.Royal { background: var(--c-royal); } .dot.Witch { background: var(--c-witch); }
.dot.Dragon { background: var(--c-dragon); } .dot.Nightmare { background: var(--c-nightmare); } .dot.Bishop { background: var(--c-bishop); }
.dot.Nemesis { background: var(--c-nemesis); }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100%; }
.tab { padding: 5px 14px; border: none; background: transparent; color: var(--muted); border-radius: 8px; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--accent); color: #fff; }

@media (max-width: 560px) {
  main { padding: 14px 12px; }
  th, td { padding: 7px 8px; font-size: 13px; }
  .stat-value { font-size: 22px; }
  .tabs { width: 100%; }
}

/* The download page (drafts/download.html, 2026-10-12): a link drawn as the main button. */
a.button { display: inline-block; text-decoration: none; border-radius: 8px; padding: 9px 18px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
header nav a { font-size: 13px; }
