/* The bench: one person's plain page, every word in tristondev Pixel (td.css) at 24 px (36 px lines) and
   48 px (60 px lines) only, the font's own 24 px drawing at one and two screen pixels to its pixel. The font
   has one weight and no italic: bold and italic are never asked for and never faked; emphasis is the full ink
   against the running words' softer ink. The paper is flat, and everything drawn on it is pixel art made one
   pixel at a time in the game's palette (_make/pixels.py). Nothing is fetched from another site. */

:root {
	--paper: #efe9dc;
	--ink: #1f1a17;
	--ink-soft: #4a3f36;
	--text: #3e352e;     /* the running words, a little softer than the ink */
	--pen: #23386a;      /* a blue-black fountain pen's ink, for links */
	--pen-dark: #131f40;
	--rule: #cfc4ad;
}

* { box-sizing: border-box; }
html, body, button, input { font-family: "tristondev Pixel", monospace; font-weight: 400; font-style: normal;
	font-synthesis: none; letter-spacing: 0; word-spacing: 0; font-variant-ligatures: none; }
html { background: var(--paper); }
body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-size: 24px;
	line-height: 36px;
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-weight: 400; color: var(--ink); }
b, strong, em, i { font-weight: 400; font-style: normal; color: var(--ink); }

a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pen-dark); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.nb { white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 12px; }
.skip:focus { left: 16px; z-index: 10; background: var(--paper); color: var(--pen); padding: 6px 10px; outline: 2px solid var(--pen); }

/* the column, fitted to the type: about 66 letters to a reading line (744 px; an n is 12 px). Every space
   below is a multiple of 12 px, a third of a line, but the update's paragraphs' 20 px. */
.top, main, .foot { max-width: 1008px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; padding-top: 36px; }
.name { font-size: 24px; line-height: 36px; color: var(--ink); text-decoration: none; }
.name:hover { color: var(--ink); text-decoration: underline; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 24px; line-height: 36px; }
/* the part of the site you are in is written in the ink, unlinked-looking */
.nav [aria-current] { color: var(--ink); text-decoration: none; }
.nav [aria-current]:hover { text-decoration: underline; }

main { padding-top: 48px; }
/* the 48 px headings */
h1, h2 { font-size: 48px; line-height: 60px; }
h2 { margin: 72px 0 24px; }
.intro { font-size: 24px; line-height: 36px; max-width: 744px; margin: 0; color: var(--ink); }

/* the notes: a plain list, each a few words in my own voice under its date */
.notes-row { display: flex; gap: 36px; align-items: flex-start; }
.notes { list-style: none; margin: 0; padding: 0; max-width: 30em; flex: 1; }
.notes li { margin: 0 0 18px; }

/* the devlog' list: a month, the builds it covers and their line, newest first */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0 0 12px; }
.log time { color: var(--ink-soft); min-width: 216px; font-size: 24px; line-height: 36px; }
.log-page h1 { margin: 0 0 12px; }
.log-page .intro { margin: 0 0 34px; }
/* each month's line under its builds */
.log--index li { flex-wrap: nowrap; align-items: flex-start; margin: 0 0 24px; }
.log--index time { flex: none; }
.log-line { margin: 0; color: var(--ink-soft); max-width: 744px; font-size: 24px; line-height: 36px; }
.log-all { margin: 0; }
/* /devlog/'s lines under its heading: what the builds are, then when an update goes up */
.log-intro { margin: 0 0 36px; max-width: 744px; color: var(--ink-soft); font-size: 24px; line-height: 36px; }
.log-intro p { margin: 0; }
.log-intro p + p { margin-top: 12px; }

/* an update: the lines in a reading column, the game's picture wider. Every picture is the whole view
   at zoom 1.0, never a crop: on a wide screen it stands 1280 wide past the column, centred on it (the 2D
   view, 640x360, at 2x, the way the game scales it to a 1280x720 window; the 3D window and the clip at 1x),
   scaled down to the page between. On a phone, below. */
