/* Halo menu look: near-black blue, translucent panels with glowing hairlines, cyan highlight (Halo 3),
   steel highlight on Reach pages, condensed uppercase headings (Bahnschrift ships with Windows 10/11). */
:root {
  --bg: #04080e; --bg-2: #0a1520; --panel: rgba(14, 30, 46, .72); --panel-solid: #0e1d2c;
  --line: rgba(120, 196, 255, .22); --line-strong: rgba(120, 196, 255, .5);
  --text: #dce8f3; --muted: #8ea4b8;
  --accent: #5cc8ff; --accent-bright: #a8e6ff; --accent-soft: rgba(92, 200, 255, .13); --on-accent: #02121d;
  --bad: #ff7262; --bad-soft: rgba(255, 114, 98, .14); --good: #74e0a4; --flash: rgba(92, 200, 255, .16);
  --display: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
.game-HaloReach { --accent: #c3d2e0; --accent-bright: #ffffff; --accent-soft: rgba(195, 210, 224, .12); --line: rgba(195, 210, 224, .2); --line-strong: rgba(195, 210, 224, .45); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15px/1.55 var(--body);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(40, 110, 170, .22), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(20, 60, 100, .25), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 480px);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); text-decoration: underline; }
h1, h2, h3, .brand, button, .tag, th, .crumbs, nav a, .card strong, .hero-card h2 { font-family: var(--display); }
h1 { margin: 6px 0 10px; font-size: 32px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 0 18px rgba(92, 200, 255, .25); }
h2 { margin: 26px 0 8px; font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-bright); }
main { max-width: 1160px; margin: 0 auto; padding: 18px 16px 8px; }
.muted { color: var(--muted); }
.lead { font-size: 17px; color: var(--muted); max-width: 900px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  padding: 8px 18px; background: rgba(4, 10, 18, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(92, 200, 255, .08), 0 8px 24px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.brand:hover { color: var(--accent-bright); text-decoration: none; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 6px rgba(92, 200, 255, .35)); }
/* the menu: plain text links; the page you're on is bright, with a thin underline */
.top nav { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.top nav a { color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--accent-bright); text-decoration: none; }
.top nav a.active { color: var(--accent-bright); border-bottom-color: var(--accent); }
/* the search box gives up width before the header wraps onto a second line */
.search { margin-left: auto; flex: 1 1 170px; max-width: 300px; }
.search input { width: 100%; }

footer { max-width: 1160px; margin: 36px auto 28px; padding: 14px 16px 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* panels */
section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 4px 18px 16px; margin: 16px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .3);
}
section > h2:first-child { margin-top: 14px; }

/* form controls */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: rgba(2, 10, 18, .7); border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select option:disabled { color: #5c6b79; }
button {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent)); color: var(--on-accent);
  border: 1px solid var(--accent-bright); border-radius: 3px; padding: 7px 16px; cursor: pointer;
  font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 0 14px rgba(92, 200, 255, .25);
}
button:hover { filter: brightness(1.08); box-shadow: 0 0 20px rgba(92, 200, 255, .45); }
button.secondary { background: var(--accent-soft); color: var(--accent-bright); border-color: var(--line-strong); box-shadow: none; }
button.secondary:hover { background: rgba(92, 200, 255, .22); }
button.link { background: none; border: 0; box-shadow: none; color: var(--accent); padding: 0; text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; text-decoration: underline; }
.stack { display: grid; gap: 14px; max-width: 560px; }
.stack label { display: grid; gap: 4px; }
.inline, .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.inline input { flex: 1 1 260px; }
.flash { background: var(--flash); border: 1px solid var(--line-strong); padding: 9px 14px; border-radius: 3px; }

/* hero banners */
.heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 6px 0 8px; }
.hero-card {
  position: relative; display: block; min-height: 250px; overflow: hidden; border-radius: 4px; color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}
