/* modern.css: the GameSmith redesign look (Lucida Grande, blue #0b5aa6 brand, red #c41e1e
   links, dotted dividers, Aqua pill buttons, rounded cards). Loaded with
   media="only screen", which browsers older than media queries never apply, so it may use
   anything current browsers support. It overrides legacy.css. */
:root {
  --blue: #0b5aa6; --blue-dark: #073e73; --red: #c41e1e;
  --ink: #1a1a1a; --muted: #595959; --rule: #c8c8c8; --soft-rule: #e3e3e3;
  --tile: #f3f5f8; --tile-border: #d6dce4; --card-border: #c9d3df;
}
* { box-sizing: border-box; }
body { margin: 0; background: #ffffff; color: var(--ink); font-size: 15px; line-height: 1.55;
  font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

/* top bar */
.topbar { border-bottom: 1px dotted #8a8a8a; margin: 0; padding: 0; }
.topbar .inner { max-width: 760px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { font-size: 22px; color: var(--blue); }
.nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.nav a { color: var(--red); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a.here { font-weight: bold; }
.sep { display: none; }

/* page */
.main { max-width: 760px; margin: 0 auto; padding: 40px 24px 40px; display: flex; flex-direction: column; gap: 28px; }
.main > * { margin: 0; }
.head { display: flex; flex-direction: column; gap: 10px; }
.head > * { margin: 0; }
.eyebrow { font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
h1 { font-size: 34px; line-height: 1.2; margin: 0; }
h2 { font-size: 22px; line-height: 1.3; margin: 0; }
.lead { color: #333333; }
.muted { color: var(--muted); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; width: 100%; }

/* stat tiles (a table for old browsers) */
table.stats, table.stats tbody, table.stats tr { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
table.stats td { flex: 1 1 140px; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--tile); border: 1px solid var(--tile-border); border-radius: 10px; }
.stat { font-size: 26px; font-weight: bold; line-height: 1.2; color: var(--ink); }
.label { font-size: 12px; color: var(--muted); }

/* game list */
ul.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; }
ul.games a { color: var(--red); text-decoration: none; }
ul.games a:hover { text-decoration: underline; }
ul.games .count { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* pill button (Aqua) */
.button, input[type=submit] { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 1px solid #083f7a; border-radius: 22px;
  background: linear-gradient(180deg, #2a74c4 0%, #0f5cb0 49%, #0a4f99 50%, #0b5ab0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 3px rgba(0,0,0,.3);
  color: #fff; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; }
.button:hover, input[type=submit]:hover { color: #fff; filter: brightness(1.08); }

/* leaderboard */
.scroll { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 14px; }
table.rank th { padding: 10px 10px; border-bottom: 1px solid var(--rule); font-size: 12px; text-align: right; white-space: nowrap; }
table.rank th a { color: var(--muted); text-decoration: none; }
table.rank th a:hover, table.rank th.sorted a { color: var(--ink); }
table.rank th.sorted a::after { content: " \25BE"; }
table.rank th.l { text-align: left; }
table.rank td { background: none; padding: 10px 10px; border-bottom: 1px solid var(--soft-rule); text-align: right; white-space: nowrap; }
table.rank tr:hover td { background: #f7f9fc; }
table.rank td.n { background: none; font-weight: normal; color: var(--muted); width: 1%; }
table.rank td.name { text-align: left; font-weight: bold; }
table.rank td.name a { text-decoration: none; }
table.rank td.name a:hover { text-decoration: underline; }
table.rank td.pts { font-weight: bold; }
table.rank td.r { background: none; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px;
  padding: 0 6px; border-radius: 14px; background: var(--tile); border: 1px solid var(--tile-border);
  font-weight: bold; font-size: 13px; }
.badge.top { background: var(--blue); border-color: var(--blue); color: #fff; }
.badge.nr { color: var(--muted); font-weight: normal; }

/* player page */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; border: 1px solid #b9b9b9; border-radius: 999px; padding: 4px 12px; color: #333; }
.note { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--card-border);
  border-radius: 8px; background: #eef2f7; overflow-wrap: anywhere; }

/* report form */
form table { border-collapse: collapse; width: 100%; }
form td { padding: 6px 0; vertical-align: top; }
form td.l { width: 190px; padding-top: 14px; font-weight: bold; font-size: 14px; }
input[type=text], select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #9aa7b6;
  border-radius: 6px; background: #fff; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }

/* footer */
.foot { margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--soft-rule); font-size: 12px; color: var(--muted); text-align: center; }

/* phones: header stacks, leaderboard rows become cards */
@media (max-width: 640px) {
  .main { padding: 28px 16px; }
  h1 { font-size: 28px; }
  form td.l { width: auto; display: block; padding: 8px 0 0; }
  form td { display: block; }
  table.rank thead { display: none; }
  table.rank, table.rank tbody, table.rank tr, table.rank td { display: block; width: 100%; }
  table.rank tr.head-row { display: none; }
  table.rank tr { border: 1px solid var(--card-border); border-radius: 10px; margin: 0 0 10px; padding: 8px 14px; }
  table.rank td { border: 0; padding: 3px 0; text-align: left; display: flex; justify-content: space-between; gap: 12px; }
  table.rank td::before { content: attr(data-label); color: var(--muted); font-weight: normal; }
  table.rank td.n, table.rank td.name { display: inline-flex; width: auto; font-size: 16px; }
  table.rank td.n::before, table.rank td.name::before { content: none; }
  table.rank td.n { padding-right: 8px; }
}

/* ---- site pages (gamesmith.biz home and update; site/public) ---- */
.page { max-width: 760px; margin: 0 auto; padding: 56px 24px 40px; display: flex; flex-direction: column; gap: 32px; }
.page > * { margin: 0; }
/* hero: a two-cell table for old browsers, a wrapping row here */
table.hero, table.hero tbody, table.hero tr { display: flex; flex-wrap: wrap; gap: 32px; width: 100%; }
table.hero td { padding: 0; vertical-align: top; }
table.hero td.intro { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
table.hero td.intro > * { margin: 0; }
table.hero td.side { flex: 1 1 240px; min-width: 0; border-left: 1px dotted #8a8a8a; padding-left: 28px; display: flex; flex-direction: column; gap: 14px; }
table.hero td.side > * { margin: 0; }
.wordmark { display: flex; align-items: center; gap: 16px; }
.wordmark img { flex: none; width: 72px; height: 72px; border-radius: 12px; }
.wordmark h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -0.5px; color: var(--blue); }
.tagline { font-size: 22px; line-height: 1.3; font-weight: bold; }
.side-title { font-size: 17px; font-weight: bold; line-height: 1.35; }
ul.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.links a { color: var(--red); text-decoration: none; }
ul.links a:hover { text-decoration: underline; }
/* screenshots */
table.shots, table.shots tbody, table.shots tr { display: flex; flex-wrap: wrap; gap: 24px; width: 100%; }
table.shots td { flex: 1 1 260px; min-width: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
table.shots img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top;
  border: 1px solid var(--card-border); border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.caption { font-size: 13px; color: var(--muted); text-align: center; }
.centered { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.centered > * { margin: 0; }
ul.platforms { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; justify-content: center; }
ul.platforms li { font-size: 12px; border: 1px solid #b9b9b9; border-radius: 999px; padding: 4px 12px; color: #333; }
/* update page */
.warn { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid #e3a3a3; border-radius: 8px; background: #fdf2f2; color: #7a1414; }
.warn > * { margin: 0; }
.warn .icon { flex: none; font-weight: bold; }
ol.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
ol.steps li { display: flex; align-items: flex-start; gap: 16px; }
ol.steps .num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: bold;
  display: flex; align-items: center; justify-content: center; }
ol.steps .body { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
ol.steps .body > * { margin: 0; }
code { font-family: Menlo, Monaco, "Courier New", monospace; font-size: 13px; background: var(--tile); border: 1px solid var(--tile-border); border-radius: 4px; padding: 1px 5px; }
table.cards, table.cards tbody, table.cards tr { display: flex; flex-wrap: wrap; gap: 20px; width: 100%; }
table.cards td.card { flex: 1 1 300px; min-width: 0; padding: 0; border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
table.cards td.card-red { border-color: #e0c4c4; }
.card h3 { margin: 0; padding: 10px 16px; background: var(--blue); color: #fff; font-size: 15px; }
.card-red h3 { background: var(--red); }
.card .inner { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card .inner > * { margin: 0; }
.pathrow { display: flex; align-items: stretch; gap: 8px; }
.pathrow code { flex: 1 1 auto; min-width: 0; display: block; line-height: 1.5; border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; }
.pathrow button { flex: none; min-width: 72px; min-height: 44px; padding: 0 12px; border: 1px solid #9aa7b6; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.alert { font-size: 13px; color: #7a1414; }
@media (max-width: 640px) {
  .page { padding: 32px 16px; }
  table.hero td.side { border-left: 0; padding-left: 0; border-top: 1px dotted #8a8a8a; padding-top: 20px; }
  .wordmark h1 { font-size: 34px; }
}
