@font-face {
  font-family: "Space Grotesk";
  src: url("font.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #242a28;
  --muted: #59645f;
  --paper: #fafbf9;
  --line: #d7ded7;
  --red: #b5293b;
  --green: #174e3e;
  --mint: #e5eee8;
  --content: 1200px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 "Space Grotesk", sans-serif; letter-spacing: 0; }
a { color: inherit; text-underline-offset: 5px; }
a:hover { color: var(--red); }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
h1, h2, p { margin: 0; }
h1 { font-size: 52px; line-height: 1.15; font-weight: 600; }
h2 { font-size: 27px; line-height: 1.3; font-weight: 500; }
p + p { margin-top: 20px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 10px 18px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 90px; padding: 20px 4%; display: flex; align-items: center; gap: 32px; position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { text-decoration: none; font-size: 26px; font-weight: 700; white-space: nowrap; border-left: 5px solid var(--red); padding-left: 13px; }
.site-header nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
[aria-current="page"] { border-bottom: 2px solid var(--red); color: var(--red); }
.languages { display: flex; gap: 12px; font-size: 12px; padding-left: 24px; border-left: 1px solid var(--line); }
.languages a { text-decoration: none; padding: 4px 0; }
.languages [aria-current="true"] { font-weight: 700; border-bottom: 2px solid var(--ink); }
.eyebrow { font-size: 12px; text-transform: uppercase; font-weight: 600; color: var(--green); margin-bottom: 18px; }
.page-shell { max-width: var(--content); margin: 0 auto; padding: 64px 32px 80px; }
.text-link { color: var(--green); font-size: 14px; font-weight: 600; text-decoration: none; }
.category-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 30px; }
.category-heading a { font-size: 14px; }
.page-heading { padding-bottom: 40px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-heading h1 { margin-bottom: 18px; }
.page-heading > p:last-child { color: var(--muted); font-size: 21px; max-width: 700px; }
.item { min-width: 0; }
.item h2 a { text-decoration: none; }
.item p { margin-top: 18px; }
.item .eyebrow { margin-top: 0; }
.item .meta { font-size: 12px; color: var(--muted); }
.item .text-link { display: inline-block; margin-top: 25px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-grid .item { background: white; border: 1px solid var(--line); border-top: 3px solid var(--green); padding: 30px; border-radius: 4px; }
.project-grid .item:nth-child(even) { border-top-color: var(--red); }
.detail-page { max-width: 820px; margin: 0 auto; padding: 64px 32px 100px; display: block; }
.detail-page h1 { font-size: 44px; margin-bottom: 24px; }
.detail-page h2 { margin: 36px 0 18px; }
.detail-page > p { margin: 24px 0; }
.detail-page .lead { font-size: 23px; color: var(--green); }
.detail-page .meta { color: var(--muted); font-size: 13px; }
.breadcrumbs { font-size: 13px; margin-bottom: 42px; }
.site-footer { padding: 40px max(32px, calc((100% - 1136px) / 2)); background: #242a28; color: #f0f2f0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-brand { font-size: 25px; font-weight: 600; }
.footer-brand p { font-size: 14px; font-weight: 400; margin-top: 12px; color: #ced6d0; }
.site-footer > div:nth-child(2) > a { display: inline-block; margin: 0 24px 16px 0; font-size: 14px; }
.site-footer > div:nth-child(2) p { font-size: 12px; color: #ced6d0; }
.site-footer small { grid-column: 1 / -1; font-size: 11px; color: #ced6d0; border-top: 1px solid #ffffff26; padding-top: 20px; }
@media (max-width: 1050px) {
  .site-header { flex-wrap: wrap; gap: 16px; padding: 18px 24px; }
  .site-header nav { order: 3; flex-basis: 100%; margin: 0; justify-content: space-between; gap: 10px; }
  .languages { margin-left: auto; }
}
@media (max-width: 650px) {
  h1 { font-size: 38px; }
  .site-header { padding: 16px 20px; }
  .site-header nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .page-shell { padding: 40px 24px 48px; }
  .category-heading { flex-wrap: wrap; gap: 12px; }
  .category-heading h2 { font-size: 25px; }
  .page-heading > p:last-child { font-size: 18px; }
  .detail-page { padding: 40px 24px 64px; }
  .detail-page h1 { font-size: 34px; overflow-wrap: anywhere; }
  .site-footer { grid-template-columns: 1fr; padding: 32px 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-grid .item { padding: 24px; }
}
/* lean-games additions */
.home-section { margin-top: 56px; }
.home-section > p { color: var(--muted); margin-bottom: 26px; max-width: 700px; }
.item .text-link + .text-link { margin-left: 0; }
.app-link { display: inline-block; margin-top: 30px; padding: 12px 20px; background: var(--green); color: white; text-decoration: none; font-weight: 600; border-radius: 4px; }
.app-link:hover { color: white; background: var(--red); }

.excerpts { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }
.excerpts > p { color: var(--muted); font-size: 14px; }
.excerpt { margin: 24px 0 0; }
.excerpt pre { margin: 0; padding: 16px 18px; background: var(--mint); border-left: 3px solid var(--green); overflow-x: auto; font-size: 13px; line-height: 1.5; }
.excerpt code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre; }
.excerpt figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Private items (Item.isPrivate): pink everywhere, with a lock and words, never colour alone; their pages are under
   /private/, behind the team's password. */
.project-grid .item.private, .project-grid .item.private:nth-child(even) { background: #fdeef3; border-color: #f3c4d4; border-top-color: #c2255c; }
.private-mark { color: #a61e4d; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.item .private-mark { margin-top: 10px; }
.detail-page .private-mark, .page-heading .private-mark { margin-top: -8px; }
