/* unbaked: registry of opened-up games.
   Type follows semii's rules: Funktional Grotesk Light from 19px up, Regular below,
   Geist Mono only for numbers, dates, codes and tags. Rows, rules and whitespace;
   no rounded corners, shadows or icons. Colour is a signal, never decoration. */

@font-face { font-family: "Funktional Grotesk"; src: url(/fonts/FunktionalGrotesk-Light.ttf) format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Funktional Grotesk"; src: url(/fonts/FunktionalGrotesk-Regular.ttf) format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/GeistMono-400-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/GeistMono-500-latin.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ground: #F2EFE7;
  --panel: #F8F6F0;
  --raised: #E8E4D9;
  --pressed: #DED9CB;
  --ink: #16140F;
  --signal: #13995A;
  --warn: #B4360F;
  --hairline: rgba(22, 20, 15, 0.12);
  --hairline-strong: rgba(22, 20, 15, 0.28);
  --sans: "Funktional Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --side: 220px;
  --card-inset: 24px; /* card text lines up with the page text; the card spills out by this much */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #13110E; --panel: #0E0D0B; --raised: #1D1A16; --pressed: #27231E; --ink: #F3EFE6;
    --signal: #4ED38A; --warn: #FF7A6B; --hairline: rgba(243, 239, 230, 0.12); --hairline-strong: rgba(243, 239, 230, 0.28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #13110E; --panel: #0E0D0B; --raised: #1D1A16; --pressed: #27231E; --ink: #F3EFE6;
  --signal: #4ED38A; --warn: #FF7A6B; --hairline: rgba(243, 239, 230, 0.12); --hairline-strong: rgba(243, 239, 230, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--sans); font-size: 19px; line-height: 30px; font-weight: 300;
  font-synthesis: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 300; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; border-radius: 0; }
button { background: transparent; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); font-weight: 400; }
code { font-family: var(--mono); font-weight: 400; font-size: 0.82em; } /* Geist Mono reads large beside the sans */
.dim { opacity: 0.5; }

/* shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 32px;
  padding: 24px 20px 20px; border-right: 1px solid var(--hairline);
}
.wordmark { font-size: 26px; line-height: 30px; letter-spacing: -0.02em; font-weight: 300; }
.nav { display: flex; flex-direction: column; }
.nav a { font-size: 15px; line-height: 28px; font-weight: 400; opacity: 0.45; transition: opacity 120ms; }
.nav a[aria-current], .nav a:hover, .nav a:focus-visible { opacity: 1; }
.sideFoot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.stamp { display: flex; flex-direction: column; gap: 4px; font-size: 11px; line-height: 16px; }
.stamp .dim { opacity: 0.45; }
.sideNote { padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 19px; font-weight: 400; opacity: 0.55; }
.sideNote a { text-decoration: underline 1px; text-underline-offset: 2px; }
.themeToggle { font-size: 11px; line-height: 16px; opacity: 0.45; text-align: left; white-space: nowrap; transition: opacity 120ms; }
.themeToggle:hover { opacity: 1; }
.main { min-width: 0; padding: 40px 48px 120px; max-width: 1160px; }
.main > section + section, .main > .notice + section { margin-top: 56px; }

/* type */
h1 { font-size: 64px; line-height: 66px; letter-spacing: -0.025em; overflow-wrap: anywhere; }
h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.01em; margin-bottom: 18px; }
.lede { font-size: 24px; line-height: 34px; letter-spacing: -0.005em; opacity: 0.8; max-width: 680px; margin-top: 20px; }
.body { opacity: 0.8; max-width: 680px; }
.body + .body, .lede + .body, .plain + .body { margin-top: 16px; }
.sectionLede { font-size: 16px; line-height: 24px; font-weight: 400; opacity: 0.6; margin: -8px 0 18px; max-width: 680px; }
.inline { text-decoration: underline 1px; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); transition: text-decoration-color 120ms; }
.inline:hover { text-decoration-color: currentColor; }
.more { margin-top: 18px; font-size: 16px; line-height: 24px; font-weight: 400; }

