/*
 * Site-wide look for the engifer website.
 *
 * Palette "Torch", after the torch ginger: red-pink flowers on green leaves. The start page hero is a vivid
 * emerald panel with a faint blueprint grid; turmeric marks the primary action, torch pink marks links and
 * the current place. Everything else is neutral. The layout is a full-height sidebar and a wide content area,
 * the same structure as whoacommunity.com.
 * Earlier palettes are kept in brand/index.html.
 */

:root {
	--paper: #f5f8f6;
	--surface: #ffffff;
	--ink: #121a17;
	--muted: #56635c;
	--rule: #dde6e1;
	--code-bg: #ecf2ef;

	--band: #074b3c;
	--band-ink: #f0f7f3;
	--band-muted: #a8d5c0;
	--band-rule: rgba(240, 247, 243, 0.18);
	--band-surface: #053329;
	--band-grid: rgba(168, 230, 200, 0.04);
	--band-grid-major: rgba(168, 230, 200, 0.08);

	--torch: #ff5a82;
	--highlight: #ffb320;
	--accent: #c41e4a;
	--link: #c41e4a;
	--link-decoration: #ff9ab3;
	--callout: #fff8e6;
	--callout-border: #ffb320;

	/* Syntax colors (used by the prism overrides below) */
	--tok-tag: #b0174f;
	--tok-attr: #6a3fb5;
	--tok-string: #1f7a5a;
	--tok-keyword: #2b5bb8;
	--tok-comment: #7d8a83;
	--tok-punct: #66736c;

	--font-text: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--measure: 74ch;
	--sidebar: 16.5rem;
	--radius: 6px;
	--card-shadow: 0 1px 2px rgba(18, 26, 23, 0.06), 0 4px 16px rgba(18, 26, 23, 0.05);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper: #0e1513;
		--surface: #141d1a;
		--ink: #e8f1ec;
		--muted: #9db0a6;
		--rule: #22302b;
		--code-bg: #17221e;

		--band-surface: #042a22;

		--accent: #ff8aa6;
		--link: #ff8aa6;
		--link-decoration: rgba(255, 138, 166, 0.5);
		--callout: #2a2112;
		--card-shadow: 0 0 0 1px var(--rule);

		--hero-border: 1px solid var(--band-rule);

		--tok-tag: #ff8aa6;
		--tok-attr: #c9a8ff;
		--tok-string: #7fe0b0;
		--tok-keyword: #8cb8ff;
		--tok-comment: #74867d;
		--tok-punct: #9db0a6;

		color-scheme: dark;
	}
}

/* Inter and JetBrains Mono, the same faces as whoacommunity.com. Latin and latin-ext subsets (covers Icelandic). */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/inter/inter-400-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/inter/inter-400-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/inter/inter-500-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/inter/inter-500-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/inter/inter-600-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/inter/inter-600-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-400-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-400-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-500-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-500-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-700-normal-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/jetbrains-mono/jetbrains-mono-700-normal-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "cv11";
}

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

