/* Outwitters Respawned, the public site at mobileleagues.com. Hand-written, no build step. */
@font-face { font-family: 'Dosis'; src: url('fonts/Dosis-Variable.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('fonts/SourceSans3.ttf') format('truetype'); font-weight: 200 900; font-display: swap; }

:root {
  --navy: #0b2a55; --navy-2: #113b78; --navy-3: #0a1f3f;
  --blue: #1f6fd0; --blue-2: #2b86ea;
  --orange: #ee6d1f; --orange-2: #ff9a3c; --orange-3: #d9540f; --rust: #8c2d05; --outline: #3a1203;
  --cream: #fff6e5; --cream-2: #f3e3c3; --ink: #2b1a0c; --muted: #6c5a48; --gold: #f7c531;
  --display: 'Dosis', 'Trebuchet MS', sans-serif;
  --body: 'Source Sans 3', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--navy); scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.5; color: #fff;
  background: radial-gradient(1400px 700px at 50% -250px, #2064bd 0%, var(--navy-2) 45%, var(--navy) 100%) fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='110' viewBox='0 0 96 110'%3E%3Cpath d='M48 2 94 28v54L48 108 2 82V28z' fill='none' stroke='%23ffffff' stroke-width='3'/%3E%3C/svg%3E");
  background-size: 96px 110px;
}
a { color: var(--orange-2); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.display, h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; letter-spacing: .3px; line-height: 1.1; margin: 0; }

/* Header */
.site-header { background: #0f3d80 url('img/hex_bg.png') center top / auto 100% repeat-x; border-bottom: 4px solid var(--navy-3); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; padding: 10px 0; flex-wrap: wrap; }
.brand img { display: block; height: 68px; width: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .6px; color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 10px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.nav a:hover { background: rgba(255, 255, 255, .12); }
.nav a.active { background: var(--orange); box-shadow: inset 0 -3px 0 var(--orange-3); }
.nav a.play { background: var(--orange); box-shadow: inset 0 -3px 0 var(--orange-3); }
.nav a.play:hover { background: var(--orange-2); }

/* Buttons */
.btn { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .6px; text-transform: uppercase; padding: 12px 28px; border-radius: 14px; border: 3px solid var(--outline); background: linear-gradient(var(--orange-2), var(--orange) 55%, var(--orange-3)); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); box-shadow: 0 5px 0 #6b1f03, 0 9px 18px rgba(0, 0, 0, .35); text-decoration: none; transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 #6b1f03, 0 6px 12px rgba(0, 0, 0, .35); }
.btn.blue { background: linear-gradient(#4f9df5, var(--blue) 55%, #155bb0); box-shadow: 0 5px 0 #0c3a78, 0 9px 18px rgba(0, 0, 0, .35); }
.btn.blue:hover { box-shadow: 0 3px 0 #0c3a78, 0 6px 12px rgba(0, 0, 0, .35); }
.btn.small { font-size: 17px; padding: 8px 18px; border-radius: 11px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 56px 0 36px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 64px); text-transform: uppercase; text-shadow: 0 4px 0 var(--navy-3), 0 8px 18px rgba(0, 0, 0, .45); }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead { font-size: 22px; line-height: 1.45; margin: 18px 0 26px; color: #e6eefc; }
.hero .art { position: relative; min-height: 360px; }
.hero .art .map { position: absolute; right: 0; top: 10px; width: 72%; border: 4px solid var(--outline); border-radius: 18px; box-shadow: 0 10px 0 var(--navy-3), 0 18px 32px rgba(0, 0, 0, .5); transform: rotate(4deg); }
.hero .art .crew { position: absolute; left: 0; bottom: -10px; width: 62%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; }
.stats div { font-family: var(--display); font-weight: 600; font-size: 18px; text-transform: uppercase; letter-spacing: .5px; color: #cfe0ff; }
.stats strong { display: block; font-size: 34px; font-weight: 800; color: #fff; line-height: 1; text-shadow: 0 3px 0 var(--navy-3); }

/* Sections and panels */
section.block { padding: 30px 0; }
.section-title { font-size: clamp(30px, 4vw, 42px); text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 3px 0 var(--navy-3), 0 6px 14px rgba(0, 0, 0, .4); margin-bottom: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section-title .sub { font-family: var(--body); font-weight: 400; font-size: 18px; text-transform: none; letter-spacing: 0; color: #cfe0ff; text-shadow: none; }
.panel { background: var(--cream); color: var(--ink); border: 3px solid var(--outline); border-radius: 18px; box-shadow: 0 7px 0 var(--rust), 0 14px 28px rgba(0, 0, 0, .35); padding: 28px 30px; }
.panel h2 { color: var(--rust); font-size: 32px; text-transform: uppercase; margin-bottom: 10px; }
.panel h3 { color: var(--rust); font-size: 24px; margin: 22px 0 8px; }
.panel p { margin: 0 0 12px; }
.panel a { color: #b8420a; }
.panel .btn { color: #fff; }
.panel .muted, .muted { color: var(--muted); }
.note { color: #cfe0ff; }
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature { background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 20px 22px; }
.feature h3 { font-size: 24px; color: var(--gold); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); margin-bottom: 6px; }
.feature p { margin: 0; color: #e6eefc; }

/* Races */
.race { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 16px; color: var(--ink); box-shadow: 0 4px 0 var(--rust); }
.race img { width: 56px; height: 56px; flex: none; image-rendering: auto; }
.race h3 { font-size: 24px; color: var(--rust); margin: 0 0 4px; }
.race p { margin: 0; font-size: 16px; line-height: 1.4; }

/* Units */
.unit { background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 18px; color: var(--ink); box-shadow: 0 4px 0 var(--rust); display: flex; flex-direction: column; gap: 10px; }
.unit .art { display: flex; justify-content: center; align-items: center; height: 150px; background: linear-gradient(#eaf3ff, #d6e7ff); border-radius: 12px; border: 2px solid #b8d0f3; }
.unit .art img { max-height: 140px; width: auto; }
.unit h3 { font-size: 26px; color: var(--rust); margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.unit .only { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: #fff; background: var(--blue); border-radius: 999px; padding: 3px 9px; }
.unit .pills { display: flex; gap: 8px; flex-wrap: wrap; }
.unit .pill { font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; background: var(--cream-2); border: 2px solid #d9c49a; border-radius: 999px; padding: 3px 10px; color: #5a3a12; }
.unit p { margin: 0; font-size: 16px; line-height: 1.45; }

/* Rules cards */
.rule { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; padding: 18px 0; border-top: 2px dashed #d9c49a; }
.rule:first-of-type { border-top: 0; }
.rule img { width: 140px; justify-self: center; }
.rule h3 { margin-top: 0; }
.rule p:last-child { margin-bottom: 0; }

/* Maps */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.map { text-align: center; }
.map img { width: 100%; aspect-ratio: 1 / .96; object-fit: cover; border: 3px solid var(--outline); border-radius: 14px; box-shadow: 0 4px 0 var(--navy-3), 0 8px 16px rgba(0, 0, 0, .35); background: #fff; }
.map span { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; margin-top: 8px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.map .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 1px 8px; margin-left: 6px; text-shadow: none; vertical-align: middle; }

/* Leagues */
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; text-align: center; }
.tier img { height: 96px; width: auto; }
.tier span { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--blue); }
.tier small { color: var(--muted); }
.ladder { margin-bottom: 26px; }
.ladder h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ladder h2 small { font-family: var(--body); font-weight: 400; font-size: 16px; text-transform: none; color: var(--muted); }
.tier-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-top: 2px dashed #d9c49a; }
.tier-row .name { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--blue); }
.tier-row .name img { height: 44px; width: auto; }
.divisions { display: flex; gap: 10px; flex-wrap: wrap; }
.division { display: inline-flex; flex-direction: column; gap: 2px; background: #fff; border: 2px solid var(--outline); border-radius: 12px; padding: 8px 14px; text-decoration: none; color: var(--ink); min-width: 190px; box-shadow: 0 3px 0 var(--rust); }
.division:hover { background: #fffdf7; transform: translateY(-1px); }
.division b { font-family: var(--display); font-weight: 800; font-size: 19px; }
.division small { color: var(--muted); }
.empty { padding: 12px 0; color: var(--muted); font-style: italic; }

/* Tables */
table.board { width: 100%; border-collapse: collapse; font-size: 17px; }
table.board th { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 15px; color: #fff; background: var(--blue); padding: 10px 12px; text-align: left; }
table.board th:first-child { border-radius: 10px 0 0 0; }
table.board th:last-child { border-radius: 0 10px 0 0; }
table.board td { padding: 9px 12px; border-bottom: 1px solid #e7d7b6; }
table.board tr:nth-child(even) td { background: rgba(255, 255, 255, .45); }
table.board td.rank { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--rust); width: 64px; }
table.board td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.board th.num { text-align: right; }
table.board tr.top td.rank { color: var(--orange); }

/* News */
.post { border-top: 2px dashed #d9c49a; padding: 18px 0; }
.post:first-child { border-top: 0; padding-top: 0; }
.post h3 { margin: 0 0 4px; font-size: 26px; }
.post h3 a { text-decoration: none; }
.post .meta { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.post-body { font-size: 18px; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--rust); margin: 18px 0 8px; text-transform: none; font-size: 24px; }
.post-body img { border-radius: 12px; }
.post-body pre { background: #fff; border: 2px solid #d9c49a; border-radius: 10px; padding: 12px; overflow: auto; }

/* Games and players */
.collections { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.collections a { font-family: var(--display); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: #fff; text-decoration: none; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 5px 14px; }
.collections a:hover { background: rgba(255, 255, 255, .22); }
.collections a.active { background: var(--orange); border-color: var(--outline); box-shadow: inset 0 -2px 0 var(--orange-3); }
form.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
form.filters input[type="text"], form.filters select { font: inherit; font-size: 16px; color: var(--ink); background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 7px 10px; min-width: 150px; }
form.filters .clear { color: #fff; margin-left: 4px; }
table.games td.map { width: 72px; padding-right: 0; }
table.games td.map img { width: 64px; min-width: 64px; height: 61px; object-fit: cover; border: 2px solid var(--outline); border-radius: 10px; background: #fff; display: block; }
table.games td.who .sides { font-size: 18px; line-height: 1.4; }
table.games td.who .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
table.games td.when, table.games td.ended { white-space: nowrap; font-size: 15px; color: var(--muted); }
table.games td.watch { text-align: right; }
.vs, .amp { color: var(--muted); font-size: 14px; text-transform: uppercase; margin: 0 4px; }
.seat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seat img { width: 22px; height: 22px; flex: none; }
.seat::before { flex: none; }
.seat::before, .dot { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--outline); background: #999; }
.seat.blue::before, .dot.blue { background: #2b86ea; }
.seat.red::before, .dot.red { background: #e0443a; }
.seat.green::before, .dot.green { background: #3fa34d; }
.seat.yellow::before, .dot.yellow { background: #f7c531; }
.seat.winner a, .seat.winner { font-weight: 700; }
.seat.winner::after { content: "\1F3C6"; font-size: 14px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { font-family: var(--display); font-weight: 700; font-size: 16px; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.pager a:hover { background: rgba(255, 255, 255, .22); }
.pager .current { background: var(--orange); }
.pager .disabled { opacity: .4; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; margin: 0; }
.facts dt { font-family: var(--display); font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 14px; letter-spacing: .5px; }
.facts dd { margin: 0; }
.replay-embed { aspect-ratio: 9 / 16; max-width: 420px; }
.replay-embed.placeholder { aspect-ratio: 4 / 3; max-width: 420px; background: #0f3d80; border: 3px solid var(--outline); border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.replay-embed img { width: 70%; height: auto; border-radius: 12px; }
.replay-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.panel.game .share { font: inherit; font-size: 14px; color: var(--muted); background: #fff; border: 2px solid #d9c49a; border-radius: 10px; padding: 8px 10px; min-width: 260px; }
.spawn { display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; font-size: 15px; white-space: nowrap; }
.spawn img { height: 28px; width: auto; }
.tier-icon { vertical-align: middle; height: 28px; width: auto; }
.bar { position: relative; height: 18px; background: var(--cream-2); border: 2px solid #d9c49a; border-radius: 999px; overflow: hidden; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--blue); }
.bar.race-1 i { background: #4a7bd0; } .bar.race-2 i { background: #e86ea0; } .bar.race-3 i { background: #3fa34d; } .bar.race-4 i { background: #8bbb33; }
.bar b { position: absolute; inset: 0; font-size: 12px; line-height: 14px; text-align: center; color: var(--ink); font-family: var(--display); }
.detail { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.bar-cell { white-space: nowrap; }
.bar-cell .bar { display: inline-block; vertical-align: middle; }
@media (max-width: 860px) {
  table.games td.ended, table.games th:nth-child(4), table.games td:nth-child(6), table.games th:nth-child(6) { display: none; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { margin-top: 8px; }
}

/* Statistics */
form.filters label.min { color: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
form.filters label.min input { width: 64px; min-width: 0; font: inherit; color: var(--ink); background: var(--cream); border: 2px solid var(--outline); border-radius: 10px; padding: 6px 8px; }
.big-stat { font-size: 20px; line-height: 1.35; margin: 4px 0 10px; }
.big-stat strong { font-family: var(--display); font-weight: 800; font-size: 48px; color: var(--rust); display: block; line-height: 1; }
table.board tr.sparse td { color: #9a8c78; }
table.board tr.sparse .bar i { opacity: .35; }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: left; white-space: nowrap; }
table.matrix td { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.1; }
table.matrix td small { display: block; font-family: var(--body); font-weight: 400; font-size: 11px; color: var(--muted); }
table.matrix td.heat-0 { background: #f3c1b4; } table.matrix td.heat-1 { background: #f8dfd5; }
table.matrix td.heat-2 { background: #f6efdf; } table.matrix td.heat-3 { background: #d9eccb; } table.matrix td.heat-4 { background: #b9dfa6; }
table.matrix td.sparse { color: #9a8c78; background: transparent; font-weight: 400; }
.hist { display: flex; gap: 10px; align-items: flex-end; height: 150px; padding: 0 4px; border-bottom: 2px solid #d9c49a; }
.hist .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.hist .col i { display: block; width: 100%; background: var(--blue); border-radius: 6px 6px 0 0; min-height: 2px; }
.hist .col b { font-family: var(--display); font-size: 14px; margin-bottom: 2px; }
.hist .col span { position: absolute; bottom: -22px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.hist + .muted { margin-top: 26px; }
.unit-share { display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; align-items: center; margin-bottom: 8px; font-size: 15px; }
.unit-share img { grid-row: span 2; height: 26px; width: auto; }
.tier-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.tier-row .name { font-family: var(--display); font-weight: 700; color: var(--blue); display: flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .tier-row { grid-template-columns: 110px 1fr; } }

/* Footer */
.site-footer { margin-top: 50px; padding: 28px 0 40px; border-top: 2px solid rgba(255, 255, 255, .15); color: #b9cdf0; font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #fff; }

@media (max-width: 860px) {
  /* A wide table scrolls inside its panel; the page itself never widens. */
  .panel { overflow-x: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero .art { min-height: 300px; }
  .grid.cols-3, .grid.cols-4, .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .tier-row { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .bar { min-width: 72px; }
  .bar-cell { min-width: 90px; }
  .detail, .race-name { display: none; }
  /* The map thumbnail has no room on a phone; the map name under the players still says which map. */
  table.games td.map, table.games th:first-child { display: none; }
  table.matrix td { font-size: 14px; padding: 6px 4px; }
  table.matrix td small { font-size: 10px; }
  table.board th { font-size: 13px; letter-spacing: .3px; }
  .grid.cols-3, .grid.cols-4, .grid.cols-2 { grid-template-columns: 1fr; }
  .panel { padding: 20px 18px; }
  .brand img { height: 52px; }
  .nav a { font-size: 17px; padding: 6px 10px; }
  table.board { font-size: 15px; }
  table.board td, table.board th { padding: 7px 8px; }
}
