/*
Theme Name: Towndl
Theme URI: https://towndl.org
Author: CarletonTorpin
Author URI: https://towndl.org
Description: The home theme for towndl.org. A friendly, one-screen-at-a-time site: up to six tabs (along the top on a wide screen, along the bottom on a phone), blog posts read in short pages, light and dark with a switch, built-in SEO, public version history, an llms.txt and a Markdown copy of every page for AI agents, no comments, no tracking, no third-party requests. Built from the Zorderz theme.
Version: 0.1.23
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: towndl
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* -------------------------------------------------------------------------
   1. Design tokens. Every visitor starts in light; dark comes only from the
   switch in the header (html[data-theme="dark"]), whatever the device is
   set to. Recolour the whole site by editing these two blocks.
   ------------------------------------------------------------------------- */
:root {
	--t-bg: #FBF6EA;
	--t-card: #FFFDF7;
	--t-ink: #26221C;
	--t-mute: #5C5548;
	--t-line: #E4DAC4;
	--t-link: #1F5FA8;
	--t-green: #2E7A4E;
	--t-purple: #6A4BA3;
	--t-orange: #C2461F;
	--t-blue: #1F5FA8;
	--t-on: #FFFFFF;
	--t-sky: #DCEBF7;
	--t-del: #F6D9D2;
	--t-ins: #D9EDDD;

	--t-font-head: Lexend, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--t-font-body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--t-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--t-radius: 4px;
	--t-wide: 1040px;
	--t-read: 760px;

	color-scheme: light;
}

:root[data-theme="dark"] {
	--t-bg: #171923;
	--t-card: #20232F;
	--t-ink: #F1ECDF;
	--t-mute: #B9B3A6;
	--t-line: #343848;
	--t-link: #8DBBF2;
	--t-green: #7CCB98;
	--t-purple: #B9A1E8;
	--t-orange: #F2946E;
	--t-blue: #8DBBF2;
	--t-on: #171923;
	--t-sky: #252B45;
	--t-del: #4A2A2A;
	--t-ins: #24402E;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--t-bg);
	color: var(--t-ink);
	font-family: var(--t-font-body);
	font-size: 1.1875rem;
	line-height: 1.55;
}

h1, h2, h3, h4 {
	font-family: var(--t-font-head);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.15;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--t-link); text-underline-offset: 0.15em; }
a:hover { color: var(--t-ink); }

:focus-visible { outline: 3px solid var(--t-link); outline-offset: 2px; }

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

code, pre, kbd { font-family: var(--t-font-mono); font-size: 0.9em; }
pre { background: var(--t-card); border: 2px solid var(--t-line); border-radius: var(--t-radius); padding: 1rem; overflow-x: auto; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--t-line); padding: 0.5rem 0.7rem; text-align: left; }

hr { border: 0; border-top: 2px solid var(--t-line); margin: 1.5rem 0; }

/* -------------------------------------------------------------------------
   3. Accessibility helpers
   ------------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 0.5rem;
	top: 0.5rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--t-card);
	color: var(--t-ink);
	border: 2px solid var(--t-link);
	border-radius: var(--t-radius);
}

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

/* -------------------------------------------------------------------------
   4. Header: the logo and the light/dark switch
   ------------------------------------------------------------------------- */
.site { display: contents; }

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1.25rem;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	font-family: var(--t-font-head);
	font-weight: 600;
	font-size: 1.625rem;
	letter-spacing: -0.02em;
	color: var(--t-ink);
	text-decoration: none;
}

.site-brand svg, .site-brand img { display: block; flex: none; height: 30px; width: auto; }

.theme-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0 1rem;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	background: var(--t-card);
	color: var(--t-ink);
	font: 500 0.9375rem var(--t-font-head);
	cursor: pointer;
}

.theme-switch[hidden] { display: none; }

/* -------------------------------------------------------------------------
   5. Tabs: along the top on a wide screen, along the bottom on a phone
   ------------------------------------------------------------------------- */
.site-tabs { border-bottom: 2px solid var(--t-line); background: var(--t-bg); }

.site-tabs ul {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0.6rem 1rem;
}

.site-tabs a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1.4rem;
	border: 2px solid transparent;
	border-radius: var(--t-radius);
	color: var(--t-ink);
	font: 500 1.0625rem var(--t-font-head);
	text-align: center;
	text-decoration: none;
}

.site-tabs a:hover { border-color: var(--t-line); }

.site-tabs .current-menu-item > a,
.site-tabs .current_page_item > a,
.site-tabs .current_page_parent > a,
.site-tabs .current-menu-ancestor > a,
.site-tabs a[aria-current="page"] {
	background: var(--t-card);
	border-color: var(--t-line);
	color: var(--t-orange);
	font-weight: 600;
}

@media (max-width: 700px) {
	.site-tabs {
		order: 3;
		position: sticky;
		bottom: 0;
		z-index: 10;
		border-bottom: 0;
		border-top: 2px solid var(--t-line);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}
	.site-tabs ul { gap: 0; padding: 0.35rem 0.25rem; }
	.site-tabs li { flex: 1 1 0; min-width: 0; }
	.site-tabs a { min-height: 52px; padding: 0 0.15rem; font-size: 0.8125rem; line-height: 1.15; }
}

/* -------------------------------------------------------------------------
   6. The screen: one screenful, centred, with no page scrolling when the
   content fits. Longer content scrolls rather than being cut off.
   ------------------------------------------------------------------------- */
.site-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 1.25rem;
	min-width: 0;
}

.container {
	width: 100%;
	max-width: var(--t-read);
	margin: auto;
}