a {
	color: var(--link);
	text-decoration-line: underline;
	text-decoration-color: var(--link-decoration);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

strong, b, th {
	font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.2;
	font-weight: 600;
	margin: 2em 0 0.6em;
	letter-spacing: -0.015em;
}

h1 {
	font-size: 2.3rem;
	margin-top: 0;
	letter-spacing: -0.03em;
}

h2 { font-size: 1.55rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.08rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, table {
	margin: 0 0 1em;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2.5rem 0;
}

code {
	font-family: var(--font-code);
	font-size: 0.85em;
	background: var(--code-bg);
	padding: 0.12em 0.35em;
	border-radius: 4px;
}

pre {
	font-family: var(--font-code);
	font-size: 0.875rem;
	line-height: 1.6;
	background: var(--code-bg);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	margin: 0 0 1.5em;
	overflow-x: auto;
}

pre code {
	background: none;
	padding: 0;
	font-size: inherit;
}

table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

th, td {
	text-align: left;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}

th {
	border-bottom-width: 2px;
}

time {
	font-variant-numeric: tabular-nums;
}

/* ---------- Prism overrides (follow the site palette) ---------- */

code[class*="language-"],
pre[class*="language-"] {
	color: var(--ink);
	text-shadow: none;
	font-family: var(--font-code);
}

pre[class*="language-"] {
	background: var(--code-bg);
	font-size: 0.875rem;
	line-height: 1.6;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5em;
}

pre code[class*="language-"] {
	font-size: inherit;
	line-height: inherit;
}

:not(pre) > code[class*="language-"] {
	background: var(--code-bg);
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata { color: var(--tok-comment); font-style: italic; }

.token.punctuation { color: var(--tok-punct); }

.token.tag,
.token.selector,
.token.namespace { color: var(--tok-tag); opacity: 1; }

.token.attr-name,
.token.property,
.token.function { color: var(--tok-attr); }

.token.string,
.token.attr-value,
.token.char,
.token.url { color: var(--tok-string); }

.token.keyword,
.token.boolean,
.token.number,
.token.constant,
.token.class-name,
.token.builtin { color: var(--tok-keyword); }

.token.operator,
.token.entity { color: var(--ink); background: none; }

/* ---------- Shell: full-height sidebar beside a wide main area ---------- */

.shell {
	display: flex;
	min-height: 100vh;
}

.sidebar {
	flex: 0 0 var(--sidebar);
	width: var(--sidebar);
	background: var(--surface);
	border-right: 1px solid var(--rule);
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	overflow-y: auto;
	padding: 1.4rem 1.25rem 2rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	margin: 0 0 1.75rem;
}

.brand img {
	display: block;
	width: 132px;
	height: auto;
}

.brand .badge {
	color: var(--accent);
}

.main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	min-height: 3.6rem;
	padding: 0.6rem 2.5rem;
	border-bottom: 1px solid var(--rule);
	font-size: 0.9rem;
}

.breadcrumbs {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 auto 0 0;
	padding: 0;
	color: var(--muted);
}

.breadcrumbs li + li::before {
	content: "/";
	margin-right: 0.4rem;
	color: var(--rule);
}

.breadcrumbs li:last-child {
	color: var(--ink);
	font-weight: 500;
}

.topbar-links {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.topbar-links a {
	color: var(--muted);
	text-decoration: none;
}

.topbar-links a:hover {
	color: var(--ink);
}

/* Only shown on narrow screens, where the contents tree moves below the page */
.contents-link {
	display: none;
}

.search input {
	font: inherit;
	font-size: 0.875rem;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 0.35rem 0.7rem;
	width: 13rem;
}

.search input::placeholder {
	color: var(--muted);
}

.content {
	flex: 1 0 auto;
	width: 100%;
	max-width: 1400px;
	padding: 2.25rem 2.5rem 4rem;
}

.site-footer {
	padding: 1.5rem 2.5rem 2rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: 0.875rem;
}

.site-footer a {
	color: inherit;
}

/* ---------- Contents tree ---------- */

.tree {
	font-size: 0.925rem;
}

.tree h2 {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0;
	margin: 1.6rem 0 0.35rem;
}

.tree h2:first-child {
	margin-top: 0;
}

.tree ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tree ul ul {
	margin-left: 0.9rem;
	padding-left: 0.6rem;
	border-left: 1px solid var(--rule);
}

.tree a,
.tree .group {
	display: block;
	padding: 0.28rem 0.6rem;
	border-radius: 5px;
	color: var(--ink);
	text-decoration: none;
}

.tree a:hover {
	background: var(--code-bg);
}

.tree .group {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.tree a[aria-current="page"] {
	background: var(--code-bg);
	color: var(--accent);
	font-weight: 600;
	box-shadow: inset 2px 0 0 var(--torch);
}

/* ---------- Reading pages ---------- */

/* Text stays at a readable width; code, tables and generated reference content use the full width */
.prose > * {
	max-width: var(--measure);
}

.prose > pre,
.prose > table,
.prose > .front,
.prose > .element-reference {
	max-width: none;
}

.prose > pre {
	max-width: 110ch;
}

.prose h1 + p {
	font-size: 1.15rem;
	color: var(--muted);
}

.prose li {
	margin-bottom: 0.4em;
}

/* Pages open with their heading, whatever its level */
.prose > :first-child {
	margin-top: 0;
}

/* Callouts: rendered from markdown asides and used directly in component pages */
.prose aside {
	background: var(--callout);
	border-left: 3px solid var(--callout-border);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

.prose aside p:last-child,
.prose aside ul:last-child {
	margin-bottom: 0;
}

@media (min-width: 80rem) {
	/* Wide screens: asides move into the room to the right of the text */
	.prose > aside {
		float: right;
		clear: right;
		width: 20rem;
		margin: 0 0 1.5rem 3rem;
	}

	.prose {
		display: flow-root;
	}
}

/* ---------- Document pages: a card, set denser than the front page. The element reference lays out its own cards ---------- */

/* The card is as wide as the text it holds, so it reads as a sheet of paper on the page */
.content:not(:has(> .front, > .element-reference)) {
	flex: 0 0 auto;
	width: auto;
	max-width: calc(var(--measure) + 12rem);
	margin: 2rem auto 3rem 2.5rem;
	padding: 2.25rem 3rem 2.5rem;
	background: var(--surface);
	border-radius: 12px;
	box-shadow: var(--card-shadow);
	font-size: 1rem;
	line-height: 1.6;
}

.content:not(:has(> .front, > .element-reference)) > * {
	max-width: none;
}

.content:not(:has(> .front, > .element-reference)) h1 { font-size: 1.95rem; margin-bottom: 0.5em; }
.content:not(:has(> .front, > .element-reference)) h2 { font-size: 1.3rem; margin: 1.7em 0 0.5em; }
.content:not(:has(> .front, > .element-reference)) h3 { font-size: 1.08rem; margin: 1.5em 0 0.4em; }
.content:not(:has(> .front, > .element-reference)) h4 { font-size: 1rem; margin: 1.3em 0 0.35em; }

.content:not(:has(> .front, > .element-reference)) h1 + p {
	font-size: 1.05rem;
}

.content:not(:has(> .front, > .element-reference)) p,
.content:not(:has(> .front, > .element-reference)) ul,
.content:not(:has(> .front, > .element-reference)) ol {
	margin-bottom: 0.8em;
}

.content:not(:has(> .front, > .element-reference)) li {
	margin-bottom: 0.2em;
}

.content:not(:has(> .front, > .element-reference)) pre {
	border: 0;
	font-size: 0.84rem;
	line-height: 1.55;
	padding: 0.85rem 1.1rem;
	margin-bottom: 1.1em;
}

.content:not(:has(> .front, > .element-reference)) table {
	font-size: 0.9rem;
	margin-bottom: 1.1em;
}

.content:not(:has(> .front, > .element-reference)) th,
.content:not(:has(> .front, > .element-reference)) td {
	padding-block: 0.4rem;
}

.content:not(:has(> .front, > .element-reference)) aside {
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	margin-bottom: 1.1rem;
}

.content:not(:has(> .front, > .element-reference)) ~ .site-footer {
	margin-top: auto;
}

/* No rule under the top bar: the card sets the content apart */
.main:not(:has(.front, .element-reference)) > .topbar {
	border-bottom-color: transparent;
}

/* Callouts stay in the text column, the card has no room beside it */
@media (min-width: 80rem) {
	.content:not(:has(> .front, > .element-reference)) > aside {
		float: none;
		width: auto;
		margin: 0 0 1.1rem;
	}
}

@media (max-width: 56rem) {
	.content:not(:has(> .front, > .element-reference)) {
		margin: 0.75rem;
		max-width: none;
		padding: 1.25rem 1.1rem 1.5rem;
	}
}

/* ---------- Powered by engifer ---------- */

/* A web badge in the classic 88×31 proportions of the "Powered by WebObjects" button every WO site once wore */
.powered-slot {
	margin-top: 1.75rem;
	text-align: center;
}

.powered {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: 108px;
	height: 36px;
	padding: 0 9px 0 7px;
	box-sizing: border-box;
	border: 1px solid var(--rule);
	border-radius: 4px;
	background: var(--paper);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 rgba(18, 26, 23, 0.06);
	text-decoration: none;
	text-align: left;
	line-height: 1;
}

.powered:hover {
	border-color: var(--link-decoration);
}

.powered img {
	flex: none;
	width: 20px;
	height: 20px;
}

.powered-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.powered-text .k {
	font-family: var(--font-code);
	font-size: 7.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.powered-text .v {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ink);
	white-space: nowrap;
}

/* The ng is coloured as in the logo: torch red on light, turmeric on dark */
.powered-text .ng {
	color: #c41e4a;
}

@media (prefers-color-scheme: dark) {
	.powered {
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 rgba(0, 0, 0, 0.25);
	}

	.powered-text .ng {
		color: var(--highlight);
	}
}

/* ---------- Badges ---------- */

.badge {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.3em 0.55em;
	border-radius: 999px;
	border: 1px solid currentColor;
	color: var(--accent);
	vertical-align: middle;
	letter-spacing: 0;
}

/* ---------- The band (start page hero) ---------- */

.band {
	color: var(--band-ink);

	/* A faint blueprint grid with one soft glow */
	background-color: var(--band);
	background-image:
		radial-gradient(ellipse 60% 140% at 100% 0%, rgba(62, 232, 165, 0.16), transparent 65%),
		linear-gradient(var(--band-grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--band-grid-major) 1px, transparent 1px),
		linear-gradient(var(--band-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--band-grid) 1px, transparent 1px);
	background-size: auto, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
	background-position: 0 0, -1px -1px, -1px -1px, -1px -1px, -1px -1px;

	/* Content shown inside the band uses colors that read on the emerald */
	--ink: var(--band-ink);
	--muted: var(--band-muted);
	--rule: var(--band-rule);
	--surface: var(--band-surface);
	--code-bg: var(--band-surface);
	--link: var(--band-ink);
	--link-decoration: var(--highlight);
	--accent: var(--highlight);

	--tok-tag: #ffb320;
	--tok-attr: #ffa3bb;
	--tok-string: #b8f5d6;
	--tok-keyword: #9fd0ff;
	--tok-comment: #86b8a1;
	--tok-punct: #a8d5c0;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 3rem;
	align-items: center;
	padding: 3rem 3.25rem;
	border-radius: 12px;
	border: var(--hero-border, 0);
}

.hero-logo {
	display: block;
	width: min(20rem, 100%);
	height: auto;
	margin: 0 0 1.75rem;
}

.hero h1 {
	font-size: clamp(1.5rem, 2.2vw, 1.95rem);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.02em;
	margin: 0 0 0.75rem;
	max-width: 28rem;
}

.hero .lead {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--band-muted);
	max-width: 30rem;
	margin: 0 0 1.75rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	text-decoration: none;
	padding: 0.65rem 1.25rem;
	border-radius: var(--radius);
	border: 1px solid var(--highlight);
	background: var(--highlight);
	color: #121a17;
}

.button:hover {
	filter: brightness(1.06);
}

.button.secondary {
	background: transparent;
	color: var(--band-ink);
	border-color: var(--band-rule);
}

.button.secondary:hover {
	border-color: var(--band-muted);
	filter: none;
}

.hero-code {
	margin: 0;
	background: var(--band-surface);
	border: 1px solid var(--band-rule);
	border-radius: 8px;
	overflow: hidden;
}

.hero-code figcaption {
	font-family: var(--font-code);
	font-size: 0.75rem;
	color: var(--band-muted);
	padding: 0.55rem 1.1rem;
	border-bottom: 1px solid var(--band-rule);
}

.hero-code pre,
.hero-code pre[class*="language-"] {
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 0.85rem;
	line-height: 1.65;
	padding: 1rem 1.1rem 1.1rem;
	tab-size: 3;
	-moz-tab-size: 3;
}

/* ---------- Start page: content ---------- */

.front-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 22rem;
	gap: 2.5rem 4rem;
	padding-top: 3rem;
}

.section-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent);
	margin: 0 0 0.9rem;
}

.featured {
	max-width: var(--measure);
}

.featured time {
	display: block;
	font-size: 0.875rem;
	color: var(--muted);
}

.featured h2 {
	font-size: clamp(1.6rem, 2.4vw, 2.1rem);
	letter-spacing: -0.03em;
	margin: 0.2rem 0 0.8rem;
}

.featured h2 a {
	color: inherit;
	text-decoration: none;
}

.featured h2 a:hover {
	text-decoration: underline;
	text-decoration-color: var(--link-decoration);
}

.featured .excerpt {
	font-size: 1.1rem;
	line-height: 1.65;
}

.read-more {
	font-weight: 600;
}

.highlights {
	padding-top: 2.5rem;
}

.highlights ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 0 2.5rem;
	border-top: 1px solid var(--rule);
}

