/* Alsatian Studio, style "2007".
   A pixel game website of 2007. A red page with a pattern of dog shapes, one dark-framed column, a pixel valley banner with the Alsatian and other animals, a chunky wordmark, orange tabs with pixel icons, a yellow strip, and a steel-blue panel of white boxes with coloured header strips.
   Colours are taken from a 2007 screenshot. Header colours are a few percent darker than the original, so white text on them passes WCAG contrast.
   Column colours on the home page: orange for developers, green for families and schools, blue for everyone. A project page uses the colour of its group. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #C20000;
  --frame: #333333;
  --groove: #4E4E4E;
  --tab-top: #EE9800;
  --tab-bottom: #D75C03;
  --tab-edge: #A43700;
  --yellow: #FFCE00;
  --panel: #47839D;
  --dark: #222222;
  --navy: #004979;
  --table-head: #083D55;
  --row: #C3DFF1;
  --orange: #C45403;
  --green: #49824C;
  --blue: #437C95;
  --button-blue: #1373A9;
  --arrow: #FF8015;
  --link: #0E5F8F;
  --on-navy-link: #FFA55E;
  --note: #FFF3B0;
  --ink: #000000;
  --ink-2: #444444;

  --c: var(--blue);
  --pixel: "Pixelify Sans", Verdana, sans-serif;
  --text: Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif;
  --frame-width: 920px;
  --radius: 7px;
  /* The white arrow on the orange square of every button. */
  --arrow-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5l5 4.5-5 4.5z' fill='%23fff'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 28px;
  background: var(--red) url("../img/pattern.webp") 0 0 / 124px 112px repeat;
  color: var(--ink);
  font-family: var(--text);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

img, video, svg { max-width: 100%; }
img, video { height: auto; display: block; }

