/* Mark Steere Games - site style, October 2026 */

:root {
  --black: #000000;
  --white: #ffffff;
  --red: #ff3f3f;          /* the red of the logo lettering */
  --red-text: #d21f1f;     /* the same red, darkened enough for small text */
  --text: #222222;
  --muted: #5a5a5a;
  --line: #e2e2e2;
  --band: #f5f5f5;
  --serif: Georgia, Gelasio, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-variant-ligatures: no-contextual;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: bold;
  color: var(--black);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
h3 { font-size: 22px; }

p { margin: 0 0 1em; }

a { color: var(--black); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-text); }
a:focus-visible, .btn:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--black); color: var(--white); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- the board edge: a strip of checker squares ---------- */
.board-edge {
  height: 16px;
  background: conic-gradient(var(--white) 25%, var(--black) 0 50%, var(--white) 0 75%, var(--black) 0) 0 0 / 32px 32px;
}

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
  margin-right: auto;
}
.brand img { display: block; width: 48px; height: 48px; border: 1px solid var(--black); }
.brand span { font-family: var(--serif); font-weight: bold; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.brand:hover { color: var(--black); }

.menu { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--black);
  border-radius: 3px;
  background: var(--white);
  color: var(--black);
  font: 700 15px/1.2 var(--sans);
  cursor: pointer;
}
.menu-toggle::before {
  content: "";
  width: 16px;
  height: 12px;
  background: linear-gradient(var(--black) 0 2px, transparent 2px 5px, var(--black) 5px 7px, transparent 7px 10px, var(--black) 10px 12px);
}
.site-header.open .menu-toggle { background: var(--black); color: var(--white); }
.site-header.open .menu-toggle::before { background: linear-gradient(var(--white) 0 2px, transparent 2px 5px, var(--white) 5px 7px, transparent 7px 10px, var(--white) 10px 12px); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--black);
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--black); border-bottom-color: var(--red); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid var(--black);
  border-radius: 3px;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--red-text); border-color: var(--red-text); color: var(--white); }
.btn-outline { background: var(--white); color: var(--black); }
.btn-outline:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn-red { background: var(--red); border-color: var(--red); color: var(--black); }
.btn-red:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn-small { padding: 7px 14px; font-size: 15px; }

.chat { white-space: nowrap; }

/* ---------- sections ---------- */
main { display: block; }
.section { padding: 56px 0; }
.section + .section { border-top: 3px solid var(--red); }
.section-band { background: var(--band); }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

/* ---------- home: hero ---------- */
.hero { padding: 48px 0 56px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.logo-frame {
  margin: 0;
  padding: 7px;
  border: 4px double var(--black);
  background: var(--white);
}
.logo-frame img { display: block; width: 100%; height: auto; }
.tagline {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--black);
}
.hero h1 { margin-top: 6px; }
.claims { list-style: none; margin: 0 0 32px; padding: 0; }
.claims > li {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
  color: var(--black);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.claims > li:first-child { border-top: 1px solid var(--line); }
.claims ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.claims ul li { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 18px; color: var(--text); }
.claims svg { flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-text { max-width: 640px; }

/* ---------- home: online apps ---------- */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--black); border-left: 1px solid var(--black); }
.apps > li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 18px;
  align-items: center;
  padding: 20px;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background: var(--white);
}
.apps img { grid-row: span 2; width: 76px; height: 76px; border-radius: 16px; display: block; }
.apps h3 { margin: 0; font-size: 19px; letter-spacing: 0.02em; }
.apps h3 a { text-decoration: none; }
.apps .links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }

/* ---------- home: where to play ---------- */
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.site-list h3 { font-size: 26px; margin-bottom: 4px; }
.site-list h3 a { text-decoration-thickness: 3px; }
.site-list .note { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.names { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.names li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line); }
.names a { font-family: var(--serif); font-weight: bold; font-size: 16px; letter-spacing: 0.03em; text-decoration: none; }
.names a:hover { text-decoration: underline; text-decoration-color: var(--red); }

