/* The styles of the site: the header, the home page and the statistics. */
:root {
  --bg: #0f1113; --panel: #16191c; --panel2: #1b1f23; --line: #262b30; --text: #e6e8ea; --muted: #8b939b;
  --accent: #00ced1; --warn: #e0a030; --bad: #e05050; --good: #4cc070;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, "Segoe UI", sans-serif; }
select, input, button { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; }
button { cursor: pointer; }
button.on, button:hover { border-color: var(--accent); color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12px; }
.err { color: var(--bad); }

/* ---- the header ---- */
header.top { display: flex; align-items: center; gap: 16px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header.top .brand { font-weight: 700; font-size: 18px; color: var(--accent); text-decoration: none; }
header.top nav.site { display: flex; gap: 4px; flex: 1; }
header.top nav.site a { color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; }
header.top nav.site a:hover, header.top nav.site a.on { border-color: var(--accent); color: var(--accent); }
header.top label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }

/* ---- the home page ---- */
.home { max-width: 980px; margin: 0 auto; padding: 32px 18px 48px; }
.home h1 { font-size: 30px; margin: 0 0 12px; }
.home .lead { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 22px; }
.home .cta { display: inline-block; background: var(--accent); color: #062a2b; font-weight: 700; padding: 10px 18px; border-radius: 8px; text-decoration: none; }
.home h2 { margin: 36px 0 12px; font-size: 20px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; color: var(--accent); }
.feature p { margin: 0; color: var(--text); }

/* ---- the statistics ---- */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 53px); }
aside { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.side-title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.worlds button { display: block; width: 100%; text-align: left; margin-bottom: 4px; }
.found { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.found a { color: var(--text); text-decoration: none; padding: 4px 6px; border-radius: 4px; display: flex; justify-content: space-between; gap: 6px; }
.found a:hover { background: var(--panel2); }
main { padding: 14px 18px 40px; min-width: 0; }
nav.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
nav.tabs button { border-radius: 999px; padding: 6px 14px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; cursor: pointer; user-select: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: var(--panel2); }
a.player { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: pointer; }
.age-new { color: var(--good); } .age-mid { color: var(--warn); } .age-old { color: var(--bad); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; }
.tag.open { color: var(--good); border-color: var(--good); } .tag.risky { color: var(--warn); border-color: var(--warn); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.card h3 { margin: 0 0 6px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.big { font-size: 22px; font-weight: 700; color: var(--accent); }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--panel2); margin: 6px 0; }
.progress { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.progress div { height: 100%; background: var(--accent); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 2px; max-width: 900px; }
.heat div { height: 22px; border-radius: 3px; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.heat .lbl { color: var(--muted); background: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  aside { border-right: none; border-bottom: 1px solid var(--line); }
  .worlds { display: flex; flex-wrap: wrap; gap: 4px; } .worlds button { width: auto; margin: 0; }
  .two { grid-template-columns: 1fr; }
  main { padding: 12px 16px 32px; }
  header.top { padding: 10px 16px; }
  .home { padding: 24px 16px 40px; }
}