/* hero + search */
.hero h1 { max-width: 900px; }
.search { display: flex; align-items: center; gap: 16px; margin-top: 36px; max-width: 760px; border-bottom: 1px solid var(--ink); }
.search input, #q {
  flex: 1; min-width: 0; padding: 12px 0; background: transparent; border: 0;
  font-size: 24px; line-height: 32px; font-weight: 300; letter-spacing: -0.005em;
}
.search input::placeholder, #q::placeholder { color: var(--ink); opacity: 0.35; }
.search input:focus, #q:focus { outline: none; }
.search button { font-size: 13px; opacity: 0.6; }
.search button:hover { opacity: 1; }

/* platform tiles */
.tile {
  flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 500; font-size: 10px; line-height: 12px; letter-spacing: -0.03em;
  border: 1px solid var(--hairline-strong);
}
.tile[data-native="1"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.tile.small { flex-basis: 28px; width: 28px; height: 28px; font-size: 9px; }
.swatch { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--hairline-strong); vertical-align: -1px; margin-right: 6px; }
.swatch[data-native="1"] { background: var(--ink); border-color: var(--ink); }

/* tags */
.tag {
  display: inline-flex; align-items: center; flex-shrink: 0; height: 20px; white-space: nowrap; padding: 0 6px;
  font-family: var(--mono); font-size: 11px; line-height: 14px; border: 1px solid var(--hairline-strong); opacity: 0.8;
}
.tag.extra { border-color: transparent; padding-left: 2px; opacity: 0.5; }
.tag.warn { border-color: var(--warn); color: var(--warn); opacity: 1; }
.tag.link { transition: background-color 120ms, opacity 120ms; }
.tag.link:hover { background: var(--pressed); opacity: 1; }
.tcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.live { display: inline-block; width: 7px; height: 7px; background: var(--signal); margin-right: 6px; vertical-align: 1px; }

/* Funktional Grotesk's capitals sit 0.1em above the line-box centre (measured); Geist Mono is centred.
   Sans text sharing a row with tiles, tags or numbers drops by that much so everything shares one centre line. */
.rowTitle, .rowText, .chipLabel { position: relative; top: 0.1em; }

/* game list */
.list { border-top: 1px solid var(--hairline-strong); }
.row, .listHead {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, auto) 44px 52px 104px;
  gap: 16px; align-items: center; padding: 0 12px;
}
.listHead { font-size: 11px; line-height: 16px; opacity: 0.45; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.row { min-height: 58px; padding-top: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--hairline); transition: background-color 120ms; }
.row:hover { background: var(--pressed); }
.row.rich { align-items: start; padding-top: 16px; padding-bottom: 16px; }
.row.rich .tile { margin-top: -4px; }                      /* 34px tile on a 26px title line */
.row.rich .rowTags { margin-top: 3px; }                     /* 20px tags */
.row.rich .cellYear, .row.rich .cellStars, .row.rich .cellDate { margin-top: 5px; } /* 16px mono */
.rowMain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rowDesc { font-size: 15px; line-height: 22px; font-weight: 400; opacity: 0.65; max-width: 640px; }
.rowEnv { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; }
.rowTitle { font-size: 21px; line-height: 26px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.rowTags { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; min-width: 0; }
.hTags { text-align: right; }
.cellYear, .cellStars, .cellDate { font-size: 12px; line-height: 16px; text-align: right; opacity: 0.6; white-space: nowrap; }
.listHead .cellYear, .listHead .cellStars, .listHead .cellDate { opacity: 1; }

/* raised blocks */
.pageHead + .raisedBlock { margin-top: 40px; }
.raisedBlock { background: var(--raised); margin-left: calc(-1 * var(--card-inset)); margin-right: calc(-1 * var(--card-inset)); }
.raisedRow {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 0 var(--card-inset);
  border-bottom: 1px solid var(--hairline); font-size: 26px; line-height: 32px; letter-spacing: -0.01em;
  transition: background-color 120ms;
}
.raisedRow:last-child { border-bottom: 0; }
.raisedRow:hover { background: var(--pressed); }
.raisedRow.tall { padding-top: 18px; padding-bottom: 18px; }
.raisedLabel { display: flex; align-items: center; gap: 16px; min-width: 0; }
.raisedStack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rowSub { font-size: 15px; line-height: 22px; font-weight: 400; letter-spacing: 0; opacity: 0.6; max-width: 760px; }
.rowMeta { font-size: 13px; line-height: 16px; letter-spacing: 0; opacity: 0.6; white-space: nowrap; }

/* platform chips */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 28px; border-top: 1px solid var(--hairline-strong); }
.chip { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 16px; line-height: 24px; font-weight: 400; transition: opacity 120ms; }
.chip .mono { margin-left: auto; font-size: 12px; }
.chip:hover { opacity: 0.6; }

