:root {
  --bg: #0f1216; --panel: #161b21; --panel-2: #1d242c; --line: #26303a;
  --text: #e6edf3; --muted: #8b98a5; --accent: #14b8a6; --accent-2: #a3e635;
  --t1: #f87171; --t2: #fb923c; --t3: #facc15; --t4: #a3e635; --t5: #2dd4bf;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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; }
img { max-width: 100%; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 1.2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .85rem; }
.empty { color: var(--muted); padding: 2rem 0; }

.site-header { background: #0b0e11; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 1.15rem; }
.brand b { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.header-search { margin: 0 0 0 auto; display: flex; }
input, select, button { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button, .button { background: var(--accent); color: #04211e; border: 0; font-weight: 700; cursor: pointer; border-radius: 8px; padding: 8px 16px; display: inline-block; }
.button:hover { text-decoration: none; filter: brightness(1.1); }

.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .5rem; }
.hero p { color: var(--muted); margin: 0 0 1.5rem; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.hero-search input { flex: 1; padding: 12px 16px; font-size: 1.05rem; }
.quick-links { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: .85rem; margin-right: 6px; }
.pill.strong { background: var(--accent); color: #04211e; border-color: var(--accent); font-weight: 700; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); display: block; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.tile-art { position: relative; aspect-ratio: 1; background: var(--panel-2) center/cover; display: flex; align-items: center; justify-content: center; }
.tile-art img { width: 80%; height: auto; }
.tile-ovr { position: absolute; top: 8px; left: 10px; font-size: 1.6rem; font-weight: 900; text-shadow: 0 2px 6px #000a; }
.tile-pos { position: absolute; top: 42px; left: 12px; font-weight: 700; font-size: .85rem; color: var(--accent-2); text-shadow: 0 1px 4px #000a; }
.tile-body { padding: 10px 12px 12px; }
.tile-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { color: var(--muted); font-size: .8rem; margin-bottom: 8px; }
.tile-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.chip { font-size: .8rem; font-weight: 700; text-align: center; background: var(--panel-2); border-radius: 6px; padding: 2px 0; }
.chip small { display: block; font-size: .62rem; color: var(--muted); font-weight: 600; }

.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); } .t5 { color: var(--t5); } .na { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters input[type=search], .filters input[type=text] { flex: 1 1 220px; }
.filters input[type=number] { width: 110px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; color: var(--muted); }

.program-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.program { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--text); }
.program:hover { border-color: var(--accent); text-decoration: none; }
.program small { display: block; color: var(--muted); }

.crumbs { color: var(--muted); font-size: .85rem; margin-top: 16px; }
.card-top { display: grid; grid-template-columns: 256px 1fr; gap: 24px; align-items: center; margin: 12px 0 24px; }
.card-art { background: var(--panel-2) center/cover; border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.card-summary h1 { margin: 0 0 .25rem; }
.headline { display: grid; grid-template-columns: repeat(6, minmax(0, 72px)); gap: 8px; margin: 16px 0; }
.headline-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 8px 0; }
.headline-stat b { display: block; font-size: 1.35rem; }
.headline-stat small { color: var(--muted); font-weight: 600; font-size: .7rem; }
.positions { margin: 0 0 16px; }
.actions { display: flex; gap: 16px; align-items: center; }

.card-columns { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.attr-group h3:first-child { margin-top: 0; }
.statbar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; padding: 3px 0; font-size: .9rem; }
.statbar-label { color: var(--muted); }
.statbar-track { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.statbar-fill { display: block; height: 100%; background: currentColor; border-radius: 3px; }
.statbar-value { text-align: right; font-weight: 800; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; text-align: right; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: .85rem; }
.tags small { color: var(--accent-2); }
.versions { list-style: none; padding: 0; margin: 0; }
.versions li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.versions li:last-child { border: 0; }

.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare { border-collapse: collapse; width: 100%; min-width: 520px; }
.compare th, .compare td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.compare tbody th { text-align: left; color: var(--muted); font-weight: 500; }
.compare thead th { vertical-align: bottom; color: var(--text); }
.compare thead a { color: var(--text); }
.compare thead small { color: var(--muted); font-weight: 400; }
.compare .group-row th { background: var(--panel-2); text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; color: var(--muted); }
.compare td { font-weight: 700; }
.compare td.best { background: #14b8a622; }

.prose { max-width: 720px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0; color: var(--muted); font-size: .85rem; }
.footer-links a { color: var(--muted); }

@media (max-width: 760px) {
  .header-row { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .header-search { margin-left: auto; }
  .header-search input { width: 150px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-top { grid-template-columns: 1fr; }
  .card-art { max-width: 256px; margin: 0 auto; width: 100%; }
  .headline { grid-template-columns: repeat(3, 1fr); }
  .card-columns { grid-template-columns: 1fr; }
  .statbar { grid-template-columns: 110px 1fr 40px; }
}