.highlights li {
	padding-block: 1.1rem;
}

.highlights a {
	font-weight: 600;
	font-size: 1.05rem;
}

.highlights li p {
	margin: 0.3rem 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* A plain panel, not a callout: status is information, not a warning */
.front .status {
	align-self: start;
	float: none;
	width: auto;
	margin: 0;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 1.25rem 1.4rem;
	font-size: 0.93rem;
	color: var(--muted);
}

.front .status h2 {
	font-size: 1rem;
	color: var(--ink);
	margin: 0 0 0.6rem;
}

/* ---------- Dynamic elements page ---------- */


/* The element reference: the elements, and an index of them beside (above, on narrow screens) */
.element-reference {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "index" "body";
	gap: 0 3rem;
	align-items: start;
}

.element-reference-body {
	grid-area: body;
	min-width: 0;
}

.element-index {
	grid-area: index;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 2.5rem;
}

.element-index h2 {
	display: none;
}

@media (min-width: 72rem) {
	.element-reference {
		grid-template-columns: minmax(0, 1fr) 12rem;
		grid-template-areas: "body index";
	}

	.element-index {
		position: sticky;
		top: 1.5rem;
		max-height: calc(100vh - 3rem);
		overflow-y: auto;
		flex-direction: column;
		align-items: flex-start;
		flex-wrap: nowrap;
		gap: 0.15rem;
		margin: 0;
		padding-left: 1.25rem;
		border-left: 1px solid var(--rule);
	}

	.element-index h2 {
		display: block;
		font-size: 0.8rem;
		font-weight: 700;
		color: var(--muted);
		margin: 0 0 0.5rem;
	}

	.element-reference .element-index code {
		font-size: 0.8rem;
		padding: 0.1em 0;
		border: 0;
		background: none;
		color: var(--muted);
	}

	.element-reference .element-index a.undocumented code {
		font-style: italic;
	}

	.element-reference .element-index a {
		line-height: 1.35;
	}

	.element-reference .element-index a:hover code {
		color: var(--link);
	}
}

.element-index a {
	text-decoration: none;
}

.element-index code {
	display: inline-block;
	font-size: 0.85rem;
	padding: 0.3em 0.6em;
	border: 1px solid var(--rule);
	background: var(--surface);
	color: var(--ink);
}

.element-index a.undocumented code {
	background: transparent;
	border-style: dashed;
	color: var(--muted);
}

.element-index a:hover code {
	border-color: var(--torch);
	color: var(--link);
}

.element-doc {
	margin: 0 0 1.5rem;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--torch);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem 0.5rem;
	scroll-margin-top: 1rem;
}