/* index app */
.controls { display: flex; flex-direction: column; gap: 20px; }
#q { border-bottom: 1px solid var(--ink); max-width: 760px; }
.selects { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.selects label { display: flex; flex-direction: column; gap: 4px; }
.selects .mono { font-size: 11px; line-height: 16px; }
select {
  appearance: none; -webkit-appearance: none; background-color: transparent; border: 1px solid var(--hairline-strong);
  padding: calc(8px + 0.1em) 32px calc(8px - 0.1em) 10px; /* cap-centre: same box, text 0.1em lower */
  font-size: 15px; line-height: 20px; font-weight: 400; min-width: 150px; max-width: 260px; cursor: pointer;
}
.selectWrap { position: relative; display: block; }
.selectWrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; pointer-events: none; opacity: 0.7;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg);
}
select option { background: var(--ground); color: var(--ink); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { padding: calc(6px + 0.1em) 12px calc(6px - 0.1em); border: 1px solid var(--hairline-strong); font-size: 15px; line-height: 20px; font-weight: 400; transition: background-color 120ms; } /* cap-centre */
.toggle:hover { background: var(--pressed); }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.resultLine { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin: 28px 0 10px; font-size: 12px; line-height: 16px; }
.resultLine .legend { opacity: 0.6; }
.legend .swatch:nth-of-type(2) { margin-left: 14px; }
.moreBtn { display: block; width: 100%; margin-top: 16px; padding: 16px; background: var(--raised); font-size: 13px; transition: background-color 120ms; }
.moreBtn:hover { background: var(--pressed); }

/* game page */
.gameMeta { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 16px; }
.gameMeta a { opacity: 0.7; transition: opacity 120ms; }
.gameMeta a:hover { opacity: 1; }
.game h1 { margin-top: 20px; }
.projs { border-top: 1px solid var(--hairline-strong); }
.proj { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.projHead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.projName { font-size: 24px; line-height: 30px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
a.projName { transition: opacity 120ms; }
a.projName:hover { opacity: 0.6; }
.chev {
  display: inline-block; width: 7px; height: 7px; margin-left: 10px; vertical-align: 0.2em; opacity: 0.45;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg);
}
.projMeta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12px; line-height: 18px; opacity: 0.6; }
.projText { margin-top: 8px; font-size: 16px; line-height: 24px; font-weight: 400; opacity: 0.75; max-width: 720px; overflow-wrap: anywhere; }
.projLinks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 12px; line-height: 18px; }
.notice { margin-top: 32px; padding: 14px 18px; border: 1px solid var(--warn); font-size: 16px; line-height: 24px; font-weight: 400; max-width: 720px; }
.provSection { border-top: 1px solid var(--hairline); padding-top: 16px; }
.prov { font-size: 11px; line-height: 18px; opacity: 0.5; overflow-wrap: anywhere; }
.prov + .prov { margin-top: 6px; }
.prov a { text-decoration: underline 1px; text-underline-offset: 2px; }
ul.plain { list-style: none; padding: 0; border-top: 1px solid var(--hairline-strong); max-width: 760px; }
ul.plain li { padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 17px; line-height: 26px; font-weight: 400; opacity: 0.85; overflow-wrap: anywhere; }
.credits .dim { font-size: 15px; }