.container.is-wide { max-width: var(--t-wide); }

/* Lists and posts start at the top, so a title does not move from one
   screen to the next. Welcome and plain pages sit in the middle. */
.blog .container, .archive .container, .search .container, .single .container { margin-top: 0; }

.content-layout.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 2rem;
}

.has-sidebar-page .container { max-width: var(--t-wide); }

@media (max-width: 880px) {
	.content-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
}

.content-column { min-width: 0; }

/* -------------------------------------------------------------------------
   7. Buttons, cards, chips
   ------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 52px;
	padding: 0 1.6rem;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	background: var(--t-card);
	color: var(--t-ink);
	font: 600 1.125rem var(--t-font-head);
	text-decoration: none;
	cursor: pointer;
}

.btn:hover { border-color: var(--t-ink); color: var(--t-ink); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--t-orange); border-color: var(--t-orange); color: var(--t-on); }
.btn-primary:hover { color: var(--t-on); border-color: var(--t-ink); }
.btn-sm { min-height: 44px; padding: 0 1rem; font-size: 1rem; }

.card {
	display: block;
	background: var(--t-card);
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	padding: 1.1rem 1.25rem;
	color: var(--t-ink);
	text-decoration: none;
}

a.card:hover { border-color: var(--t-ink); }

.chips, .entry-content .chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.chips li, .entry-content .chips li { margin: 0; }

.chip {
	padding: 0.3rem 0.75rem;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	color: var(--t-mute);
	font: 500 0.875rem var(--t-font-head);
	text-decoration: none;
}

a.chip:hover { border-color: var(--t-ink); color: var(--t-ink); }

.more-link { font: 500 1.125rem var(--t-font-head); }

/* -------------------------------------------------------------------------
   8. Welcome (the front page)
   ------------------------------------------------------------------------- */
.welcome {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 3rem;
}

.welcome-text, .welcome-picture { flex: 1 1 320px; min-width: 0; margin: 0; }

.welcome-title { font-size: clamp(2rem, 5vw, 3.375rem); line-height: 1.1; margin: 0; }

.welcome-tagline { margin: 0.9rem 0 1.25rem; font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--t-mute); }

/* A picture of Towndl always sits in a monitor frame, so nobody takes the
   website for Towndl itself. */
.monitor { margin: 0; }

.monitor-screen {
	display: block;
	border: 8px solid var(--t-ink);
	border-radius: var(--t-radius);
	background: var(--t-sky);
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.monitor-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.monitor-stand {
	display: block;
	width: 110px;
	height: 12px;
	margin: 0 auto;
	background: var(--t-ink);
	border-radius: 0 0 var(--t-radius) var(--t-radius);
}

.monitor figcaption { margin-top: 0.5rem; text-align: center; font-size: 1rem; color: var(--t-mute); }

.welcome-latest { flex: 1 1 100%; }

.latest-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.latest-label { font: 600 0.875rem var(--t-font-head); color: var(--t-green); text-transform: uppercase; letter-spacing: 0.08em; }
.latest-title { flex: 1 1 260px; font: 600 1.25rem var(--t-font-head); }

.welcome-extra { flex: 1 1 100%; }

/* -------------------------------------------------------------------------
   9. Post list (the Blog tab, archives, search): a few posts to a screen
   ------------------------------------------------------------------------- */
.archive-header { margin-bottom: 1rem; }
.archive-title, .page-title { margin: 0; }
.archive-description { color: var(--t-mute); }
.archive-description p { margin: 0.4rem 0 0; }

.post-list { display: flex; flex-direction: column; gap: 0.75rem; }

.entry-meta { font: 500 0.9375rem var(--t-font-head); color: var(--t-mute); }
.entry-meta a { color: var(--t-purple); }
.meta-sep { margin: 0 0.35rem; }

.entry-excerpt .entry-title { margin: 0.2rem 0 0; font-size: clamp(1.125rem, 2.2vw, 1.375rem); line-height: 1.25; }
.entry-excerpt .entry-title a { color: var(--t-ink); text-decoration: none; }
.entry-excerpt .entry-title a::after { content: ""; position: absolute; inset: 0; }
.entry-excerpt { position: relative; }
.entry-excerpt.has-card-picture { display: flex; align-items: center; gap: 1rem; }
.card-picture { flex: none; width: 84px; aspect-ratio: 1 / 1; margin: 0; }
.card-picture img { display: block; width: 100%; height: 100%; object-fit: cover; border: 2px solid var(--t-line); border-radius: var(--t-radius); }
.card-text { flex: 1 1 auto; min-width: 0; }

@media (max-width: 600px) {
	.card-picture { width: 68px; }
	.has-card-picture .entry-summary { display: none; }
	.entry-excerpt.has-card-picture { gap: 0.75rem; }
}
.entry-excerpt:hover { border-color: var(--t-ink); }
.entry-excerpt .entry-meta a { position: relative; z-index: 1; }

.entry-summary {
	margin-top: 0.3rem;
	color: var(--t-mute);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.entry-summary p { margin: 0; }

@media (max-height: 900px) {
	.entry-summary { -webkit-line-clamp: 1; line-clamp: 1; }
}

/* Newer / Older, and the steps of a paged post */
.pagination, .pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.9rem;
}

.pagination .nav-links { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; }

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.8rem;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	background: var(--t-card);
	color: var(--t-ink);
	font: 500 1rem var(--t-font-head);
	text-decoration: none;
}

.pagination .page-numbers.current { color: var(--t-orange); font-weight: 600; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }
.pagination a.page-numbers:hover { border-color: var(--t-ink); }