.element-doc header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.75rem;
	margin-bottom: 0.75rem;
}

.element-doc h2 {
	margin: 0;
	font-size: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
}

.element-doc h2 code {
	background: none;
	padding: 0;
	font-size: inherit;
}

.element-doc .classname,
.undocumented .classname {
	flex-basis: 100%;
	font-family: var(--font-code);
	font-size: 0.78rem;
	color: var(--muted);
}

.element-doc > p {
	font-size: 1.05rem;
	max-width: var(--measure);
}

.bindings {
	font-size: 0.95rem;
	margin: 0.5rem 0 1rem;
}

.bindings thead th {
	font-size: 0.8rem;
	color: var(--muted);
	font-weight: 700;
	padding-block: 0.35rem;
}

.bindings td {
	padding-block: 0.6rem;
}

.bindings tr:last-child td {
	border-bottom: 0;
}

.bindings td:first-child {
	white-space: nowrap;
	width: 1%;
}

.bindings td:first-child code {
	font-weight: 700;
	background: none;
	padding: 0;
	color: var(--tok-tag);
}

.bindings .type {
	font-family: var(--font-code);
	font-size: 0.82rem;
	color: var(--muted);
	white-space: nowrap;
	width: 1%;
}

.bindings td p {
	margin: 0 0 0.4rem;
}