.entry { max-width: 960px; }
.entry > p, .entry-date, .entry-builds, .changes, .entry-nav, .shot figcaption { max-width: 744px; }
.entry-date { color: var(--ink-soft); margin: 0 0 12px; font-size: 24px; line-height: 36px; }
.entry h1 { max-width: 960px; margin: 0 0 36px; }
/* a month's update: the month as its heading, then the builds it covers with their dates in the soft ink */
.entry h1.entry-month { margin: 0 0 12px; }
.entry .entry-builds { color: var(--ink-soft); margin: 0 0 36px; font-size: 24px; line-height: 36px; }
.entry p { margin: 0 0 20px; }
/* the plain headings of an update (New, Changed, Fixed, Known issues) and their short lines: 24 px in the full ink */
.entry h2 { font-size: 24px; line-height: 36px; margin: 36px 0 12px; }
.changes { margin: 0; padding-left: 24px; }
.changes li { margin: 0 0 12px; padding-left: 0; font-size: 24px; line-height: 36px; }
.shot { margin: 0 0 36px; }
.shot .frame { overflow: hidden; background: #0f0d15; }
.shot--2d .frame, .shot--3d .frame { width: min(1280px, calc(100vw - 64px)); margin-left: calc(50% - min(640px, 50vw - 32px)); }
.shot img, .shot video { display: block; width: 100%; max-width: none; height: auto; background: #0f0d15; }
.shot--2d img { image-rendering: pixelated; }
.shot--clip video { cursor: pointer; }
.shot figcaption { margin-top: 12px; font-size: 24px; line-height: 36px; color: var(--ink-soft); }
.clip-toggle { font: inherit; font-size: 24px; line-height: 36px; color: var(--pen); background: none; border: 0; padding: 0; margin-left: 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.clip-toggle:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.entry-nav ul { list-style: none; margin: 48px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rule); }
.entry-nav li { margin: 0 0 12px; }

.mail { font-size: 24px; line-height: 36px; margin: 0; }
.desk { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px 36px; flex-wrap: wrap; }
.desk--head { align-items: center; margin: 0 0 34px; }
.desk--head .intro { margin: 0; }

.foot { margin-top: 72px; padding-bottom: 48px; font-size: 24px; line-height: 36px; color: var(--ink-soft); }
.foot p { margin: 0 0 12px; }
.foot a { color: var(--ink-soft); }

/* the privacy page: a long plain document */
.doc h1 { margin: 0 0 12px; }
.doc h2 { margin: 60px 0 12px; }
.doc h3 { font-size: 24px; line-height: 36px; margin: 36px 0 12px; }
.doc p, .doc li { max-width: 744px; font-size: 24px; line-height: 36px; }
.doc p { margin: 0 0 24px; }
.doc ul { max-width: 768px; padding-left: 24px; }
.doc li { margin: 0 0 12px; }
.doc .text-lead__line { font-size: 24px; line-height: 36px; color: var(--ink); }
.doc .text-lead__date { color: var(--ink-soft); font-size: 24px; line-height: 36px; }
.doc .path { font-size: 24px; line-height: 36px; overflow-wrap: anywhere; }
.doc .wrap > p:first-child { margin-top: 0; }

/* a gap in a draft, left for Triston's own words: marked so it cannot be missed or published unseen */
.gap { background: #f2d98a; color: var(--ink); padding: 0 3px; }

/* the 404 */
.lost { min-height: 50vh; }
.lost h1 { margin: 24px 0 24px; }
.signpost { display: block; width: 224px; height: 160px; image-rendering: pixelated; margin: 0 0 24px; }
.lost-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 24px; flex-wrap: wrap; font-size: 24px; line-height: 36px; }

@media (max-width: 860px) {
	.notes-row { flex-direction: column; gap: 22px; }
}
/* on a phone every picture shows the game's own pixels: a 2D view at 1x, a 3D window and a clip at half size
   (the 3D view is drawn at 2x, so half is its own pixel), in a frame the column's width, cut only at its
   sides and centred on the player (--cx, his x in those 640 pixels, else the middle, where the camera keeps
   him). Nothing is shrunk past reading and nothing is blown up. */
@media (max-width: 600px) {
	.shot--2d .frame, .shot--3d .frame { width: auto; margin-left: 0; }
	.shot--2d img, .shot--3d img, .shot--3d video { width: 640px; height: 360px; image-rendering: pixelated;
		margin-left: clamp(calc(100% - 640px), calc(50% - var(--cx, 320px)), 0px); }
	/* a menu still is the one exception: its words run nearly edge to edge, so it fits the column whole, at a
	   whole number of pixels of height (see inked.css) */
	.shot--ui .frame { container-type: inline-size; }
	.shot--ui img { width: 100%; height: round(down, calc(100cqw * 360 / 640), 1px); object-fit: cover; margin-left: 0; image-rendering: auto; }
}
@media (max-width: 560px) {
	.top, main, .foot { padding-left: 16px; padding-right: 16px; }
	.top { padding-top: 24px; }
	main { padding-top: 36px; }
	h2 { margin-top: 60px; }
	.log li, .log--index li { display: block; }
	.log--index li { margin-bottom: 36px; }
	.log time { display: block; min-width: 0; }
	.signpost { width: 168px; height: 120px; }
}