.pager-status { font: 500 1rem var(--t-font-head); color: var(--t-mute); text-align: center; }

.category-links, .entry-content .category-links { margin: 0.9rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding: 0; list-style: none; }

/* -------------------------------------------------------------------------
   10. A post or a page
   ------------------------------------------------------------------------- */
.entry-header { margin-bottom: 0.9rem; }
.entry-header .entry-title { font-size: clamp(1.625rem, 4vw, 2.5rem); margin: 0.3rem 0 0.7rem; }

.in-short {
	background: var(--t-card);
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	padding: 1rem 1.25rem;
	margin: 0 0 1rem;
}

.in-short-label { margin: 0 0 0.3rem; font: 600 0.875rem var(--t-font-head); color: var(--t-green); text-transform: uppercase; letter-spacing: 0.08em; }
.in-short p:last-child { margin-bottom: 0; }

/* The featured image. Featured images are square (1024 x 1024) with the
   subject inside the middle quarter, both ways. Here it is shown wide, cropped
   in around its centre, so the subject is always in view; in lists the whole
   square shows. A picture of Towndl's own screen can be shown in a monitor
   frame instead (a tick box beside the editor). */
.entry-thumbnail { margin: 0 0 1rem; }
.feature { margin: 0; }
.feature img, .entry-content .feature img {
	display: block;
	/* Three wide to one tall, never taller than a fifth of the screen: the
	   crop then keeps the middle third of the square's height, which holds
	   the middle quarter where the subject is. */
	width: min(100%, 60vh);
	height: auto;
	max-height: none;
	aspect-ratio: 3 / 1;
	margin: 0 auto;
	object-fit: cover;
	object-position: 50% 50%;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
}
.feature figcaption { margin-top: 0.4rem; text-align: center; font-size: 1rem; color: var(--t-mute); }
.entry-thumbnail .monitor { max-width: 440px; margin: 0 auto; }


.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content img { border-radius: var(--t-radius); max-height: 40vh; width: auto; }
.entry-content .monitor { max-width: 440px; margin: 0 auto 1rem; }
.entry-content .monitor img { max-height: none; width: 100%; }
.agent-links li, .category-links li { margin: 0; }
.entry-content h2 { margin-top: 1.4em; }

.wp-block-image img { border-radius: var(--t-radius); }
.wp-block-quote { margin: 0 0 1em; padding: 0.2rem 0 0.2rem 1rem; border-left: 4px solid var(--t-purple); }
.wp-block-code { background: var(--t-card); border-radius: var(--t-radius); }
.wp-block-button__link { border-radius: var(--t-radius); background: var(--t-orange); color: var(--t-on); font-family: var(--t-font-head); font-weight: 600; }
.wp-block-separator { border-top: 2px solid var(--t-line); border-bottom: 0; }
.alignwide, .alignfull { max-width: 100%; }

.page-links { margin-top: 1rem; font-family: var(--t-font-head); }

/* A post read in pages: with JavaScript, one part shows at a time. Without
   it, the whole post simply shows, and scrolls. */
.post-page[hidden] { display: none; }
.post-page > *:first-child { margin-top: 0; }
.pager .btn { min-width: 7.5rem; }
.pager-whole { margin: 0.6rem 0 0; text-align: center; font-size: 1rem; }
.pager-whole button { border: 0; padding: 0.4rem; background: none; color: var(--t-link); font: inherit; text-decoration: underline; cursor: pointer; }