.bindings td p:last-child {
	margin-bottom: 0;
}

.binding-flag {
	display: block;
	font-size: 0.72rem;
	color: var(--muted);
}

.binding-direction {
	display: block;
	font-family: var(--font-body, inherit);
	font-size: 0.72rem;
}

.binding-default,
.binding-deprecated {
	font-size: 0.85rem;
	color: var(--muted);
}

.undocumented-title {
	font-size: 1.1rem;
	margin: 2.5rem 0 0.75rem;
}

.undocumented {
	list-style: none;
	padding: 0;
	border-top: 1px solid var(--rule);
}

.undocumented li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 0.75rem;
	padding-block: 0.6rem;
	border-bottom: 1px solid var(--rule);
	scroll-margin-top: 1rem;
}

.undocumented li code {
	background: none;
	padding: 0;
	font-weight: 700;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 75rem) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.front-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The sidebar's brand stays at the top; the contents tree moves below the page */
@media (max-width: 56rem) {
	.shell {
		display: flex;
		flex-direction: column;
	}

	.sidebar {
		display: contents;
	}

	.brand {
		order: 1;
		margin: 0;
		padding: 1rem 1.25rem;
		background: var(--surface);
		border-bottom: 1px solid var(--rule);
	}

	.main {
		order: 2;
	}

	.tree {
		order: 3;
		padding: 2rem 1.25rem 1.5rem;
		background: var(--surface);
		border-top: 1px solid var(--rule);
	}

	.powered-slot {
		order: 4;
		margin: 0;
		padding: 0 1.25rem 3rem;
		background: var(--surface);
	}

	.contents-link {
		display: inline;
	}

	.topbar,
	.content,
	.site-footer {
		padding-inline: 1.25rem;
	}

	.hero {
		padding: 1.75rem 1.4rem;
	}
}

@media (max-width: 36rem) {
	.breadcrumbs {
		display: none;
	}

	.topbar-links {
		width: 100%;
	}

	.search {
		margin-left: auto;
	}

	.search input {
		width: 9rem;
	}
}