a { color: var(--link); font-weight: 700; text-underline-offset: 0.12em; }
a:hover { color: #000000; }
:focus-visible { outline: 3px solid #000000; outline-offset: 2px; box-shadow: 0 0 0 5px var(--yellow); }
::selection { background: var(--yellow); color: #000000; }

.wrap { max-width: none; margin: 0; padding: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--yellow); color: #000000; padding: 8px 14px; border: 2px solid #000000; border-radius: 5px;
}
.skip-link:focus { top: 12px; }

code, pre, kbd, samp { font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace; }

/* ------------------------------------------------------------------ the frame */

.site-header, main, .site-footer { width: min(var(--frame-width), 100% - 16px); margin-inline: auto; }

/* ------------------------------------------------------------------ header: dark frame, valley banner, tabs, yellow strip */

.site-header {
  position: relative;
  margin-top: 14px;
  padding: 24px 4px 0;
  background: var(--frame);
  border: 1px solid #000000;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
/* The groove along the top of the frame. */
.site-header::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 6px; height: 12px;
  border-radius: 3px;
  background: var(--groove);
  box-shadow: inset 0 1px 0 #262626, 0 1px 0 #5A5A5A;
}
.header-inner {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  min-height: 176px;
  padding: 16px 0 0;
  border-radius: 5px 5px 0 0;
  /* The banner: a pixel valley with a river and animals, and the Alsatian resting under a big tree at the right. The image is a crop of source/banner-chatgpt.png. The position shows the animals above the tabs: the puppies with their ball, the ducks, the fawn, the cat, and the dog. */
  /* Two sizes: 1x is exactly the widest size the banner is shown at (910 by 356), 2x is for sharp screens and phones. Browsers without image-set() use the 1x file. */
  background: #61B5FC url("../img/banner-1x.webp") right 77% / cover no-repeat;
  background-image: -webkit-image-set(url("../img/banner-1x.webp") 1x, url("../img/banner-2x.webp") 2x);
  background-image: image-set(url("../img/banner-1x.webp") 1x, url("../img/banner-2x.webp") 2x);
  /* The yellow strip under the tabs. */
  border-bottom: 16px solid var(--yellow);
  box-shadow: 0 2px 0 var(--tab-top);
}
.page-home .header-inner { min-height: 196px; background-position: right 75%; }

.brand { display: inline-flex; margin: 4px 0 0 20px; text-decoration: none; }
/* The wordmark, with no logo: chunky pixel letters, yellow at the top and orange at the bottom, in a dark outline. */
.brand-name {
  font-family: var(--pixel);
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  background: linear-gradient(#FFF07A, #FFCE00 45%, #FF9A00);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter:
    drop-shadow(2px 0 0 #3B1F00) drop-shadow(-2px 0 0 #3B1F00)
    drop-shadow(0 2px 0 #3B1F00) drop-shadow(0 -2px 0 #3B1F00)
    drop-shadow(0 3px 0 rgb(0 0 0 / 0.4));
}
.brand:focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; border-radius: 8px; }

/* Orange tabs with pixel icons, each a little wider than its icon and text. Each tab has a bevel: a light edge at the top and left, a dark edge at the right.
   The face is #C45403, a little darker than the original #D75C03, so the white text passes contrast without its shadow.
   The tab of the current part of the site is yellow, taller, and joins the yellow strip. */
.site-nav { align-self: stretch; padding-inline: 6px; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3px 2px; list-style: none; margin: 0; padding: 0; }
.site-nav li { flex: none; }
.site-nav a {
  display: flex; align-items: center; justify-content: flex-start; gap: 7px;
  height: 32px;
  padding: 0 16px 0 9px;
  border: 1px solid #6E2A00;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #C45403;
  box-shadow: inset 1px 1px 0 #F29A27, inset 2px 2px 0 #DB6A0C, inset -1px 0 0 #8E3800;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 1px 1px 0 #5A2100;
  white-space: nowrap;
}
.site-nav a::before { content: ""; flex: none; width: 24px; height: 24px; background: var(--icon) center / contain no-repeat; image-rendering: pixelated; }
.site-nav a[href$="/"] { --icon: url("../img/icon-home.webp"); }
.site-nav a[href$="software.html"], .site-nav a[href$="#software"] { --icon: url("../img/icon-software.webp"); }
.site-nav a[href$="games.html"], .site-nav a[href$="#games"] { --icon: url("../img/icon-games.webp"); }
.site-nav a[href$="updates.html"] { --icon: url("../img/icon-updates.webp"); }
.site-nav a[href$="about.html"] { --icon: url("../img/icon-about.webp"); }
.site-nav a:hover { background: #A84702; color: #FFFFFF; }
.site-nav a[aria-current="page"], .site-nav a.is-section {
  height: 38px;
  background: var(--yellow);
  border-color: #B07A00;
  box-shadow: inset 1px 1px 0 #FFF0A0, inset -1px 0 0 #E6A800;
  color: #000000;
  text-shadow: none;
}
.site-nav a:focus-visible { outline: 2px solid #000000; outline-offset: -5px; box-shadow: none; }

/* The yellow strip under the tabs carries the parts of the current section, like a sub-menu. */
.header-inner:has(+ .subnav) { border-bottom: 0; box-shadow: none; }
.subnav { padding: 3px 12px 4px; background: var(--yellow); box-shadow: 0 2px 0 var(--tab-top); }
.subnav ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.subnav li + li::before { content: "|" / ""; margin: 0 9px; color: #9A6B00; }
.subnav a { color: #000000; font-size: 0.6875rem; text-decoration: none; }
.subnav a:hover { text-decoration: underline; }
.subnav a:focus-visible { outline: 2px solid #000000; outline-offset: 1px; box-shadow: none; }

/* ------------------------------------------------------------------ the steel-blue panel */

main {
  padding: 8px;
  background: var(--panel);
  border-inline: 1px solid #000000;
}

/* A box: white, rounded, with a coloured header strip set inside a thin white margin. */
.group, #games, #experiments, .news, .page-home .closing, .project-head, .media, .screens, .facts, .prose > section, .more, .page-head, .prose--page, .year {
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 3px;
}
.group-title, .section-title, .screens-title, .facts h2, .prose > section > h2, .more .group-title, .year-title, .news-title, .page-head h1 {
  margin: 0;
  padding: 4px 8px;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: var(--c);
  color: #FFFFFF;
  font-family: var(--text);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
}

/* ------------------------------------------------------------------ home */

.page-home main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "intro intro intro"
    "featured featured featured"
    "software software software"
    "games games experiments"
    "games games closing";
  grid-template-rows: auto auto auto auto 1fr;
  gap: 8px;
  align-items: start;
}
.intro-band { grid-area: intro; }
.featured { grid-area: featured; background: #FFFFFF; border: 3px solid var(--dark); border-radius: var(--radius); padding: 12px; }
.featured-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 20px; }
.featured-image { display: block; }
.featured-image img { width: 100%; border: 1px solid var(--dark); border-radius: 4px; }
.featured-label { margin: 0 0 8px; font-size: 0.875rem; color: #A24502; font-weight: 700; }
.featured h2 { margin: 0; font-family: var(--pixel); font-size: 2.5rem; line-height: 1.1; }
.featured-text { font-size: 1rem; margin: 12px 0; }
.featured .actions { margin-bottom: 0; }
.featured .button { font-size: 0.875rem; }
.featured .button::after { display: none; }
@media (max-width: 620px) {
  .featured-inner { grid-template-columns: minmax(0, 1fr); }
}
#software { grid-area: software; }
#games { grid-area: games; }
#experiments { grid-area: experiments; }
.page-home .closing { grid-area: closing; }

.page-section main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "software software software"; gap: 8px; align-items: start; }
.page-section--games main { grid-template-areas: "games games experiments"; }
/* The section's own title is the page title: the pixel face, as on the other pages. */
h1.section-title { padding: 6px 10px; font-family: var(--pixel); font-size: 1.625rem; line-height: 1.1; text-transform: none; }

/* The promo: the headline over a picture, the lede in the navy bar under it, and the news box beside it. */
.intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "promo promo news" "lede lede news";
  grid-template-rows: auto 1fr;
  gap: 0 8px;
}
.intro-title {
  grid-area: promo;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 236px;
  margin: 0;
  padding: 16px 18px 14px;
  border: 3px solid var(--dark);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  /* The meadow picture fills the box. Its bottom edge (flowers and stones) stays in view and goes under the headline, so the animals above stay clear: the dog, the rabbit, the cat, and the ducks.
     Two sizes: 1x is exactly the size the picture is shown at on a wide screen (593 by 334), 2x is for sharp screens and phones. */
  background: #688C5E url("../img/promo-1x.webp") center bottom / cover no-repeat;
  background-image: -webkit-image-set(url("../img/promo-1x.webp") 1x, url("../img/promo-2x.webp") 2x);
  background-image: image-set(url("../img/promo-1x.webp") 1x, url("../img/promo-2x.webp") 2x);
  font-family: var(--pixel);
  /* At most 36px, so on a wide screen the headline stays below the animals in the picture. */
  font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  color: #FFF3C2;
  text-shadow:
    2px 0 0 #2B1500, -2px 0 0 #2B1500, 0 2px 0 #2B1500, 0 -2px 0 #2B1500,
    2px 2px 0 #2B1500, -2px -2px 0 #2B1500, 2px -2px 0 #2B1500, -2px 2px 0 #2B1500,
    0 5px 0 rgb(0 0 0 / 0.45);
}
.intro-line { display: block; }
.intro-line--second { color: #FFD84D; }
.intro .lede {
  grid-area: lede;
  margin: 0;
  padding: 8px 12px 10px;
  border: 3px solid var(--dark);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--navy);
  color: #FFFFFF;
  font-size: 0.8125rem;
}

/* The news box: navy, dated items, orange links. */
.news { grid-area: news; display: flex; flex-direction: column; padding: 0; background: var(--navy); border: 3px solid var(--dark); }
.news-title { --c: var(--dark); border-radius: 0; text-transform: uppercase; }
.news-list { list-style: none; margin: 0; padding: 4px 10px 0; }
.news-list li { padding: 6px 0; border-bottom: 1px dotted #4F8AB5; color: #FFFFFF; font-size: 0.75rem; line-height: 1.45; }
.news-list li:last-child { border-bottom: 0; }
.news-list time { font-weight: 700; }
.news-list time::before { content: "[" / ""; }
.news-list time::after { content: "]" / ""; }
.news-list a { color: var(--on-navy-link); }
.news-list a:hover { color: #FFFFFF; }
.news-note { display: block; }
.news-more { margin: auto 0 0; padding: 4px 8px 8px; text-align: right; }
.news :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; }

/* Section headers are dark strips. On the home page, Software spans the three columns. */
.home-section .section-head { margin: 0; }
.section-title { --c: var(--dark); text-transform: uppercase; }
.section-intro { margin: 0; padding: 6px 8px; border-bottom: 1px dotted #BBBBBB; color: var(--ink-2); font-size: 0.75rem; }
#software > .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#software .section-head { grid-column: 1 / -1; background: #FFFFFF; border-radius: var(--radius); padding: 3px; }
#software .section-title { border-radius: calc(var(--radius) - 2px); }

/* The three columns, each with a pixel character in the empty space at the bottom. */
.group { --art: none; display: flex; flex-direction: column; height: 100%; padding-bottom: 104px; background: #FFFFFF var(--art) right 10px bottom 8px / auto 92px no-repeat; }
#developers { --c: var(--orange); --link: #A24502; --art: url("../img/furni-software.webp"); }
#families { --c: var(--green); --link: #3B6B3E; --art: url("../img/pet.webp"); }
#everyone { --c: var(--blue); --link: #2F6278; --art: url("../img/pet-right.webp"); }
#games .group, #experiments .group { height: auto; padding: 0; background: transparent; }

.rows { list-style: none; margin: 0; padding: 0 5px; }
.rows li + li { border-top: 1px dotted #BBBBBB; }
.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon line" "icon kind";
  gap: 0 9px;
  padding: 8px 3px;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}
.row-icon { grid-area: icon; width: 40px; height: 40px; border: 1px solid #999999; border-radius: 6px; background: #FFFFFF; object-fit: contain; }
.row-icon--mono { display: grid; place-items: center; background: var(--table-head); border-color: #000000; color: var(--yellow); font-family: var(--pixel); font-size: 1.0625rem; font-weight: 700; }
.row-name { grid-area: name; color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 0.12em; }
.row-line { grid-area: line; font-size: 0.75rem; line-height: 1.45; }
.row-kind { grid-area: kind; color: #555555; font-size: 0.6875rem; font-style: italic; }
.row:hover { background: #FFF7D1; color: var(--ink); }
.row:hover .row-name { color: #000000; }
.row:focus-visible { outline-offset: -3px; box-shadow: none; }

/* Games: a dark-headed box of covers, with a navy bar at the bottom. */
#games { --c: var(--dark); --link: #0E5F8F; }
/* When the last row of covers has a free cell, the arcade cabinet and the pet stand in it. */
.shelf:has(> li:last-child:nth-child(3n + 1), > li:last-child:nth-child(3n + 2))::after {
  content: ""; align-self: end; min-height: 120px;
  background: url("../img/furni-games.webp") left 28% bottom 4px / auto 104px no-repeat, url("../img/pet-right.webp") right 18% bottom 4px / auto 84px no-repeat;
}
.band--ink { color: inherit; }
.shelf { list-style: none; margin: 0; padding: 8px 5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shelf > li { display: flex; min-width: 0; }
.tile { display: flex; flex-direction: column; width: 100%; padding: 4px; border-radius: 5px; color: var(--ink); font-weight: 400; text-decoration: none; }
.tile-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--dark); margin-bottom: 5px; background: #2B3A44; }
.tile-name { color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 0.12em; }
.tile-meta { color: #555555; font-size: 0.6875rem; }
a.tile:hover { background: #FFF7D1; }
a.tile:hover .tile-name { color: #000000; }
.shelf-more {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px);
  background: var(--navy);
  color: #FFFFFF;
  font-size: 0.75rem;
}
.shelf-more :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; }

/* Experiments: a dark-headed box, with the lab table at the bottom. */
#experiments { --link: #2F6278; padding-bottom: 92px; background: #FFFFFF url("../img/furni-lab.webp") right 10px bottom 8px / auto 78px no-repeat; }

/* The note under the boxes: a glassy panel. */
.page-home .closing {
  padding: 10px 12px;
  background:
    linear-gradient(120deg, transparent 0 58%, rgb(255 255 255 / 0.55) 58% 64%, transparent 64%),
    linear-gradient(#E4ECEE, #C9D8DA);
  border: 1px solid #FFFFFF;
}
.closing p { margin: 0; font-size: 0.75rem; }
.closing a { color: #0B4F78; }

/* ------------------------------------------------------------------ buttons: grey or blue, with the orange arrow square */

.actions { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.button, .news-more a, .shelf-more a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 26px;
  padding: 3px 4px 3px 10px;
  border: 1px solid #8F8F8F;
  border-radius: 5px;
  background: linear-gradient(#FFFFFF, #E9E9E9 50%, #D7D7D7 50%, #C8C8C8);
  color: #000000;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.button::after, .news-more a::after, .shelf-more a::after {
  content: ""; flex: none;
  width: 18px; height: 18px;
  border-radius: 3px;
  background: var(--arrow) var(--arrow-svg) center / 16px no-repeat;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18);
}
.button:hover { background: linear-gradient(#FFFFFF, #F3F3F3 50%, #E3E3E3 50%, #D5D5D5); color: #000000; }
/* The blue version, for the main action and on navy. */
.button--primary, .news-more a, .shelf-more a {
  border-color: #0B4C72;
  background: linear-gradient(#277BB0, #1F79B0 50%, var(--button-blue) 50%, #0F6497);
  color: #FFFFFF;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.4);
}
.button--primary:hover, .news-more a:hover, .shelf-more a:hover { background: linear-gradient(#3590C6, #2079B0 50%, #0E679C 50%, #0B5784); color: #FFFFFF; }
.button--primary { min-height: 34px; padding: 5px 5px 5px 14px; font-size: 0.875rem; }
.button--primary::after { width: 22px; height: 22px; background-size: 20px; }

/* ------------------------------------------------------------------ project page: boxes beside a score-table facts box */

.project {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "crumbs crumbs facts" "head head facts" "media media facts" "screens screens facts" "prose prose facts";
  grid-template-rows: auto auto auto auto 1fr;
  column-gap: 8px;
  align-items: start;
}
.project-body { display: contents; }
.project:has(.crumbs a[href$="#developers"]) { --c: var(--orange); --link: #A24502; }
.project:has(.crumbs a[href$="#families"]) { --c: var(--green); --link: #3B6B3E; }
.project:has(.crumbs a[href$="#everyone"]) { --c: var(--blue); --link: #2F6278; }
.project:has(.crumbs a[href$="#games"]) { --c: var(--orange); --link: #A24502; }
.project:has(.crumbs a[href$="#experiments"]) { --c: var(--blue); --link: #2F6278; }

/* The breadcrumb is the header strip of the project box. */
.crumbs { grid-area: crumbs; padding: 3px 3px 0; background: #FFFFFF; border-radius: var(--radius) var(--radius) 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 6px; list-style: none; margin: 0; padding: 4px 8px; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; background: var(--c); }
.crumbs li + li::before { content: "\203A" / ""; margin-right: 6px; color: #FFFFFF; font-weight: 700; }
.crumbs a { color: #FFFFFF; }
.crumbs a:hover { color: var(--yellow); }
.crumbs :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; }

.project-head {
  grid-area: head;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon name" "icon tagline" "icon actions";
  column-gap: 12px;
  margin-bottom: 8px;
  padding: 10px 12px 12px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.project-icon { grid-area: icon; width: 88px; height: 88px; border: 1px solid #999999; border-radius: 12px; background: #FFFFFF; object-fit: contain; }
.project-icon--mono { display: grid; place-items: center; background: var(--table-head); border-color: #000000; color: var(--yellow); font-family: var(--pixel); font-size: 2.25rem; font-weight: 700; }
.project-name { grid-area: name; margin: 0 0 4px; font-family: var(--pixel); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 700; line-height: 1.05; color: var(--table-head); }
.project-tagline { grid-area: tagline; margin: 0 0 10px; font-size: 0.8125rem; }
.project-head .actions { grid-area: actions; }

.media { grid-area: media; margin: 0 0 8px; }
.media img, .media video { width: 100%; border: 1px solid var(--dark); border-radius: 4px; background: #F2F2F2; }
.media > img, .media > video, .media > a.zoom > img { width: auto; max-width: 100%; max-height: min(78vh, 720px); margin-inline: auto; }
.media figcaption, .shot figcaption { margin-top: 4px; padding: 0 4px 2px; color: #555555; font-size: 0.6875rem; }
.media--narrow { justify-self: start; max-width: 340px; }
.media--narrow img { border: 0; background: transparent; }
.terminal { margin: 0; padding: 12px 14px; border-radius: 4px; background: #0B2233; color: #C7EBFF; font-size: 0.75rem; line-height: 1.6; overflow-x: auto; }
.media.tracks { padding: 8px; }

.screens { grid-area: screens; margin: 0 0 8px; scroll-margin-top: 12px; }
.screens-title { --c: var(--dark); text-transform: uppercase; }
.screens .shots { padding: 8px 5px 4px; }

/* Screenshots in rows of equal height. Each figure grows in proportion to its aspect ratio (--ar), so phone and desktop screenshots can share a row. */
.shots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.shot { margin: 0; min-width: 0; flex: calc(var(--ar) * 220) 1 calc(var(--ar) * 220px); max-width: min(100%, calc(var(--ar) * 460px), var(--w, 100%)); }
.shot img { width: 100%; height: auto; aspect-ratio: var(--ar); border: 1px solid var(--dark); border-radius: 3px; background: #F2F2F2; }
.zoom { position: relative; display: block; cursor: zoom-in; font-weight: 400; }
.zoom:hover img { outline: 3px solid var(--yellow); }

/* The facts: a score table. A navy header row, then light-blue and white rows. */
.facts { grid-area: facts; grid-row: 1 / -1; position: sticky; top: 8px; }
.facts h2 { --c: var(--table-head); text-transform: uppercase; }
.facts dl { margin: 0; }
.fact { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 8px; padding: 5px 8px; font-size: 0.75rem; line-height: 1.45; background: #FFFFFF; }
.fact:nth-child(odd) { background: var(--row); }
.fact dt { font-weight: 700; }
.fact dd { margin: 0; }
.fact--status { background: var(--note) !important; }
.facts dl > :last-child { border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px); }

.prose { grid-area: prose; min-width: 0; }
.prose > section { margin: 0 0 8px; scroll-margin-top: 12px; }
.prose > section:last-child { margin-bottom: 0; }
.prose > section > :not(h2) { margin-inline: 8px; }
.prose > section > h2 + * { margin-top: 8px; }
.prose > section > :last-child { margin-bottom: 8px; }
.prose p, .prose ul, .prose ol, .prose pre, .prose .table-wrap, .prose .code-block { margin-top: 0; margin-bottom: 0.85em; }
.prose h3 { margin: 1em 0 0.3em; font-size: 0.8125rem; }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose li { margin: 0.2em 0; }
.prose ul li::marker { color: var(--c); }
.prose ol li::marker { font-weight: 700; }
.prose .lede { font-size: 0.875rem; font-weight: 700; }

.link-list { list-style: none; padding-left: 0 !important; }
.promises { list-style: none; padding-left: 0 !important; }
.promises li { margin: 0; padding: 5px 8px; }
.promises li:nth-child(odd) { background: var(--row); }

:not(pre) > code { font-size: 0.92em; padding: 0 0.3em; border: 1px solid #C8C8C8; border-radius: 3px; background: #F2F2F2; overflow-wrap: anywhere; }
.prose pre { padding: 8px 10px; border-radius: 4px; background: #0B2233; color: #C7EBFF; font-size: 0.75rem; line-height: 1.55; overflow-x: auto; }
.code-block { border-radius: 4px; background: #0B2233; color: #C7EBFF; }
.code-bar { display: flex; justify-content: flex-end; padding: 4px 4px 0; }
.prose .code-block pre { margin: 0; padding-top: 2px; background: transparent; }
.copy-button {
  min-height: 26px; padding: 2px 10px;
  border: 1px solid #8F8F8F; border-radius: 5px;
  background: linear-gradient(#FFFFFF, #E9E9E9 50%, #D7D7D7 50%, #C8C8C8);
  color: #000000;
  font: inherit; font-family: var(--text); font-size: 0.6875rem; font-weight: 700; cursor: pointer;
}
.copy-button:hover { background: linear-gradient(#FFFFFF, #F3F3F3 50%, #E3E3E3 50%, #D5D5D5); }
.code-block :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; }

.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.75rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 4px 8px; }
.prose thead th { background: var(--table-head); color: #FFFFFF; font-weight: 700; }
.prose tbody tr:nth-child(odd) { background: var(--row); }
.prose td:first-child { font-weight: 700; white-space: nowrap; }
.prose .num { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .prose table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 5px 8px; }
  .prose table.stack td { padding: 0; }
  .prose table.stack td:nth-child(3) { grid-column: 1 / -1; }
  .prose table.stack tbody { display: block; }
}

/* More from the same group: one more box, under the project. */
.more { margin-top: 8px; }
.more .group-title { display: block; }
.more.band--ink .group-title { --c: var(--dark); text-transform: uppercase; }
.more .rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.more .rows li + li { border-top: 0; }

/* Songs (experiments) */
.tracks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tracks > li { display: flex; min-width: 0; }
.track { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 4px; border-radius: 5px; color: var(--ink); font-weight: 400; text-decoration: none; }
.media .track img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 4px; max-height: none; }
.track-title { color: var(--link); font-weight: 700; text-decoration: underline; }
.track-note { color: #555555; font-size: 0.6875rem; }
.track:hover { background: #FFF7D1; }

/* ------------------------------------------------------------------ simple pages: Updates, About, 404 */

/* The page title is the header strip of the first box, in the pixel face. */
.page-head { margin-bottom: 8px; }
.page-head h1 { --c: var(--dark); padding: 6px 10px; font-family: var(--pixel); font-size: 1.625rem; font-weight: 700; line-height: 1.1; }
.page-head .lede { margin: 0; padding: 8px 10px 10px; }
.page-head .actions { padding: 0 10px 10px; }
.page-head h1:last-child { border-radius: calc(var(--radius) - 2px); }

.prose--page { padding: 3px 3px 10px; }
.prose--page::before { content: ""; float: right; width: 112px; height: 160px; margin: 10px 10px 8px 16px; background: url("../img/pet.webp") center bottom / contain no-repeat; }
.prose--page > :not(h2) { margin-inline: 10px; }
.prose--page > .lede:first-child { margin-top: 10px; }
/* flow-root keeps the band beside the floating pet, not under it. */
.prose--page h2 {
  display: flow-root;
  margin: 14px 0 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--c);
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 700;
}
.prose--page h2:nth-of-type(3n + 1) { --c: var(--orange); }
.prose--page h2:nth-of-type(3n + 2) { --c: var(--green); }
.prose--page h2:nth-of-type(3n) { --c: var(--blue); }

.year { margin: 0 0 8px; }
.year-title { --c: var(--blue); font-size: 0.875rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 2px 12px; padding: 6px 8px; background: #FFFFFF; }
.timeline li:nth-child(odd) { background: var(--row); }
.timeline li:last-child { border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px); }
.timeline time { font-size: 0.75rem; font-weight: 700; color: var(--table-head); }
.update-body p { margin: 0; }
.update-title a { color: #0E5F8F; }
.update-note { font-size: 0.75rem; }
.update-source { font-size: 0.6875rem; margin-top: 2px !important; }
.update-source a { color: #2F6278; }
.older { margin-top: 3px; padding: 8px 10px; border-radius: calc(var(--radius) - 2px); background: var(--note); font-size: 0.75rem; }
.older p { margin: 0; }

/* ------------------------------------------------------------------ footer: the bottom of the frame */

.site-footer {
  background: var(--frame);
  border: 1px solid #000000;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  color: #BBBBBB;
}
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; padding: 10px 12px 12px; font-size: 0.6875rem; }
.footer-brand { margin: 0; color: #FFFFFF; font-weight: 700; font-size: 0.75rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.footer-links li + li::before { content: "|" / ""; margin: 0 7px; color: #777777; }
.footer-links a { color: #FFFFFF; text-decoration: none; }
.footer-links a:hover { color: var(--yellow); text-decoration: underline; }
.footer-note, .footer-copy { margin: 0; grid-column: 1; }

/* The design menu: a grey button with the orange arrow square, at the bottom right. It opens a box with the same page in each design, above it. */
.design-switch { position: relative; grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: end; }
.design-switch summary {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 30px; padding: 3px 4px 3px 10px;
  border: 1px solid #8F8F8F; border-radius: 5px;
  background: linear-gradient(#FFFFFF, #E9E9E9 50%, #D7D7D7 50%, #C8C8C8);
  color: #000000; font-size: 0.75rem; font-weight: 700; cursor: pointer; list-style: none;
}
.design-switch summary::-webkit-details-marker { display: none; }
.design-switch summary::after { content: ""; flex: none; width: 18px; height: 18px; border-radius: 3px; background: var(--arrow) var(--arrow-svg) center / 16px no-repeat; transform: rotate(-90deg); box-shadow: inset 2px 0 0 rgb(0 0 0 / 0.18); }
.design-switch[open] summary::after { transform: rotate(90deg); }
.design-switch summary:hover { background: linear-gradient(#FFFFFF, #F3F3F3 50%, #E3E3E3 50%, #D5D5D5); }
.design-switch summary:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; box-shadow: 0 0 0 6px #000000; }
.design-list {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5;
  min-width: 210px; margin: 0; padding: 3px; list-style: none;
  background: #FFFFFF; border-radius: var(--radius);
  box-shadow: 0 0 0 1px #000000, 0 6px 16px rgb(0 0 0 / 0.45);
}
.design-list li:nth-child(odd) a { background: var(--row); }
.design-list li:first-child a { border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.design-list li:last-child a { border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px); }
.design-list a { display: flex; gap: 8px; padding: 6px 10px; color: #0E5F8F; font-size: 0.75rem; }
.design-list a::before { content: ""; flex: none; width: 1em; }
.design-list a[aria-current="page"] { color: #000000; }
.design-list a[aria-current="page"]::before { content: "\2713" / ""; }
.design-list a:hover { background: #FFF7D1 !important; color: #000000; }
.design-list a:focus-visible { outline: 2px solid #000000; outline-offset: -2px; box-shadow: none; }
.site-footer :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 5px #000000; }

/* ------------------------------------------------------------------ screenshot viewer */

.viewer {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--panel); color: #FFFFFF;
  font-family: var(--text); font-size: 0.8125rem;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: var(--panel); }
.viewer [hidden] { display: none !important; }
html.viewer-open { overflow: hidden; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; background: var(--frame); border-bottom: 6px solid var(--yellow); }
.viewer-count { margin: 0; color: #BBBBBB; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer-count:empty { display: none; }
.viewer-caption { margin: 0; flex: 1 1 14rem; min-width: 0; font-weight: 700; }
.viewer-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.viewer-button {
  min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--tab-edge); border-radius: 6px;
  background: linear-gradient(var(--tab-top) 0 50%, var(--tab-bottom) 50% 100%);
  color: #FFFFFF;
  font: inherit; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; cursor: pointer;
  text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.viewer-button:hover { background: linear-gradient(#FFB21A 0 50%, #EC6E0B 50% 100%); }
.viewer-button:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; box-shadow: 0 0 0 6px #000000; }
.viewer-stage { position: relative; flex: 1 1 auto; min-height: 0; margin: 12px; }
.viewer-image { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; border: 3px solid #FFFFFF; border-radius: 6px; }
.viewer-image.can-zoom { cursor: zoom-in; }
.viewer.is-actual .viewer-stage { overflow: auto; overscroll-behavior: contain; }
.viewer.is-actual .viewer-image { position: static; max-width: none; max-height: none; margin: 0 auto; border-radius: 0; cursor: zoom-out; }
.viewer.is-loading .viewer-image { visibility: hidden; }
.viewer-problem { position: absolute; inset: 0; margin: auto; height: fit-content; max-width: 40ch; text-align: center; }
.viewer-arrow { display: none; }

/* ------------------------------------------------------------------ smaller screens */

@media (max-width: 860px) {
  .page-home main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "featured" "software" "games" "experiments" "closing"; grid-template-rows: none; }
  .page-section main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "software"; }
  .page-section--games main { grid-template-areas: "games" "experiments"; }
  .intro { grid-template-columns: minmax(0, 1fr); grid-template-areas: "promo" "lede" "news"; }
  .news { margin-top: 8px; }
  #software > .wrap { grid-template-columns: minmax(0, 1fr); }
  .project { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "head" "facts" "media" "screens" "prose"; grid-template-rows: none; }
  .facts { grid-row: auto; position: static; margin-bottom: 8px; }
  .more .rows { grid-template-columns: minmax(0, 1fr); }
  .shelf, .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf::after { display: none; }
}

@media (max-width: 600px) {
  .site-header { margin-top: 6px; }
  .header-inner, .page-home .header-inner { min-height: 150px; padding-top: 12px; }
  .brand { margin-left: 12px; }
  .site-nav { padding-inline: 4px; }
  .site-nav a { height: 30px; padding: 0 6px 0 4px; gap: 4px; font-size: 0.6875rem; letter-spacing: 0; }
  .site-nav a::before { width: 20px; height: 20px; }
  .site-nav a[aria-current="page"], .site-nav a.is-section { height: 30px; }
  .subnav { padding-inline: 8px; }
  main { padding: 6px; }
  .intro-title { min-height: 190px; padding: 12px; }
  .project-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "icon" "name" "tagline" "actions"; }
  .project-icon { width: 64px; height: 64px; margin-bottom: 8px; }
  .tracks { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); }
  .prose--page::before { width: 72px; height: 104px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .design-switch { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
  .design-list { right: auto; left: 0; }
  .footer-links { justify-content: flex-start; row-gap: 4px; }
  .footer-links li + li::before { content: none; }
  .footer-links li { margin-right: 14px; }
  .viewer-tools { order: -1; width: 100%; margin-left: 0; }
  .viewer-close { margin-left: auto; }
  .viewer-arrow { display: inline; font-size: 1.125rem; line-height: 1; }
  .viewer-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .viewer-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .viewer-stage { margin: 6px; }
}

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

@media (forced-colors: active) {
  /* The wordmark's gradient letters would be invisible here, so it uses the system text colour. */
  .brand-name { color: CanvasText; background: none; filter: none; }
  .group-title, .section-title, .screens-title, .facts h2, .prose > section > h2, .year-title, .news-title, .page-head h1, .crumbs ol { border: 1px solid CanvasText; }
}

@media print {
  body { background: #FFFFFF; }
  .header-inner { background: none; }
  .site-nav, .site-footer, .actions, .more, .copy-button { display: none; }
  main { background: #FFFFFF; }
  .facts { position: static; }
}