.post-about { margin-top: 1.25rem; }
.post-about h2 { font-size: 1.375rem; }
.agent-links, .entry-content .agent-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0.9rem 0 0; padding: 0; list-style: none; font-size: 1.0625rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.post-navigation { margin-top: 0.9rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.post-navigation a { display: block; background: var(--t-card); border: 2px solid var(--t-line); border-radius: var(--t-radius); padding: 0.8rem 1rem; color: var(--t-ink); text-decoration: none; }
.post-navigation a:hover { border-color: var(--t-ink); }
.post-navigation .nav-label { display: block; font: 500 0.875rem var(--t-font-head); color: var(--t-mute); }
.post-navigation .nav-title { font: 600 1rem var(--t-font-head); }
.post-navigation .nav-next { text-align: right; }

@media (max-width: 600px) {
	.post-navigation { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
}

/* -------------------------------------------------------------------------
   11. Sidebar, search, 404
   ------------------------------------------------------------------------- */
.site-sidebar .widget { background: var(--t-card); border: 2px solid var(--t-line); border-radius: var(--t-radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.widget-title { font-size: 1.125rem; }

.search-form { display: flex; gap: 0.5rem; margin: 1rem 0; }
.search-form label { flex: 1; }
.search-form .search-field {
	width: 100%;
	min-height: 52px;
	padding: 0 0.9rem;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	background: var(--t-card);
	color: var(--t-ink);
	font: inherit;
}
.search-form .search-submit {
	min-height: 52px;
	padding: 0 1.25rem;
	border: 2px solid var(--t-orange);
	border-radius: var(--t-radius);
	background: var(--t-orange);
	color: var(--t-on);
	font: 600 1.0625rem var(--t-font-head);
	cursor: pointer;
}

.no-results, .error-404 { text-align: left; }

/* -------------------------------------------------------------------------
   12. Provenance: version history, the version viewer, diffs
   ------------------------------------------------------------------------- */
.towndl-history {
	background: var(--t-card);
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
	padding: 0.9rem 1.25rem;
}

.towndl-history-title { font: 600 1.0625rem var(--t-font-head); cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 0.4rem; }
.towndl-history-toggle { font-weight: 400; color: var(--t-mute); }
.towndl-history-intro { font-size: 1rem; color: var(--t-mute); margin: 0.5rem 0 0.75rem; }
.towndl-history-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.towndl-history-item { padding: 0.6rem 0; border-top: 1px solid var(--t-line); font-size: 1rem; }
.towndl-history-meta { display: block; color: var(--t-mute); }
.towndl-history-meta strong { color: var(--t-ink); }
.towndl-history-note { display: block; margin-top: 0.2rem; font-style: italic; }
.towndl-history-current { display: inline-block; margin-top: 0.2rem; font-weight: 700; color: var(--t-green); }
.towndl-history-view { display: inline-block; margin-top: 0.2rem; font-weight: 700; }

.towndl-version-banner {
	background: var(--t-card);
	border: 2px solid var(--t-purple);
	border-radius: var(--t-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	font-size: 1.0625rem;
}

.towndl-version-banner p { margin: 0 0 0.6rem; }
.towndl-version-banner p:last-child { margin-bottom: 0; }
.towndl-version-banner-note { font-style: italic; }
.towndl-revision .entry-title { margin-top: 0; }

.towndl-diff { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 2px solid var(--t-line); }
.towndl-diff h2 { margin-top: 0; font-size: 1.25rem; }
.towndl-diff-legend { font-size: 1rem; color: var(--t-mute); }
.towndl-diff table.diff { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.9375rem; }
.towndl-diff table.diff col.ltype { width: 2rem; }
.towndl-diff table.diff td, .towndl-diff table.diff th { border: 0; padding: 0.3rem 0.6rem; vertical-align: top; word-wrap: break-word; }
.towndl-diff table.diff td { background: var(--t-card); }
.towndl-diff .diff-deletedline { background: var(--t-del) !important; text-decoration: line-through; }
.towndl-diff .diff-addedline { background: var(--t-ins) !important; }
.towndl-diff .diff-deletedline del, .towndl-diff .diff-addedline ins { text-decoration: inherit; background: transparent; }
.towndl-version-back { margin-top: 1.25rem; }

/* -------------------------------------------------------------------------
   13. Small screens and print
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {
	body { font-size: 1.0625rem; }
	.site-header { padding: 0.6rem 1rem; }
	.site-main { padding: 1rem; }
}

@media print {
	.site-header, .site-tabs, .post-navigation, .pagination, .pager, .pager-whole, .theme-switch { display: none !important; }
	.post-page[hidden] { display: block !important; }
	body { display: block; }
}

/* -------------------------------------------------------------------------
   A post's pictures and information blocks (0.1.5). Every picture in a post
   is centred with its caption centred under it. The blocks are ordinary
   WordPress blocks given a style in the editor: Image "On a monitor",
   List "Cards", List "Facts", Quote "Pull quote".
   ------------------------------------------------------------------------- */
.entry-content figure { margin: 0 auto 1rem; text-align: center; }
.entry-content figure > img,
.entry-content figure > a > img,
.entry-content > p > img,
.entry-content .wp-block-image img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 40vh;
	border: 2px solid var(--t-line);
	border-radius: var(--t-radius);
}
.entry-content figcaption,
.entry-content .wp-element-caption {
	margin: 0.45rem auto 0;
	max-width: 34em;
	text-align: center;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--t-mute);
}
.entry-content .alignleft, .entry-content .alignright { float: none; margin-left: auto; margin-right: auto; }
.entry-content li > p { margin: 0; }

/* Image, "On a monitor": a picture of Towndl's screen, in a drawn monitor. */
.entry-content .is-style-monitor { max-width: 420px; }
.entry-content .is-style-monitor img {
	width: 100%;
	max-height: none;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 8px solid var(--t-ink);
	background: var(--t-sky);
}
.entry-content .is-style-monitor figcaption::before,
.entry-content .is-style-monitor .wp-element-caption::before {
	content: "";
	display: block;
	width: 110px;
	height: 12px;
	margin: -0.45rem auto 0.5rem;
	background: var(--t-ink);
}

/* List, "Cards": each point in a card, three to a row. */
.entry-content ul.is-style-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem;
	padding: 0;
	list-style: none;
}
.entry-content ul.is-style-cards.two { grid-template-columns: repeat(2, 1fr); }
.entry-content ul.is-style-cards > li {
	margin: 0;
	padding: 0.7rem 0.85rem;
	background: var(--t-card);
	border: 2px solid var(--t-line);
	border-top: 4px solid var(--t-green);
	font-size: 1rem;
	line-height: 1.45;
}
.entry-content ul.is-style-cards > li:nth-child(4n+2) { border-top-color: var(--t-purple); }
.entry-content ul.is-style-cards > li:nth-child(4n+3) { border-top-color: var(--t-orange); }
.entry-content ul.is-style-cards > li:nth-child(4n+4) { border-top-color: var(--t-blue); }
.entry-content ul.is-style-cards > li > strong:first-child {
	display: block;
	margin-bottom: 0.2rem;
	font: 600 1.0625rem var(--t-font-head);
}

/* List, "Facts": a row of numbers, each with a few words under it. */
.entry-content ul.is-style-facts {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.6rem;
	padding: 0;
	list-style: none;
	text-align: center;
}
.entry-content ul.is-style-facts > li {
	margin: 0;
	padding: 0.6rem 0.5rem;
	background: var(--t-card);
	border: 2px solid var(--t-line);
	font-size: 0.9375rem;
	line-height: 1.35;
	color: var(--t-mute);
}
.entry-content ul.is-style-facts > li > strong:first-child {
	display: block;
	font: 600 1.75rem/1.15 var(--t-font-head);
	color: var(--t-green);
}

/* Quote, "Pull quote": one line that matters, large and centred. */
.entry-content .is-style-pull {
	margin: 0 auto 1rem;
	padding: 0.8rem 0 0;
	max-width: 30em;
	border: 0;
	border-top: 4px solid var(--t-purple);
	text-align: center;
	font: 500 1.375rem/1.35 var(--t-font-head);
}
.entry-content .is-style-pull p { margin: 0; }

@media (max-width: 700px) {
	.entry-content figure > img, .entry-content .wp-block-image img { max-height: 32vh; }
	.entry-content ul.is-style-cards, .entry-content ul.is-style-cards.two { grid-template-columns: 1fr; }
	.entry-content ul.is-style-facts { grid-template-columns: repeat(2, 1fr); }
	.entry-content .is-style-pull { font-size: 1.1875rem; }
}

/* -------------------------------------------------------------------------
   0.1.6: a post made of cards. "In this post" on the cover; the section's
   name in the pager; the title smaller past the cover; cards that open.
   ------------------------------------------------------------------------- */
.post-contents { margin: 0.8rem 0 0; }
.post-contents > summary { cursor: pointer; }
.post-contents-label { margin: 0 0 0.4rem; padding: 0.2rem 0; font: 600 0.875rem var(--t-font-head); color: var(--t-green); text-transform: uppercase; letter-spacing: 0.08em; }
.post-contents ol, .entry-content .post-contents ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.post-contents li { margin: 0; }
.post-contents button {
	padding: 0.3rem 0.65rem;
	background: var(--t-card);
	color: var(--t-ink);
	border: 2px solid var(--t-line);
	border-left: 4px solid var(--t-green);
	border-radius: var(--t-radius);
	font: 500 0.9375rem var(--t-font-head);
	text-align: left;
	cursor: pointer;
}
.post-contents li:nth-child(4n+2) button { border-left-color: var(--t-purple); }
.post-contents li:nth-child(4n+3) button { border-left-color: var(--t-orange); }
.post-contents li:nth-child(4n+4) button { border-left-color: var(--t-blue); }
.post-contents button:hover, .post-contents button:focus-visible { border-color: var(--t-ink); }

.pager-section { display: block; font-size: 0.875rem; color: var(--t-ink); }

/* 0.1.8: nothing moves when Next is pressed. On a post read in pages the
   title is one small line on every page (the cover shows it large inside the
   page), and Back and Next keep one place at the foot of the window. */
body.post-paged .entry-header { margin-bottom: 0.7rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--t-line); }
body.post-paged .entry-header .entry-meta { margin: 0 0 0.1rem; }
body.post-paged .entry-header .entry-title {
	font-size: clamp(1.25rem, 2.6vw, 1.75rem);
	line-height: 1.2;
	margin: 0;
	color: var(--t-ink);
}
body.post-paged .entry-header .entry-title:focus { outline: none; }
/* 0.1.9: Back and Next, at the foot of every screen on the line. One size,
   one place: fixed to the foot of the window (above the tabs on a phone),
   whatever the screen holds. */
.line-pager {
	position: fixed;
	left: 0;
	right: 0;
	bottom: var(--t-pager-bottom, 0px);
	z-index: 40;
	box-sizing: border-box;
	height: 4.5rem;
	margin: 0;
	padding: 0.6rem max(1rem, calc((100vw - var(--t-wide)) / 2));
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr) 7.5rem;
	align-items: center;
	gap: 0.75rem;
	background: var(--t-bg);
	border-top: 2px solid var(--t-line);
}
.line-pager .btn { min-width: 0; width: 100%; padding: 0; height: 3.25rem; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.line-pager .btn.is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.line-pager .pager-status { min-width: 0; height: 3.25rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.line-pager .pager-section { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.875rem; color: var(--t-ink); }
body.has-line .site-main { padding-bottom: 5rem; }
body.post-paged .container { margin-top: 0; }
@media (max-width: 700px) {
	.line-pager { grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem; gap: 0.5rem; bottom: var(--t-pager-bottom, 4rem); }
}
@media print { .line-pager { display: none; } }
body.post-paged .post-page > .post-about, body.post-paged .post-page.post-about { margin-top: 0; padding-top: 0; border-top: 0; }
body.post-paged .post-page > *:first-child, body.post-paged .post-page > .post-about > h2:first-child { margin-top: 0; }

/* Group, "Cards", holding Details blocks: each card shows its claim, and
   opens for the rest. */
.entry-content .wp-block-group.is-style-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem;
	align-items: start;
	margin: 0 0 1em;
}
.entry-content .wp-block-group.is-style-cards > details {
	margin: 0;
	padding: 0.7rem 0.85rem;
	background: var(--t-card);
	border: 2px solid var(--t-line);
	border-top: 4px solid var(--t-green);
	font-size: 1rem;
	line-height: 1.45;
}
.entry-content .wp-block-group.is-style-cards > details:nth-child(4n+2) { border-top-color: var(--t-purple); }
.entry-content .wp-block-group.is-style-cards > details:nth-child(4n+3) { border-top-color: var(--t-orange); }
.entry-content .wp-block-group.is-style-cards > details:nth-child(4n+4) { border-top-color: var(--t-blue); }
.entry-content .is-style-cards > details > summary { cursor: pointer; list-style: none; }
.entry-content .is-style-cards > details > summary::-webkit-details-marker { display: none; }
.entry-content .is-style-cards > details > summary strong:first-child { display: block; margin-bottom: 0.2rem; font: 600 1.0625rem var(--t-font-head); }
.entry-content .is-style-cards > details > summary::after {
	content: "More";
	display: block;
	width: -moz-fit-content;
	width: fit-content;
	margin-top: 0.45rem;
	padding: 0.1rem 0.5rem;
	border: 2px solid var(--t-line);
	font: 500 0.875rem var(--t-font-head);
	color: var(--t-link);
}
.entry-content .is-style-cards > details[open] > summary::after { content: "Less"; }
.entry-content .is-style-cards > details > *:not(summary) { margin: 0.5rem 0 0; }

@media (max-width: 700px) {
	.entry-content .wp-block-group.is-style-cards { grid-template-columns: 1fr; }
	.post-contents button { width: 100%; }
	.post-contents li { flex: 1 1 100%; }
	.pager-section { font-size: 0.8125rem; }
}

/* -------------------------------------------------------------------------
   0.1.10: no screen scrolls. pages.js measures the room above Back and Next
   (--t-screen) and lays an article out in screens that fit it; pictures are
   sized to that room too.
   ------------------------------------------------------------------------- */
body.post-paged .entry-content figure > img,
body.post-paged .entry-content .wp-block-image img { max-height: calc(var(--t-screen, 60vh) * 0.5); }
body.post-paged .entry-content .is-style-monitor { max-width: min(420px, calc((var(--t-screen, 60vh) - 110px) * 1.77)); }
body.post-paged .entry-content .is-style-monitor img { max-height: none; }
body.post-paged .post-page:has(.post-contents) .feature img,
body.post-paged .post-page .feature img { width: min(100%, calc(var(--t-screen, 60vh) * 0.75)); }
body.post-paged .post-page > *:last-child { margin-bottom: 0; }
.pager-whole { display: none; }

/* -------------------------------------------------------------------------
   0.1.11: the Blog tab's list is laid out in screens like an article; and a
   signed-in visitor's toolbar no longer makes the window scroll.
   ------------------------------------------------------------------------- */
body.admin-bar { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); }
@media (max-width: 782px) {
	body.admin-bar { min-height: calc(100vh - 46px); min-height: calc(100dvh - 46px); }
}
.post-list[data-paged] { display: block; }
.post-list[data-paged] > .post-page { display: flex; flex-direction: column; gap: 0.75rem; }
.post-list[data-paged] > .post-page[hidden] { display: none; }
body.list-paged .container { margin-top: 0; }