/* ---------- statements (programmers, designers) ---------- */
.statements { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.statement { border: 1px solid var(--black); padding: 28px 30px 12px; background: var(--white); }
.statement h2 { font-size: 28px; }
.please { font-style: italic; margin-bottom: 4px; }
.statement ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.statement li { margin: 2px 0; }
.strong-red { color: var(--red-text); font-weight: 700; }

/* ---------- contents list and photos on the home page ---------- */
.contents-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: start; }
.contents-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; border-top: 1px solid var(--black); }
.contents-list li { border-bottom: 1px solid var(--line); }
.contents-list a { display: block; padding: 14px 4px; font-family: var(--serif); font-weight: bold; font-size: 19px; text-decoration: none; }
.contents-list a:hover { color: var(--red-text); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photos a { display: block; border: 1px solid var(--black); line-height: 0; }
.photos img { display: block; width: 100%; height: auto; }

/* ---------- page title (inner pages) ---------- */
.page-title { padding: 44px 0 28px; }
.page-title p { font-size: 20px; color: var(--muted); max-width: 760px; margin: 0; }

/* ---------- inner pages ---------- */
.page-title { padding: 44px 0 6px; }
.page-title h1 { margin-bottom: 0.25em; }
.page-title p { font-size: 20px; color: var(--muted); max-width: 760px; }
.page-body { padding: 18px 0 72px; }
.wrap-narrow { max-width: 860px; }

/* game index */
.finder { display: none; flex-wrap: wrap; align-items: flex-end; gap: 10px 20px; margin: 10px 0 20px; }
.js .finder { display: flex; }
.finder label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--black); }
.finder input {
  width: min(440px, 100%);
  padding: 11px 14px;
  border: 2px solid var(--black);
  border-radius: 3px;
  font: 17px/1.3 var(--sans);
  color: var(--black);
  background: var(--white);
}
.finder .count { color: var(--muted); font-size: 15px; margin: 0; padding-bottom: 13px; }
.cat-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--black);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--black);
}
.cat-links a span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.cat-links a:hover { background: var(--black); color: var(--white); }
.cat-links a:hover span { color: #cfcfcf; }
.game-cat { padding-top: 40px; scroll-margin-top: 8px; }
.game-cat h2 { margin: 0; padding-bottom: 10px; border-bottom: 3px solid var(--red); }
.game-cat h2 .n { margin-left: 8px; font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.game-cat .cat-sub { margin: 10px 0 0; color: var(--muted); }
.games { width: 100%; border-collapse: collapse; }
.games th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 16px 6px 0; border-bottom: 1px solid var(--black); }
.games td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.games td.game { width: 17rem; }
.games td.game { font-family: var(--serif); font-weight: bold; font-size: 17px; letter-spacing: 0.03em; color: var(--black); }
.games td.game a { text-decoration: none; }
.games td.game a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.games td.year { width: 4.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.games td.desc strong { color: var(--black); }
.games td.desc a { font-weight: 600; }
.play-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border: 1px solid var(--red-text);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--red-text);
  text-decoration: none;
  vertical-align: 2px;
}
.games td.desc a.play-tag { font-weight: 700; }
.play-tag:hover { background: var(--red-text); color: var(--white); }
.no-results { padding: 28px 0 0; font-size: 18px; }

/* online apps and app downloads */
.app-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--black); }
.app-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 220px;
  gap: 10px 32px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--black);
  scroll-margin-top: 12px;
}
.app-item > img { width: 112px; height: 112px; border-radius: 24px; display: block; }
.app-item h2 { font-size: 26px; letter-spacing: 0.02em; margin: 4px 0 10px; }
.app-item p { max-width: 68ch; }
.app-item .meta { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.app-actions { display: flex; flex-direction: column; gap: 10px; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.note { border-left: 4px solid var(--red); background: var(--band); padding: 18px 22px 6px; }
.note h2 { font-size: 21px; margin-bottom: 8px; }

/* game sites */
.site-entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--black); }
.site-entry { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 6px 40px; padding: 28px 0 22px; border-bottom: 1px solid var(--line); }
.site-entry h2 { font-size: 22px; letter-spacing: 0.02em; margin: 2px 0 0; }
.site-entry h2 a { text-decoration-thickness: 2px; }
.site-entry .about strong { color: var(--black); }
.site-entry .about p { max-width: 72ch; }
.site-entry code { font-size: 15px; background: var(--band); padding: 2px 6px; }
.msg-games { font-size: 14px; font-weight: 700; color: var(--muted); margin: 4px 0 8px; }
.chips { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li > a, .chips li > span {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  font-family: var(--serif);
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--black);
  background: var(--white);
}
.chips li > span { border-color: transparent; font-family: var(--sans); font-weight: 400; color: var(--muted); }
.chips li > a:hover { border-color: var(--black); color: var(--black); }

/* not my games */
.intro { font-size: 18px; max-width: 760px; }
.plain { border-collapse: collapse; width: 100%; max-width: 760px; margin-top: 8px; }
.plain th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 16px 6px 0; border-bottom: 1px solid var(--black); }
.plain td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.plain td:first-child { width: 42%; font-family: var(--serif); font-weight: bold; letter-spacing: 0.03em; color: var(--black); }

