/* One stylesheet for the whole site.

   The game's own field colour (#beb8ce) is the family resemblance, but it is
   an accent rather than a flood: a full-strength 2013 field behind body text
   goes muddy, and the support pages have to stay legible above everything
   else. So the page is a pale wash of that hue, the cards are white, and the
   field colour appears at the edges — the masthead rule, a panel's border,
   a status pill. */
:root {
  color-scheme: light;
  --field: #beb8ce;
  --bg: #f2f0f6;
  --card: #ffffff;
  --ink: #17151d;
  --quiet: #5f5a6b;
  --rule: #e2ddeb;
  --link: #443878;
  --shadow: 0 1px 2px rgba(30, 24, 48, .05), 0 8px 24px -8px rgba(30, 24, 48, .14);
}

* { box-sizing: border-box; }

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0 auto;
  max-width: 720px;
  padding: 40px max(20px, env(safe-area-inset-right)) 56px max(20px, env(safe-area-inset-left));
  -webkit-text-size-adjust: 100%;
}

/* Short runs of text are balanced across their lines rather than left to
   fill greedily, which is what strands a single word on the last line of a
   card. `pretty` does the same job for longer prose, where balancing whole
   paragraphs would be wrong. */
h1, h2, .list-intro, .card-body p, .status { text-wrap: balance; }
p, li { text-wrap: pretty; }

h1 { font-size: 1.95em; line-height: 1.12; margin: 0 0 .22em; letter-spacing: -.02em; }
h2 { font-size: 1.2em; margin: 2.1em 0 .45em; letter-spacing: -.01em; }
h3 { font-size: 1.02em; margin: 1.5em 0 .3em; }
p, li { margin: .65em 0; }
a { color: var(--link); text-underline-offset: 2px; }
.lede { font-size: 1.12em; line-height: 1.5; color: var(--quiet); margin-top: 0; }

/* The way back -------------------------------------------------------- */
/* One quiet link at the top of every sub-page, pointing at its parent. The
   landing page has none: it is the parent, and its cards are the navigation. */
.back {
  display: inline-block;
  font-size: .92em;
  color: var(--quiet);
  text-decoration: none;
  margin: -6px 0 1.8em;
}
.back::before {
  content: "\2190";
  display: inline-block;
  margin-right: .45em;
}
/* The underline goes on the label only. Put it on the whole link and it
   runs under the arrow as well, then breaks across the gap between them. */
.back span { text-decoration: none; }
.back:hover { color: var(--link); }
.back:hover span { text-decoration: underline; text-underline-offset: 2px; }

/* Masthead ------------------------------------------------------------- */
.masthead { margin-bottom: 1.5em; }
.masthead::after {
  content: ""; display: block;
  width: 64px; height: 3px; border-radius: 2px;
  background: var(--field);
  margin-top: 1.1em;
}

/* The sentence that introduces the list, not the person above it. */
.list-intro { font-size: 1.04em; color: var(--quiet); margin: 0 0 .9em; }

/* Project cards --------------------------------------------------------- */
.projects { list-style: none; margin: 0; padding: 0; }
.projects > li {
  display: flex;
  gap: 16px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 17px 20px;
  margin: 0 0 13px;
}
.mark {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg);
  display: grid; place-items: center;
}
.mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark svg { width: 100%; height: 100%; display: block; }
/* A mark that isn't square sits inside the tile rather than filling it. */
.mark.pad { background: var(--card); }
.mark.pad svg { width: 82%; height: auto; }
.card-body { min-width: 0; }
.card-body h2 { margin: 0 0 .1em; font-size: 1.17em; }
.card-body h2 a { text-decoration: none; }
.card-body h2 a:hover { text-decoration: underline; }
.card-body p { margin: .25em 0 .6em; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .88em; color: var(--quiet); margin: 0; }
.meta a { color: var(--link); }
.status {
  font-size: .79em; font-weight: 650; letter-spacing: .012em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: #e6e2ee; color: #3d3550;
}
.status.live { background: #d5e8d6; color: #1e3f23; }
/* A pill that is also a link: it keeps the pill's colour rather than turning
   link-purple, and says so on hover instead of underlining. */
a.status { text-decoration: none; }
a.status:hover { filter: brightness(.95); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.status.gone { background: #e9e6ec; color: #5b5563; }

/* Panels and galleries -------------------------------------------------- */
.panel {
  background: var(--card);
  border-left: 4px solid var(--field);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 17px 21px;
  margin: 1.8em 0;
}
.panel strong { display: block; margin-bottom: .15em; }

.shots { display: grid; gap: 14px; margin: 1.5em 0; padding: 0; list-style: none; }
.shots.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shots.tall { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.shots img { width: 100%; height: auto; display: block; border-radius: 10px; }

.badge { display: inline-block; margin: .8em 0; }

/* The demo, from YouTube's no-cookie host: nothing is set until someone
   presses play. 16:9, and it shrinks with the column. */
.video { margin: 1.4em 0; max-width: 560px; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; }

table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
th, td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); }
th { font-size: .87em; color: var(--quiet); font-weight: 650; }

code { font-size: .92em; }

/* The two things the game sends, as a list, so the paragraph that applies to
   both of them follows both rather than trailing the second one. */
.sent { padding-left: 1.15em; margin: 1.1em 0; }
.sent li { margin: 0 0 .9em; padding-left: .15em; }
.sent li::marker { color: var(--field); }

footer {
  margin-top: 3.4em; padding-top: 1.3em;
  border-top: 1px solid var(--rule);
  font-size: .88em; color: var(--quiet);
}
footer a { color: var(--quiet); }

@media (max-width: 460px) {
  body { padding-top: 36px; }
  h1 { font-size: 1.8em; }
  .projects > li { gap: 14px; padding: 18px 18px; }
  .mark { width: 46px; height: 46px; border-radius: 11px; }
}