/* -------------------------------------------------------------------------
   0.1.12: the portal. With pages.js running, the window holds one screen and
   cannot be scrolled or shifted, up, down or sideways; an article's headline
   stands above every one of its screens.
   ------------------------------------------------------------------------- */
html.portal { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.portal body {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	overscroll-behavior: none;
}
html.portal body.admin-bar { height: calc(100vh - 32px); height: calc(100dvh - 32px); }
@media (max-width: 782px) {
	html.portal body.admin-bar { height: calc(100vh - 46px); height: calc(100dvh - 46px); }
}
html.portal .site-main { overflow: hidden; min-height: 0; }

/* 0.1.13: a screen that is not laid out in pages (Welcome) gives up its
   extras when the locked window is too short for it. */
html.portal-tight .welcome-picture figcaption { display: none; }
html.portal-tight .welcome-picture .monitor { max-width: 62%; margin-left: auto; margin-right: auto; }
html.portal-tight .welcome { gap: 0.75rem 3rem; }
html.portal-tighter .welcome-picture { display: none; }

/* -------------------------------------------------------------------------
   0.1.14
   A. Pictures beside the words. Pictures are square (1:1). On a wide window
      a screen that holds a picture is two columns: the words on the left,
      the picture on the right. On a phone it stays one column.
   B. A quieter look: thinner lines, softer boxes, calmer tabs and buttons,
      a little more air. Nothing changes place.
   ------------------------------------------------------------------------- */

/* Every screen on the line shares one width, the same as Back and Next. */
body.has-line .container { max-width: var(--t-wide); }
body.post-paged .entry-content > .post-page > p,
body.post-paged .entry-content > .post-page > h2,
body.post-paged .entry-content > .post-page > h3,
body.post-paged .entry-content > .post-page > ul:not([class*="is-style-"]),
body.post-paged .entry-content > .post-page > ol,
body.post-paged .entry-content > .post-page > .in-short,
body.post-paged .entry-content > .post-page > .post-contents { max-width: 40rem; }

/* A. two columns */
@media (min-width: 900px) {
	body.post-paged .post-page.has-picture {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
		column-gap: 2.5rem;
		align-items: start;
		align-content: start;
	}
	body.post-paged .post-page.has-picture[hidden] { display: none; }
	body.post-paged .post-page.has-picture > * { grid-column: 1; max-width: none; }
	body.post-paged .post-page.has-picture > figure,
	body.post-paged .post-page.has-picture > .entry-thumbnail,
	body.post-paged .post-page.has-picture > .wp-block-image {
		grid-column: 2;
		grid-row: 1 / span 30;
		margin: 0;
		max-width: none;
		justify-self: center;
		width: 100%;
	}
	/* The picture is shown whole and square, as large as the screen allows. */
	body.post-paged .post-page.has-picture > figure > img,
	body.post-paged .post-page.has-picture > .wp-block-image img,
	body.post-paged .post-page.has-picture .feature img {
		width: min(100%, calc(var(--t-screen, 60vh) - 4rem));
		max-height: none;
		aspect-ratio: 1 / 1;
		object-fit: cover;
		object-position: 50% 50%;
	}
	/* A picture of Towndl's screen keeps the screen's own shape. */
	body.post-paged .post-page.has-picture > .is-style-monitor { max-width: none; }
	body.post-paged .post-page.has-picture > .is-style-monitor img {
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}

/* B. quieter */
:root { --t-hair: 1px; }
.site-tabs { border-bottom-width: 1px; }
.site-tabs a { border: 0; border-bottom: 3px solid transparent; border-radius: 0; min-height: 44px; padding: 0 1.1rem; color: var(--t-mute); }
.site-tabs a:hover { border-color: var(--t-line); color: var(--t-ink); }
.site-tabs .current-menu-item > a,
.site-tabs .current_page_item > a,
.site-tabs .current_page_parent > a,
.site-tabs .current-menu-ancestor > a,
.site-tabs a[aria-current="page"] { background: none; border-color: var(--t-orange); color: var(--t-ink); font-weight: 600; }

.btn { border-width: 1px; }
.theme-switch { border-width: 1px; }
.chips li, .entry-content .chips li { border-width: 1px; }
.in-short { border-width: 1px; }
.entry-excerpt { border-width: 1px; }
.latest-card { border-width: 1px; }
.entry-content ul.is-style-cards > li,
.entry-content .wp-block-group.is-style-cards > details { border-width: 1px; border-top-width: 3px; padding: 0.85rem 1rem; }
.entry-content ul.is-style-facts > li { border-width: 1px; }
.entry-content figure > img, .entry-content .wp-block-image img, .feature img, .entry-content .feature img { border-width: 1px; }
.entry-content .is-style-monitor img { border-width: 8px; }
.entry-content .is-style-pull { border-top-width: 3px; }

body.post-paged .entry-header { border-bottom-width: 1px; margin-bottom: 1rem; padding-bottom: 0.6rem; }
body.post-paged .entry-header .entry-meta { font-size: 0.875rem; letter-spacing: 0.02em; }
body.post-paged .entry-header .entry-meta a { text-decoration: none; }
body.post-paged .entry-content h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin-bottom: 0.5em; }
body.post-paged .entry-content p { line-height: 1.6; }

/* Back and Next: the same place and size as before, drawn more lightly. */
.line-pager { border-top-width: 1px; }
.line-pager .pager-back { background: transparent; }
.line-pager .btn.is-disabled { opacity: 0.3; }
.line-pager .pager-status { gap: 0.1rem; color: var(--t-mute); font: 500 0.9375rem var(--t-font-head); text-align: center; }
.line-pager .pager-section { font-size: 0.9375rem; font-weight: 600; color: var(--t-ink); }
.line-pager .pager-then { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.875rem; color: var(--t-mute); }

/* "In this post" looks like something to press. */
.post-contents > summary { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.6rem 0.3rem 0.4rem; border: 1px solid var(--t-line); border-radius: var(--t-radius); list-style: none; }
.post-contents > summary::-webkit-details-marker { display: none; }
.post-contents > summary::before { content: "+"; display: inline-block; width: 1rem; text-align: center; font-weight: 700; }
.post-contents[open] > summary::before { content: "\2212"; }
.post-contents[open] > summary { margin-bottom: 0.5rem; }
.post-contents button { border-width: 1px; border-left-width: 3px; }

::selection { background: var(--t-orange); color: var(--t-on); }
:focus-visible { outline: 2px solid var(--t-link); outline-offset: 3px; }

@media (max-width: 700px) {
	.site-tabs a { padding: 0 0.15rem; border-bottom: 0; border-top: 3px solid transparent; }
	.site-tabs .current-menu-item > a, .site-tabs a[aria-current="page"] { border-color: var(--t-orange); }
	.site-tabs { border-top-width: 1px; }
}
body.post-paged .post-page > [hidden]:first-child + * { margin-top: 0; }

/* -------------------------------------------------------------------------
   0.1.15: bigger pictures. A picture's size was held back by the height of
   the window, not by its column. So the window gives more of its height to
   the screen: on a wide window the name and the tabs share one row, the
   space above the headline is smaller, and the picture takes everything
   left over its caption.
   ------------------------------------------------------------------------- */
@media (min-width: 900px) {
	.site-header {
		position: relative;
		z-index: 2;
		box-sizing: border-box;
		flex: 0 0 60px;
		height: 60px;
		padding-top: 0;
		padding-bottom: 0;
		pointer-events: none;
	}
	.site-header > * { pointer-events: auto; }
	.site-tabs {
		box-sizing: border-box;
		flex: 0 0 60px;
		height: 60px;
		margin-top: -60px;
		display: flex;
		align-items: stretch;
		justify-content: center;
		padding: 0 11rem;
	}
	.site-tabs ul { padding: 0; align-items: stretch; }
	.site-tabs li { display: flex; }
	.site-tabs a { min-height: 0; height: 100%; box-sizing: border-box; }
	body.has-line .site-main { padding-top: 0.9rem; }
	body.post-paged .entry-header { margin-bottom: 0.8rem; padding-bottom: 0.45rem; }

	/* The picture's column is exactly as wide as the picture can be shown:
	   half the screen, or less when the window is short. The words take
	   all the rest, so no empty band is left beside the picture. */
	body.post-paged .post-page.has-picture {
		--t-pic: calc(var(--t-screen, 60vh) - 4.6rem);
		grid-template-columns: minmax(0, 1fr) min(calc(50% - 1rem), var(--t-pic));
		column-gap: 2rem;
	}
	/* A cover's picture has no caption to leave room for. */
	body.post-paged .post-page.has-picture:has(.feature) { --t-pic: calc(var(--t-screen, 60vh) - 1rem); }
	/* A picture of Towndl's screen is wide, not square. */
	body.post-paged .post-page.has-picture:has(> .is-style-monitor) { --t-pic: calc((var(--t-screen, 60vh) - 5rem) * 1.777); }
	body.post-paged .post-page.has-picture > figure > img,
	body.post-paged .post-page.has-picture > .wp-block-image img,
	body.post-paged .post-page.has-picture .feature img,
	body.post-paged .post-page.has-picture > .is-style-monitor img { width: 100%; }
	body.post-paged .post-page.has-picture > figure figcaption,
	body.post-paged .post-page.has-picture > .wp-block-image figcaption { font-size: 0.9375rem; margin-top: 0.4rem; }
}


/* -------------------------------------------------------------------------
   0.1.16: a post's date stands beside its category, above the title, on
   every screen of the post.
   ------------------------------------------------------------------------- */
.entry-header .entry-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.6rem; }
.entry-header .entry-date { color: var(--t-ink); font-weight: 500; }
.entry-header .cat-link + .entry-date::before { content: "\00b7"; margin-right: 0.6rem; color: var(--t-mute); }