/* essay (design perspective) */
.essay-head { padding: 44px 0 0; }
.essay-head h1 { margin-bottom: 0.2em; }
.essay-head .subtitle { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); color: var(--black); margin-bottom: 10px; }
.essay-head .byline { color: var(--muted); margin-bottom: 0; }
.epigraph { margin: 30px 0 0; padding: 2px 0 2px 22px; border-left: 4px solid var(--red); }
.epigraph p { font-family: var(--serif); font-size: 22px; font-style: italic; line-height: 1.45; color: var(--black); margin-bottom: 8px; }
.epigraph .attribution { font-family: var(--sans); font-size: 16px; font-style: normal; color: var(--muted); }
.toc { margin: 32px 0 0; padding: 16px 0 10px; border-top: 1px solid var(--black); border-bottom: 1px solid var(--black); }
.toc h2 { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { padding: 3px 0; break-inside: avoid; }
.essay { font-family: var(--serif); font-size: 19px; line-height: 1.7; color: #1a1a1a; }
.essay h2 { font-size: 28px; margin: 52px 0 16px; scroll-margin-top: 12px; }
.essay blockquote { margin: 0 0 1.4em; padding: 2px 0 2px 22px; border-left: 3px solid #cfcfcf; color: #333; }
.essay blockquote p:last-child { margin-bottom: 0; }
.author-photo { float: right; width: 260px; margin: 8px 0 24px 36px; }
.author-photo img { display: block; width: 100%; height: auto; border: 1px solid var(--black); }
.author-photo figcaption { font-family: var(--sans); font-size: 15px; color: var(--muted); margin-top: 8px; text-align: center; }
.essay .signoff { margin-top: 40px; font-family: var(--sans); font-size: 15px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--black); color: #e9e9e9; font-size: 15px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 36px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: var(--white); font-size: 19px; margin-bottom: 10px; }
.site-footer a { color: var(--white); text-decoration-color: var(--red); }
.site-footer a:hover { color: var(--red); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #333; padding-top: 18px; color: #bdbdbd; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero .wrap { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
  .app-item { grid-template-columns: 96px minmax(0, 1fr); }
  .app-item > img { width: 96px; height: 96px; border-radius: 20px; }
  .app-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
  .site-entry { grid-template-columns: 220px minmax(0, 1fr); gap: 6px 28px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents-wrap { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .site-header .wrap { gap: 0 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand span { font-size: 19px; }
  .brand img { width: 40px; height: 40px; }
  .js .menu-toggle { display: inline-flex; }
  .menu { width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 8px; }
  .js .menu { display: none; }
  .js .site-header.open .menu { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--red-text); }
  .chat { margin-top: 14px; align-self: flex-start; }
  .names { column-gap: 16px; }
  .names a { font-size: 14px; letter-spacing: 0.02em; }
  .hero { padding-top: 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-logo { max-width: 320px; margin: 0 auto; width: 100%; }
  .claims > li { font-size: 22px; }
  .section { padding: 40px 0; }
  .apps { grid-template-columns: 1fr; }
  .apps > li { padding: 16px; grid-template-columns: 64px minmax(0, 1fr); }
  .apps img { width: 64px; height: 64px; border-radius: 14px; }
  .sites, .statements { grid-template-columns: 1fr; gap: 32px; }
  .statement { padding: 22px 20px 8px; }
  .contents-wrap { grid-template-columns: 1fr; }
  .contents-list { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 24px; }
  .page-title { padding-top: 30px; }
  .page-title p { font-size: 18px; }
  .games, .games tbody, .games tr, .games td { display: block; width: auto; }
  .games thead { display: none; }
  .games tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .games tr[hidden] { display: none; }
  .games td { padding: 0; border: 0; }
  .games td.game, .games td.year { display: inline; width: auto; }
  .games td.year { margin-left: 8px; font-size: 15px; }
  .games td.desc { margin-top: 4px; }
  .app-item { grid-template-columns: 72px minmax(0, 1fr); gap: 6px 16px; padding: 24px 0; }
  .app-item > img { width: 72px; height: 72px; border-radius: 16px; }
  .app-item h2 { font-size: 22px; margin-top: 0; }
  .app-item .app-text { grid-column: 1 / -1; }
  .app-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .site-entry { grid-template-columns: 1fr; gap: 6px; }
  .toc ul { columns: 1; }
  .essay { font-size: 18px; }
  .author-photo { float: none; width: 220px; margin: 0 auto 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .board-edge, .site-nav, .chat, .skip { display: none; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
}
