/* Colours. Every colour on the site is one of these; the dark set follows the browser or system setting. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #14161a;
  --muted: #4d535e;
  --border: #d5d8de;
  --link: #1a4fb8;
  --pill: #14161a;
  --pill-text: #ffffff;
  --code: #e8eaef;
  --frame: #c9cdd4;
  --syn-comment: #555b66;
  --syn-string: #1b6335;
  --syn-keyword: #7d2a99;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --surface: #171a20;
    --text: #eceef2;
    --muted: #a9afba;
    --border: #2c313a;
    --link: #8ab4ff;
    --pill: #ffffff;
    --pill-text: #0e1014;
    --code: #20242c;
    --frame: #2c313a;
    --syn-comment: #a1a8b3;
    --syn-string: #8fd6a0;
    --syn-keyword: #d6a3f0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header and footer */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.masthead { border-bottom: 1px solid var(--border); }
.masthead .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 24px; padding-top: 14px; padding-bottom: 14px;
}
.site-name { color: var(--text); font-size: 20px; font-weight: 800; text-decoration: none; padding: 10px 0; display: flex; align-items: center; gap: 10px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.masthead nav a { color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; padding: 10px 0; }
.masthead nav a:hover { color: var(--text); }
.masthead nav a[aria-current] {
  color: var(--text); font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
footer .wrap { padding-top: 24px; padding-bottom: 32px; }

/* Page text */
main { max-width: 820px; margin: 0 auto; padding: 48px 20px 72px; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; }
h1 { margin: 0 0 28px; font-size: clamp(34px, 6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
h2 { margin: 48px 0 12px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 28px; }
h1 + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
h3 { margin: 36px 0 10px; font-size: 22px; font-weight: 700; }
h4 { margin: 28px 0 8px; font-size: 18px; font-weight: 700; }
p, ul, ol, table, pre, blockquote { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li > ul, li > ol { margin-bottom: 0; }
a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
blockquote { padding-left: 16px; border-left: 3px solid var(--border); color: var(--muted); }

/* Screenshots are dark game scenes or pale theme screens; the border keeps their edge on either page colour. */
img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--frame); border-radius: 12px;
}
p > img { margin: 24px 0; }

/* Tables */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); font-size: 16px; text-align: left;
}
th, td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--code); }
th:first-child { border-top-left-radius: 11px; }
th:last-child { border-top-right-radius: 11px; }
tbody tr:last-child td { border-bottom: 0; }
td img { min-width: 220px; border-radius: 8px; }
/* On a phone, a wide table scrolls on its own instead of widening the page. */
@media (max-width: 600px) {
  table { display: block; overflow-x: auto; }
}

/* Code */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
code { font-size: 0.88em; background: var(--code); padding: 2px 6px; border-radius: 5px; }
/* Long paths and commands wrap, in running text and in table cells, instead of widening the page. */
code { overflow-wrap: anywhere; }
pre {
  padding: 16px 18px; overflow-x: auto;
  background: var(--code); border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; line-height: 1.6;
}
pre code { font-size: inherit; background: none; padding: 0; border-radius: 0; }
div.highlighter-rouge { margin: 0 0 16px; }
div.highlighter-rouge pre { margin: 0; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp, .highlight .cs { color: var(--syn-comment); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sx { color: var(--syn-string); }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt, .highlight .nb, .highlight .na { color: var(--syn-keyword); }
.highlight .nt, .highlight .nv { color: var(--link); }

/* Home page */
main.wide { max-width: 1120px; padding-top: 0; }
.wide h2 { margin-top: 72px; padding-top: 0; border-top: 0; font-size: 30px; }
.wide > p { max-width: 780px; }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; padding: 56px 0 0; }
.hero > div { min-width: 0; flex: 1 1 320px; }
.hero > div + div { flex: 1.3 1 340px; }
.hero h1 { margin-bottom: 16px; font-size: clamp(36px, 6vw, 54px); line-height: 1.05; }
.hero p { color: var(--muted); }
.hero strong { color: var(--text); }
.pitch { display: block; margin-bottom: 12px; color: var(--text); font-size: 21px; line-height: 1.4; font-weight: 600; }
.hero p > img, .feature p > img { margin: 0; }
.hero p:has(img), .feature p:has(img) { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.button {
  padding: 11px 26px; border: 2px solid var(--pill); border-radius: 999px;
  background: var(--pill); color: var(--pill-text); font-weight: 700; text-decoration: none;
}
.button.outline { background: none; border-color: var(--text); color: var(--text); }
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 48px; margin-top: 56px; }
/* The hero is the first div in main, so the first and third features are the even ones: picture on the left. */
.feature:nth-of-type(even) { flex-direction: row-reverse; }
.wide h2 + .feature { margin-top: 28px; }
.feature > div { min-width: 0; flex: 1 1 300px; }
.feature > div + div { flex: 1.2 1 320px; }
.feature p { margin: 0; color: var(--muted); }
.feature strong { color: var(--text); }
.feature p > strong:first-child { display: block; margin-bottom: 10px; font-size: 22px; line-height: 1.25; }
.feature + p { margin-top: 56px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 28px 24px; margin-top: 28px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 10px; }
.gallery figcaption { margin-top: 10px; font-size: 15px; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; margin-top: 72px; }
.card { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card h2 { margin-top: 0; font-size: 24px; }
.card > :last-child { margin-bottom: 0; color: var(--muted); }