/* -------------------------------------------------------------------------
   0.1.17: a post's headline says plainly that this is a blog post, and has
   more air. One line: "BLOG POST" and the category. Under it the title,
   with "Published <date>" at the end of the same row (under the title on a
   narrow screen).
   ------------------------------------------------------------------------- */
.single .entry-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 1.5rem;
	row-gap: 0.45rem;
	align-items: baseline;
}
.single .entry-header .entry-meta { grid-column: 1 / -1; margin: 0; column-gap: 0.75rem; align-items: center; }
.single .entry-header .entry-kind {
	font: 600 0.75rem var(--t-font-head);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--t-bg);
	background: var(--t-green);
	padding: 0.2rem 0.5rem;
	border-radius: var(--t-radius);
}
.single .entry-header .entry-title { grid-column: 1; margin: 0; }
.single .entry-header .entry-date {
	grid-column: 2;
	margin: 0;
	font: 500 0.9375rem var(--t-font-head);
	color: var(--t-mute);
	white-space: nowrap;
}
.single .entry-header .cat-link + .entry-date::before { content: none; }
body.post-paged.single .entry-header { padding-bottom: 0.8rem; margin-bottom: 1rem; }
@media (max-width: 699px) {
	.single .entry-header { grid-template-columns: minmax(0, 1fr); row-gap: 0.3rem; }
	.single .entry-header .entry-date { grid-column: 1; font-size: 0.875rem; }
	body.post-paged.single .entry-header { padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
}


/* -------------------------------------------------------------------------
   0.1.18: "About this post" is a view of its own, reached from the cover.
   ------------------------------------------------------------------------- */
.chips a.chip-about { text-decoration: none; color: var(--t-mute); }
.chips a.chip-about:hover { color: var(--t-ink); }
.post-about-back { margin-top: 1.25rem; }


/* -------------------------------------------------------------------------
   0.1.19: every screen's title is one size, with one rule under it: a
   page, the Blog's list, a category, search results, "not found".
   ------------------------------------------------------------------------- */
.archive-header,
.error-404 > .page-title {
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--t-line);
}
.archive-title,
.error-404 > .page-title {
	font-size: clamp(1.25rem, 2.6vw, 1.75rem);
	line-height: 1.2;
	color: var(--t-ink);
}
.archive-header .archive-title { margin: 0; }
.archive-description { font-size: 0.9375rem; }
.error-404 .search-form { margin-top: 1rem; }