/* numbered rules: square mono tiles, the site's own numbering */
.rules { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline-strong); max-width: 760px; }
.rules li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.rules .num { width: 28px; height: 28px; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--hairline-strong); font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 12px; }
.ruleTitle { position: relative; top: 0.1em; } /* cap-centre nudge: first line centres on the tile */
.ruleText { margin-top: 4px; font-size: 15px; line-height: 22px; font-weight: 400; opacity: 0.6; }

/* A-Z browse letters */
.letters { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; vertical-align: baseline; }
.letters a { font-family: var(--mono); font-size: 13px; line-height: 20px; text-decoration: underline 1px; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); }
.letters a:hover, .letters a[aria-current] { text-decoration-color: currentColor; }
.letters a[aria-current] { font-weight: 500; }

/* writing: post list and long-form text */
.posts { border-top: 1px solid var(--hairline-strong); }
.postRow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hairline); transition: background-color 120ms; }
.postRow:hover { background: var(--pressed); }
.postDate { font-size: 12px; line-height: 16px; opacity: 0.6; padding-left: 12px; }
.postMain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.postTitle { font-size: 24px; line-height: 30px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.postDesc { font-size: 16px; line-height: 24px; font-weight: 400; opacity: 0.65; max-width: 680px; }
.postMeta { margin-top: 20px; font-size: 12px; line-height: 16px; opacity: 0.6; }

.prose { max-width: 680px; margin-top: 48px; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 20px; }
.prose p, .prose li { opacity: 0.85; }
.prose h2 { margin: 48px 0 0; }
.prose h3 { margin: 36px 0 0; font-size: 22px; line-height: 28px; letter-spacing: -0.005em; }
.prose a { text-decoration: underline 1px; text-underline-offset: 3px; text-decoration-color: var(--hairline-strong); transition: text-decoration-color 120ms; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 400; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 16px 20px; background: var(--raised); }
.prose blockquote > * + * { margin-top: 12px; }
.prose code { font-family: var(--mono); font-size: 0.82em; padding: 1px 5px; background: var(--raised); }
.prose pre { padding: 16px 20px; background: var(--raised); overflow-x: auto; font-size: 14px; line-height: 22px; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 22px; font-weight: 400; }
.prose th, .prose td { padding: 8px 16px 8px 0; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 11px; line-height: 16px; font-weight: 400; opacity: 0.6; }
.prose img { display: block; max-width: 100%; height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 40px 0; }
.prose + section { margin-top: 64px; }
.answer > p:first-child { font-size: 24px; line-height: 34px; letter-spacing: -0.005em; opacity: 1; } /* the direct answer */

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

/* tablet: sidebar becomes a top bar */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 0 16px; }
  .sideFoot { width: 100%; margin-top: 0; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; }
  .stamp { display: none; }
  .sideNote { padding-top: 0; border-top: 0; }
  .main { padding: 32px 20px 96px; }
  :root { --card-inset: 20px; }
}

/* phone */
@media (max-width: 640px) {
  .side { padding: 14px 16px; }
  .main { padding: 28px 16px 80px; }
  h1 { font-size: 40px; line-height: 44px; }
  h2 { font-size: 24px; line-height: 30px; }
  .lede { font-size: 20px; line-height: 28px; }
  .search input, #q { font-size: 20px; line-height: 28px; }
  .row, .listHead { grid-template-columns: 34px minmax(0, 1fr) 48px; gap: 12px; padding-left: 0; padding-right: 0; }
  .rowTags, .hTags, .cellYear, .cellDate { display: none; }
  .rowTitle { font-size: 18px; line-height: 24px; }
  :root { --card-inset: 16px; }
  .raisedRow { font-size: 21px; line-height: 26px; }
  .raisedRow.tall { padding-top: 14px; padding-bottom: 14px; }
  .row.rich .tile { margin-top: -5px; }
  .row.rich .cellStars { margin-top: 4px; }
  select { min-width: 0; max-width: 100%; }
  .selects label { flex: 1 1 140px; }
  .projName { font-size: 21px; line-height: 26px; }
  .postRow { grid-template-columns: 1fr; gap: 6px; }
  .postDate { padding-left: 0; }
  .postTitle { font-size: 21px; line-height: 26px; }
  .answer > p:first-child { font-size: 20px; line-height: 28px; }
}