.hero-card img, .banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-card::after, .banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3, 8, 14, .92) 0%, rgba(3, 8, 14, .55) 45%, rgba(3, 8, 14, .1) 100%);
}
/* keep each artwork's subject in frame when cropped: Halo 3's red Spartan (left), Reach's Spartan (right) */
.Halo3 img, .game-Halo3 .banner img { object-position: 22% 35%; }
.HaloReach img, .game-HaloReach .banner img { object-position: 78% 40%; }
.hero-card:hover { border-color: var(--line-strong); text-decoration: none; }
.hero-card:hover img { transform: scale(1.03); }
.hero-card .hero-text { position: relative; z-index: 1; padding: 22px 24px; max-width: 70%; }
.hero-card h2 { margin: 0 0 6px; font-size: 30px; letter-spacing: .08em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.hero-card p { margin: 2px 0; color: #c9d8e6; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.hero-card .go { display: inline-block; margin-top: 12px; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); }
.game-Halo3 .hero-card.Halo3, .hero-card.Halo3:hover { --accent-bright: #a8e6ff; }
.hero-card.HaloReach .go { color: #e7eef5; }
.banner { position: relative; height: 150px; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); margin: 4px 0 14px; }
.banner.thin { height: 74px; }
.banner .banner-text { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0 22px; }
.banner h1 { margin: 0; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.banner p { margin: 2px 0 0; color: #c9d8e6; }

/* cards, tables, tags */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; color: var(--text); }
.card:hover { border-color: var(--line-strong); text-decoration: none; background: rgba(20, 44, 66, .75); }
.card strong { display: block; font-size: 28px; font-weight: 600; color: var(--accent-bright); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 7px 9px; border-bottom: 1px solid rgba(120, 196, 255, .1); vertical-align: top; }
table.list th { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; border-bottom-color: var(--line); }
table.list tbody tr:hover td { background: rgba(92, 200, 255, .05); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.desc { color: var(--muted); font-size: 13px; max-width: 360px; overflow-wrap: anywhere; }
.tag {
  display: inline-block; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 2px;
  padding: 1px 10px; margin: 2px 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-bright);
}
.tag:hover { border-color: var(--line-strong); text-decoration: none; }
.tag.dim { opacity: .6; }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 2px; padding: 0 5px; letter-spacing: .04em; white-space: nowrap; }
.host { display: inline-block; border: 1px solid rgba(120, 196, 255, .18); border-radius: 2px; padding: 0 6px; margin: 2px 0; font-size: 13px; }
.host.good { border-color: var(--good); color: var(--good); }
.host.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.pairs { columns: 2 320px; padding-left: 18px; }
.pairs li { margin: 3px 0; break-inside: avoid; }
.pager { display: flex; gap: 16px; align-items: center; font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; }
.download { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.log { font-size: 13px; }
code { overflow-wrap: anywhere; color: var(--accent-bright); }
.crumbs { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* work page */
.title-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; justify-content: space-between; }
.title-row h1 { margin-bottom: 4px; }
.actions {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; padding: 12px 14px;
  display: grid; gap: 8px; min-width: min(360px, 100%); max-width: 460px; box-shadow: 0 0 24px rgba(92, 200, 255, .12);
}
.actions label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-family: var(--display); }
.actions select { max-width: 100%; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 14px; }
.actions .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.actions p { margin: 0; }
.inline.tight { margin: 0; flex-wrap: nowrap; }
.inline.tight select { max-width: 280px; }
tr.chosen td { background: var(--accent-soft); }
details.holders summary { cursor: pointer; color: var(--accent); white-space: nowrap; }
details.holders[open] { min-width: 200px; }

/* thumbnails and game type icons in lists */
td.title-cell > * { vertical-align: middle; }
td.title-cell .thumb { display: inline-block; margin-right: 10px; }
table.list td { vertical-align: middle; }
.thumb { flex: none; width: 64px; height: 36px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); background: rgba(2, 10, 18, .6); }
.thumb.blank { display: inline-block; }
.thumb.icon { display: inline-flex !important; align-items: center; justify-content: center; color: var(--accent); }
svg.gt { width: 22px; height: 22px; flex: none; }
svg.gt.title-icon { width: 34px; height: 34px; margin-right: 12px; vertical-align: -5px; color: var(--accent-bright); filter: drop-shadow(0 0 8px rgba(92, 200, 255, .45)); }

/* map art banners: base map screenshot behind the crumbs on map/mode pages */
.banner.work { height: 170px; }
.banner.map-art::after { background: linear-gradient(90deg, rgba(3, 8, 14, .88) 0%, rgba(3, 8, 14, .45) 50%, rgba(3, 8, 14, .15) 100%), linear-gradient(0deg, rgba(3, 8, 14, .6), transparent 50%); }
.banner.work .banner-text { justify-content: flex-end; padding-bottom: 14px; }
.banner.map-art img { object-position: center 45%; }

/* explore: base map tiles and game type tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); color: #fff; }
.tile:hover { border-color: var(--line-strong); text-decoration: none; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile-img.blank { background: var(--panel-solid); }
.tile:hover .tile-img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 8, 14, .9), rgba(3, 8, 14, .1) 60%); }
.tile-text { position: absolute; left: 12px; right: 12px; bottom: 9px; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile-text strong { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 16px; }
.tile-text span { font-size: 13px; color: #c9d8e6; }
.type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.type-tile { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; color: var(--text); text-align: center; }
.type-tile:hover { border-color: var(--line-strong); text-decoration: none; background: rgba(20, 44, 66, .75); }
.type-tile svg.gt { width: 46px; height: 46px; color: var(--accent-bright); filter: drop-shadow(0 0 8px rgba(92, 200, 255, .4)); }
.type-tile strong { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; }
footer .legal { font-size: 12px; opacity: .8; }

@media (max-width: 700px) {
  h1 { font-size: 24px; }
  .search { margin-left: 0; width: 100%; max-width: none; flex-basis: 100%; }
  .search input { width: 100%; }
  .hero-card { min-height: 190px; }
  .hero-card .hero-text { max-width: 100%; }
  .hero-card h2 { font-size: 24px; }
  table.list th:nth-child(n+4), table.list td:nth-child(n+4) { display: none; }
  .desc { max-width: none; }
}

/* game switch buttons (Explore banner) */
.game-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.switch-btn {
  font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 3px; border: 1px solid rgba(168, 230, 255, .5); background: rgba(3, 8, 14, .55); color: #e6f4ff;
}
.switch-btn:hover { text-decoration: none; background: rgba(92, 200, 255, .2); color: #fff; }
.switch-btn.active { background: linear-gradient(180deg, #a8e6ff, #5cc8ff); color: #02121d; border-color: #a8e6ff; box-shadow: 0 0 14px rgba(92, 200, 255, .35); }
.game-HaloReach .switch-btn.active { background: linear-gradient(180deg, #ffffff, #c3d2e0); border-color: #fff; box-shadow: 0 0 14px rgba(195, 210, 224, .35); }
.tile-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile-text span { white-space: nowrap; flex: none; }
.badge.good { border-color: var(--good); color: var(--good); }

/* Popularity rank badges and the Top 100 tabs */
.badge.rank { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-family: var(--display); }
a.badge.rank:hover { color: var(--accent-bright); text-decoration: none; border-color: var(--accent-bright); }
.tags .badge.rank { font-size: 12px; padding: 2px 7px; margin-right: 4px; }
.tabs { display: flex; gap: 18px; font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.tabs strong { color: var(--accent-bright); border-bottom: 2px solid var(--accent); }

/* entry page: title, tags and version box over the banner */
.banner.work-hero { height: auto; min-height: 230px; }
.banner.work-hero .banner-text { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 70px 22px 18px; }
.banner.work-hero .hero-main { min-width: 0; flex: 1 1 320px; }
.banner.work-hero h1 { margin: 6px 0 6px; }
.banner.work-hero .tags { margin: 0; }
.banner.work-hero .actions { background: rgba(4, 12, 22, .82); backdrop-filter: blur(4px); }
.banner.work-hero .crumbs { margin: 8px 0 0; }
/* the version dropdown sizes to its longest option: keep it inside the panel */
.actions { grid-template-columns: minmax(0, 1fr); }
.actions select { width: 100%; min-width: 0; text-overflow: ellipsis; }

/* sortable column headings */
th.sortable a { color: inherit; }
th.sortable a:hover { color: var(--accent-bright); text-decoration: none; }
th.sortable.active a { color: var(--accent-bright); }

/* home: classic combos under each game */
.hero-col { min-width: 0; }
.hero-col h2 { margin-top: 18px; }
.combo-list { margin: 0; padding-left: 22px; }
.combo-list li { margin: 3px 0; }

/* combos list */
.more-maps summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.more-maps ul { margin: 4px 0 2px; padding-left: 18px; font-size: 14px; }
button.small { padding: 4px 10px; font-size: 12px; }

/* entry banner: title + tags top-left, breadcrumb trail bottom-left, version box bottom-right */
.banner.work-hero .banner-text { align-items: stretch; padding: 20px 22px 18px; }
.banner.work-hero .hero-main { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.banner.work-hero h1 { margin: 0 0 8px; }
.banner.work-hero .crumbs { margin: 0; }
.banner.work-hero .actions { align-self: flex-end; }
/* rank badge and tags: same box so they line up at one height */
.tags .tag, .tags .badge.rank {
  display: inline-flex; align-items: center; box-sizing: border-box; height: 24px; margin: 2px 4px 2px 0;
  padding: 0 10px; font-family: var(--display); font-size: 12px; line-height: 1; letter-spacing: .08em; vertical-align: middle;
}
.banner.work-hero .banner-text { min-height: 230px; box-sizing: border-box; }
.banner.work-hero .hero-main { justify-content: flex-start; gap: 0; }
.banner.work-hero .hero-main .crumbs { margin-top: auto; padding-top: 14px; }

/* version box: buttons side by side */
.actions .buttons { flex-wrap: nowrap; }
.actions .buttons button { white-space: nowrap; }
.actions p.small { font-size: 13px; }
/* maps / game modes table: pick several */
th.pick, td.pick { width: 28px; text-align: center; padding-right: 0; }
td.pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.visit-list li { margin: 8px 0; }
details > summary { cursor: pointer; color: var(--accent); margin: 12px 0; }

/* header lines up with the page column, so the search box ends where the content ends */
.top { padding-left: max(18px, calc((100% - 1160px) / 2 + 16px)); padding-right: max(18px, calc((100% - 1160px) / 2 + 16px)); }

/* entry banner: height fits the version box, with the same padding top, bottom and right */
.banner.work-hero { min-height: 0; }
.banner.work-hero .banner-text { min-height: 0; padding: 18px; align-items: stretch; }
.banner.work-hero .actions { align-self: center; }
.banner.work-hero .hero-main { padding-left: 4px; }
/* a divider between title + tags and the breadcrumb trail */
.banner.work-hero .hero-main .crumbs { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.banner.work-hero h1 { margin: 0 0 6px; }
/* smaller tags under the title */
.banner.work-hero .tags { margin-bottom: 12px; }
.tags .tag, .tags .badge.rank { height: 20px; padding: 0 7px; font-size: 11px; letter-spacing: .06em; margin: 2px 3px 2px 0; }
/* partner table buttons */
.partner-pick .buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* animated background (public/bg.js): a fixed canvas under everything */
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, footer { position: relative; z-index: 1; }

/* readability over the animated background: the content column sits on a dark, semi-transparent backing
   (no backdrop blur: it would have to re-blur the animation every frame) */
main { background: rgba(3, 8, 14, .68); border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(0, 0, 0, .45); min-height: calc(100vh - 56px); }
@media (max-width: 1192px) { main { border-left: 0; border-right: 0; } }


/* confirmations: a toast in the top-right corner, visible wherever you are on the page */
.toast { position: fixed; top: 70px; right: max(18px, calc((100% - 1160px) / 2 + 16px)); z-index: 30; max-width: min(380px, calc(100% - 36px));
  background: rgba(6, 18, 30, .96); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 3px;
  padding: 10px 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5), 0 0 18px rgba(92, 200, 255, .15); cursor: pointer;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }

/* credit and "at a glance" side by side */
.credit-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.credit-row > section { margin: 0; }
.glance dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.glance dt { color: var(--muted); font-family: var(--display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.glance dd { margin: 0; }
@media (max-width: 800px) { .credit-row { grid-template-columns: 1fr; } }

/* entry banner: title flush with the banner's padding, a little lower, tags tucked under it */
.banner.work-hero .hero-main { padding-left: 0; padding-top: 6px; }
.banner.work-hero h1 { margin: 0 0 2px; }
.banner.work-hero .tags { margin-top: 0; }

/* credit + at a glance: both panels the same height (no dead space under the shorter one) */
.credit-row { align-items: stretch; }

/* easter egg: Covenant contact alert turns the whole display to condition red for a few seconds */
html.cov-alert body { --accent: #ff4d7a; --accent-bright: #ffa3b8; --accent-soft: rgba(255, 77, 122, .14);
  --line: rgba(255, 77, 122, .28); --line-strong: rgba(255, 77, 122, .55); }
html.cov-alert .top { box-shadow: 0 1px 0 rgba(255, 77, 122, .25), 0 8px 24px rgba(0, 0, 0, .35); }

/* maps / game modes table: keep "Title (Base map) combo #N" on one line; the evidence column wraps instead */
.partner-pick td.title-cell, .partner-pick td.title-cell > span { white-space: nowrap; }

/* easter egg: Flood outbreak, a sickly yellow-green and a glitching display */
html.flood-alert body { --accent: #c4d640; --accent-bright: #e6f27a; --accent-soft: rgba(196, 214, 64, .14);
  --line: rgba(196, 214, 64, .28); --line-strong: rgba(196, 214, 64, .55); }
html.flood-alert main { animation: flood-glitch 2.3s infinite; }
html.flood-alert h1, html.flood-alert h2 { text-shadow: 2px 0 rgba(196, 214, 64, .55), -2px 0 rgba(255, 60, 120, .35); }
@keyframes flood-glitch {
  0%, 6%, 9%, 40%, 43%, 72%, 75%, 100% { transform: none; filter: none; }
  7% { transform: translate(3px, 0) skewX(.8deg); filter: hue-rotate(25deg); }
  41% { transform: translate(-4px, 1px); filter: saturate(1.6); }
  73% { transform: translate(2px, -2px) skewX(-.6deg); }
}
@media (prefers-reduced-motion: reduce) { html.flood-alert main { animation: none; } }

/* the background's tracked contacts are clickable (they open that map or mode) */
html.bg-clickable body { cursor: pointer; }

/* background messages that must stay readable: above the content, below the header and notifications */
.bg-overlay { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }

/* collections: switcher bar, rename/delete, and the "Adding to" picker in the version box */
.collection-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.collection-bar select { min-width: 220px; }
.collection-manage { margin: -6px 0 14px; }
.collection-manage form { margin: 6px 0; }
.actions label.add-to { display: flex; flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 13px; }
.actions label.add-to select { width: auto; flex: 1; padding: 4px 8px; font-size: 13px; }

/* ---- collection page (reworked) */
.col-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin: 0 0 14px; }
.col-tab { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel); color: var(--text); font-family: var(--display); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.col-tab:hover { border-color: var(--line-strong); text-decoration: none; color: var(--accent-bright); }
.col-tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-bright); }
.col-tab .count { font-size: 11px; padding: 0 6px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.col-tab.add { color: var(--accent); border-style: dashed; list-style: none; }
.col-new summary::-webkit-details-marker { display: none; }
.col-new[open] summary { margin-bottom: 6px; }
.col-head { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.col-head h1 { margin: 0 0 4px; }
.col-head p { margin: 0 0 6px; }
.col-head > div:first-child { flex: 1 1 320px; min-width: 0; }   /* the text side gives way, so the actions panel stays on the right */
.col-head > .col-actions { flex: 0 0 auto; }
.col-actions { display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; padding: 12px 14px; min-width: 260px; }
.col-actions form { display: grid; gap: 6px; margin: 0; }
.col-actions label.small { font-size: 12px; color: var(--muted); }
a.btn { display: inline-block; text-align: center; padding: 7px 16px; border-radius: 3px; font-family: var(--display); font-size: 14px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; }
a.btn.secondary { background: var(--accent-soft); color: var(--accent-bright); border: 1px solid var(--line-strong); }
a.btn.secondary:hover { background: rgba(92, 200, 255, .22); text-decoration: none; }
.col-group { padding: 6px 16px 10px; }
.col-group h2 { margin: 10px 0 6px; }
.col-item { display: grid; grid-template-columns: auto minmax(180px, 1.3fr) minmax(0, 1fr) auto; gap: 6px 14px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--line); }
.col-item:first-of-type { border-top: 0; }
.col-title { font-weight: 600; }
.col-version { margin-top: 2px; }
.col-version select { max-width: 100%; font-size: 13px; padding: 3px 6px; }
.col-pairs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.col-pairs .tag { margin: 0; }
.chip-form { display: inline; margin: 0; }
button.chip-add { background: transparent; border: 1px dashed var(--line-strong); color: var(--accent); box-shadow: none; padding: 1px 8px;
  font-size: 11px; letter-spacing: .06em; }
button.chip-add:hover { background: var(--accent-soft); color: var(--accent-bright); }
.col-remove { margin: 0; }
button.icon-btn { background: transparent; border: 1px solid transparent; box-shadow: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 8px; }
button.icon-btn:hover { color: var(--bad); border-color: var(--bad-soft); background: var(--bad-soft); }
.col-empty { padding: 26px 20px; text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: 4px; }
.col-clear { margin-top: 10px; }
.muted.small, span.small { font-size: 12px; }
@media (max-width: 760px) {
  .col-item { grid-template-columns: auto 1fr auto; }
  .col-pairs { grid-column: 2 / -1; }
}

/* entry page: "Adding to" picker, with a name box for a new collection */
.actions .add-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.actions .add-to label { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--display); }
.actions .add-to select { width: auto; flex: 1; min-width: 0; padding: 4px 8px; font-size: 13px; }
.actions .new-collection-name { display: none; flex-basis: 100%; padding: 5px 8px; font-size: 13px; }
.actions .new-collection-name.show { display: block; }
.col-tabs { align-items: center; }
.col-new > summary.col-tab { margin: 0; }
.col-new[open] { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* collection page: actions panel centred against the header; "Plays with" on the left of a divider, the chips on its right */
.col-head { align-items: center; }
.col-pairs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 0; align-items: stretch; min-height: 28px; }
.col-pairs > .muted.small { white-space: nowrap; align-self: center; padding-right: 12px; }
.col-pairs .chips { display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 4px;
  border-left: 1px solid var(--line); padding-left: 12px; min-height: 28px; }
@media (max-width: 760px) { .col-pairs { border-top: 1px solid var(--line); padding-top: 6px; } }

/* "get it in-game" checklist */
.hosts-progress { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.hosts-progress .bar { flex: 1; max-width: 420px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; border: 1px solid var(--line); }
.hosts-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width .3s; }
.visit-list { padding-left: 22px; }
.visit { margin: 12px 0; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.visit-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.visit-head strong { font-family: var(--display); letter-spacing: .06em; font-size: 16px; }
.visit-items { list-style: none; margin: 0; padding: 0; }
.visit-items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.visit-items li:first-child { border-top: 0; }
.visit-items label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.visit-items input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.visit-items .tag { margin-left: 6px; }
.hosts-nowhere { margin: 12px 0; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 4px; }
.hosts-done { margin: 12px 0; }
.hosts-done ul { list-style: none; padding-left: 4px; color: var(--muted); }
.hosts-finished { font-family: var(--display); letter-spacing: .06em; color: var(--accent-bright); }

/* the content column runs unbroken from the header to the bottom of the page: the footer is part of it */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; min-height: 0; width: 100%; box-sizing: border-box; }
footer { width: 100%; box-sizing: border-box; margin: 0 auto; padding: 16px 16px 26px; background: rgba(3, 8, 14, .68);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-top: 0; }
footer::before { content: ""; display: block; border-top: 1px solid var(--line); margin: 0 0 14px; }
@media (max-width: 1192px) { footer { border-left: 0; border-right: 0; } }

/* file-share cards: the gamertag to look up is the centred title */
.visit-list { list-style: none; padding-left: 0; }
.visit-head { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; margin: 2px 0 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.visit-step { font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.visit-head .visit-gt { font-family: var(--display); font-size: 26px; letter-spacing: .06em; color: var(--accent-bright);
  text-shadow: 0 0 14px rgba(92, 200, 255, .25); word-break: break-word; }
.visit-sub { font-size: 13px; }

/* sharing */
.share-box { display: grid; gap: 6px; margin-top: 8px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.share-box input { width: min(270px, 100%); padding: 4px 8px; font-size: 13px; font-family: Consolas, "Cascadia Mono", monospace; }
.share-box form { margin: 0; }
.share-start { margin-top: 8px; }
.shared-label { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-family: var(--display); }
.copy-form { display: grid; gap: 6px; margin: 0; }
.copy-form select { font-size: 13px; padding: 5px 8px; }
.col-item.shared { grid-template-columns: auto 1fr; }
.flash-inline { background: var(--flash); border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: 3px; }
/* tag list: the count sits apart from the name, behind a divider */
.tag .tag-n { margin-left: 7px; padding-left: 7px; border-left: 1px solid var(--line-strong); color: var(--muted); font-variant-numeric: tabular-nums; }

/* sharing: listing on the Community page is a separate, explicit choice */
.share-start { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.share-list-opt { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.share-list-opt input { vertical-align: -2px; margin-right: 4px; }
.share-listing { margin: 0; font-size: 12px; }
.listed-badge { color: var(--good); }
.listed-badge::before { content: "● "; font-size: 10px; vertical-align: 1px; }

/* upvotes */
.vote-form { display: inline; margin: 0; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line-strong); box-shadow: none;
  color: var(--accent); padding: 3px 12px; font-size: 13px; letter-spacing: .06em; border-radius: 3px; font-family: var(--display); font-weight: 600; }
button.vote-btn:hover { background: var(--accent-soft); color: var(--accent-bright); }
.vote-btn.on { background: var(--accent-soft); color: var(--accent-bright); border-color: var(--accent); box-shadow: 0 0 10px rgba(92, 200, 255, .2); }
.vote-btn.own { color: var(--muted); border-color: var(--line); cursor: default; }

/* Community page */
.comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 12px; }
.comm-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.comm-card:hover { border-color: var(--line-strong); }
.comm-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); height: 92px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.comm-thumbs img { width: 100%; height: 100%; object-fit: cover; min-width: 0; }
.comm-thumbs .gt { width: 38px; height: 38px; place-self: center; color: var(--accent); opacity: .85; }
.comm-thumbs-empty { display: grid; place-items: center; color: var(--muted); font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.comm-body { padding: 10px 14px 4px; flex: 1; }
.comm-body h2 { margin: 0 0 2px; font-size: 16px; letter-spacing: .08em; overflow-wrap: anywhere; }
.comm-body p { margin: 2px 0; }
.comm-peek { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; }
.col-head .vote-btn, .col-head .vote-form { margin-top: 4px; }

/* work page: reporting a combo that doesn't work */
.report-combo { margin-top: 12px; }
.report-combo summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.report-combo summary:hover { color: var(--accent-bright); }
.report-combo form { display: grid; gap: 10px; max-width: 640px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(3, 8, 14, .4); }
.report-combo form p { margin: 0; }
.report-combo label { display: grid; gap: 4px; font-size: 13px; }
.report-combo select, .report-combo textarea { width: 100%; max-width: 100%; }
.report-combo button { justify-self: start; }

/* map / mode page hero: a bigger title, icon and tags, so they fill the banner instead of leaving it mostly empty */
.banner.work-hero h1 { font-size: 40px; line-height: 1.1; }
.banner.work-hero svg.gt.title-icon { width: 42px; height: 42px; margin-right: 14px; vertical-align: -6px; }
.banner.work-hero .tags .tag, .banner.work-hero .tags .badge.rank { height: 25px; padding: 0 10px; font-size: 13px; }
.banner.work-hero .crumbs { font-size: 14px; }
@media (max-width: 700px) {
  .banner.work-hero h1 { font-size: 28px; }
  .banner.work-hero svg.gt.title-icon { width: 30px; height: 30px; margin-right: 10px; vertical-align: -4px; }
}
/* phones: the hero's two buttons stack rather than running off the edge */
@media (max-width: 480px) { .actions .buttons { flex-wrap: wrap; } .actions .buttons button { flex: 1 1 100%; } }
/* the title, icon and tags sit centred between the top of the hero and the breadcrumb's divider: the spare height is
   split above the title and below the tags (plus 25px under the tags: the hero's 18px top padding and the tags' own bottom margin) */
.banner.work-hero .hero-main h1 { margin-top: auto; }
.banner.work-hero .hero-main .tags { margin-bottom: auto; padding-bottom: 25px; }
.banner.work-hero .hero-main .crumbs { margin-top: 0; }
@media (max-width: 700px) { .banner.work-hero .hero-main .tags { padding-bottom: 12px; } }

/* how many things wait for an admin, beside the Admin link */
.top nav .nav-count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; letter-spacing: 0; vertical-align: 1px; }
/* the owner's note when an admin took their collection off the Community page */
.unlisted-note { color: var(--bad); }
/* Admin: public site with approval off */
.public-warning { color: var(--bad); border: 1px solid var(--bad); background: var(--bad-soft); border-radius: 4px; padding: 8px 12px; }