/* -------------------------------------------------------------------------
   0.1.22: the License link. One quiet link beside the light/dark switch, on
   every screen; it takes no height, so no screen changes size. It shows only
   when a published page at /license/ exists.
   ------------------------------------------------------------------------- */
.site-tools { display: flex; align-items: center; gap: 0.9rem; flex: none; }
.site-license {
	font: 500 0.875rem var(--t-font-head);
	color: var(--t-mute);
	text-decoration: none;
	padding: 0.35rem 0.1rem;
	border-bottom: 1px solid transparent;
}
.site-license:hover, .site-license:focus-visible { color: var(--t-ink); border-bottom-color: var(--t-line); }
.site-license[aria-current="page"] { color: var(--t-ink); border-bottom-color: var(--t-orange); }
@media (min-width: 900px) {
	/* The tabs sit between the name (left) and the License link and the
	   switch (right), so the right side keeps a little more room. */
	.site-tabs { padding: 0 14rem 0 11rem; }
}
@media (min-width: 900px) and (max-width: 1199px) {
	/* Six tabs fit between them on a narrower window: tighter tabs. */
	.site-tabs ul { gap: 0; }
	.site-tabs a { padding: 0 0.6rem; font-size: 1rem; }
}
@media print { .site-license { display: none !important; } }

/* -------------------------------------------------------------------------
   0.1.23: the booklet. A quiet Contents link beside the License link on
   every screen (a small list mark; with the word beside it on a wide
   window), and the part's number in the bar (inc/line.php).
   ------------------------------------------------------------------------- */
.site-contents { display: inline-flex; align-items: center; gap: 0.35rem; }
.site-contents svg { flex: none; }
.site-contents-label {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
@media (min-width: 900px) {
	.site:has(.site-contents) .site-tabs { padding-right: 15rem; }
}
@media (min-width: 1280px) {
	.site-contents-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }
	.site:has(.site-contents) .site-tabs { padding: 0 19rem; }
}
@media print { .site-contents { display: none !important; } }
