/* source.riffpress.com: the docs.

   The values are riffpress.com's: ../tokens.css, which every page loads
   first, is its file byte for byte (tokens.js copies and checks it). This
   file sets no colour, face, step or ring of its own; it adds only what a
   docs site needs and riffpress.com does not, in the block of Source's
   tokens below, each made from the shared ones.

   Read mode, after Impeccable: the frame is precise and quiet, hairlines on
   an exact grid (the door's pages, the article, "On this page"); the column
   inside it is calm, Schibsted Grotesk at a real measure. EB Garamond sets
   titles. Ember marks links, the ring and where you are. */

/* the local faces shown until the web fonts arrive, sized to their metrics
   so the swap moves nothing */
@font-face {
	font-family: "Schibsted Fallback";
	src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
	size-adjust: 105.37%;
	ascent-override: 92.68%;
	descent-override: 24.47%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Garamond Fallback";
	src: local("Georgia"), local("Times New Roman");
	size-adjust: 87.15%;
	ascent-override: 115.54%;
	descent-override: 34.19%;
	line-gap-override: 0%;
}

/* Source's tokens, each from the shared ones */
:root {

	/* the faces, with the fallbacks above before the platform's */
	--text-face: "Schibsted Grotesk", "Schibsted Fallback", var(--sans);
	--title-face: "EB Garamond", "Garamond Fallback", var(--serif);

	/* the platform's own interface face, for a key on its keyboard: Schibsted
	   has no ⌘, and Apple's face does */
	--key-face: system-ui, -apple-system, "Segoe UI", sans-serif;

	/* the docs' type: a page's title, its sections, a subsection, code */
	--text-page: clamp(2.25rem, 1.6rem + 1.8vw, 3.25rem); /* 36 to 52px */
	--text-section: var(--text-title); /* 26 to 36px */
	--text-sub: 1.25rem; /* 20px */
	--text-code: 0.875rem; /* 14px: a code block, read at length */

	/* a lede: the shared lead, held to 20px where it runs several lines */
	--text-intro: min(var(--text-lead), 1.25rem);
	--leading: 1.6;
	--leading-ui: 1.45;
	--leading-code: 1.715; /* 24px on 14px */

	/* the grid: the door's pages, the article, "On this page", one gutter
	   between each, as wide as riffpress.com's page */
	--gutter: calc(2 * var(--grid-gap));
	--side-w: 15rem;
	--rail-w: 13rem;
	--article-w: calc(var(--page-max) - var(--side-w) - var(--rail-w) - 2 * var(--gutter));
	--header-h: var(--bar-height);
	--wordmark: calc(var(--wordmark-height) - var(--space-0));
	--scrim: oklch(0.18 0.008 55 / 40%);
}

@media (width < 1200px) {

	:root {
		--gutter: calc(1.5 * var(--grid-gap));
	}
}

@media (width < 900px) {

	:root {
		--header-h: 56px;
		--wordmark: calc(var(--wordmark-height) - var(--space-1));
	}
}

/* ---- base */

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + var(--space-3));
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	caret-color: var(--ember-deep);
	font-family: var(--text-face);
	font-size: var(--text-body);
	line-height: var(--leading);
	font-kerning: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--ember-deep);
	text-decoration: underline;
	text-decoration-thickness: var(--hairline);
	text-decoration-color: color-mix(in oklch, currentcolor 45%, transparent);
	text-underline-offset: 0.22em;
	transition: color var(--t), text-decoration-color var(--t);
}

a:hover {
	color: var(--ink);
	text-decoration-color: currentcolor;
}

:focus-visible {
	border-radius: var(--radius-control);
}

::selection {
	background: var(--wash);
	color: var(--ink);
}

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

strong {
	font-weight: 600;
}

code {
	font-family: var(--mono);
	font-size: 0.875em;
	font-variant-ligatures: none;
	padding: 0.1em 0.3em;
	border-radius: var(--radius-control);
	background: var(--white-2);
	box-shadow: inset 0 0 0 var(--hairline) var(--rule);
	color: var(--ink);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

a code {
	color: inherit;
}

/* a label on the screen, as the guide names Plugins or Publish: set in the
   text's own face */
kbd {
	font: inherit;
	font-weight: 600;
	color: var(--ink);
	white-space: nowrap;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--ink);
	text-wrap: balance;
}

h1 {
	font-family: var(--title-face);
	font-size: var(--text-page);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.015em;
}

h2 {
	font-family: var(--title-face);
	font-size: var(--text-section);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

h3 {
	font-size: var(--text-sub);
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.005em;
}

h4 {
	font-size: var(--text-small);
	font-weight: 600;
	line-height: var(--leading-ui);
}

p,
li,
dd,
dt,
figcaption {
	text-wrap: pretty;
}

.skip {
	position: absolute;
	left: var(--space-2);
	top: -200px;
	z-index: 50;
	padding: var(--space-1) var(--space-2);
	border-radius: var(--radius-control);
	background: var(--primary);
	color: var(--on-primary);
	font-weight: 600;
	text-decoration: none;
}

.skip:focus {
	top: var(--space-1-5);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---- the grid: the bar, then the door's pages and the page, then the
   footer. Every page sits on it, so a page outside every door starts its
   title where the docs start theirs. */

body {
	display: grid;
	grid-template-columns:
		[full-start] minmax(var(--page-edge), 1fr)
		[side-start] var(--side-w)
		[side-end main-start] minmax(0, calc(var(--page-max) - var(--side-w)))
		[main-end] minmax(var(--page-edge), 1fr) [full-end];
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
	min-height: 100dvh;
}

body > .nav,
body > footer {
	grid-column: full;
}

body > .docs-nav {
	grid-column: side;
	grid-row: 2;
}

body > main {
	grid-column: main;
	grid-row: 2;
	min-width: 0;
	padding-left: var(--gutter);
}

/* the home and the missing page are indexes, not articles: they start at
   the bar's edge and take the whole width */
body > main:is(.home, .lost) {
	grid-column: side-start / main-end;
	padding-left: 0;
}

.wrap {
	width: 100%;
	max-width: calc(var(--page-max) + 2 * var(--page-edge));
	margin-inline: auto;
	padding-inline: var(--page-edge);
}

body > main.wrap {
	max-width: none;
	margin: 0;
	padding-right: 0;
}

/* ---- the bar: Riff | Source, search, Download */

.nav {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--white);
	border-bottom: var(--hairline) solid var(--rule);
}

.nav .wrap {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	height: var(--header-h);
}

.brand {
	display: flex;
	align-items: center;
	gap: var(--space-1-5);
	margin-right: auto;
}

.mark {
	display: flex;
	align-items: center;
	min-height: var(--control-height-small);
}

.mark img {
	display: block;
	width: auto;
	height: var(--wordmark);
}

.mark:focus-visible {
	outline-offset: var(--space-0);
}

.brand .host {
	display: flex;
	align-items: center;
	min-height: var(--space-3);
	padding-left: var(--space-1-5);
	border-left: var(--hairline) solid var(--field-edge);
	color: var(--ink);
	font-family: var(--title-face);
	font-size: 1.375rem;
	line-height: 1;
	text-decoration: none;
}

.brand .host:hover {
	color: var(--ember-deep);
}

.nav nav {
	display: flex;
	gap: var(--space-4);
}

.nav nav a {
	display: flex;
	align-items: center;
	min-height: var(--control-height-small);
	color: var(--ink-2);
	font-size: var(--text-small);
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

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

/* the link is only as wide as its word, so its ring stands a little off */
.nav nav a:focus-visible {
	outline-offset: var(--space-0);
}

.nav nav a[aria-current] {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--ember-deep);
	text-decoration-thickness: 2px;
	text-underline-offset: 10px;
}

/* search, as a field in the bar; docs.js shows it and opens the dialog */
.search {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	width: 18rem;
	height: var(--control-height-small);
	margin: 0;
	padding: 0 var(--space-1) 0 var(--space-1-5);
	border: var(--hairline) solid var(--field-edge);
	border-radius: var(--radius-control);
	background: var(--white);
	color: var(--ink-2);
	font: inherit;
	font-size: var(--text-small);
	cursor: pointer;
	transition: border-color var(--t);
}

.search[hidden] {
	display: none;
}

.search:hover {
	border-color: var(--ink-2);
}

.search-label {
	flex: 1;
	text-align: left;
}

.search-key {
	padding: 2px var(--space-0);
	border: var(--hairline) solid var(--rule);
	border-radius: var(--radius-control);
	color: var(--ink-2);
	font-family: var(--key-face);
	font-size: var(--text-label);
	font-weight: 400;
}

/* a lens, drawn: a ring and its handle */
.search-icon {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
}

.search-icon::before,
.search-icon::after {
	content: "";
	position: absolute;
}

.search-icon::before {
	inset: 0 3px 3px 0;
	border: 1.5px solid currentcolor;
	border-radius: 50%;
}

.search-icon::after {
	right: 0;
	bottom: 1px;
	width: 5px;
	height: 1.5px;
	background: currentcolor;
	transform: rotate(45deg);
	transform-origin: right center;
}

/* the dialog over the page, the third layer */
.search-dialog {
	width: min(40rem, calc(100vw - 2 * var(--space-2)));
	max-height: min(70vh, 36rem);
	margin: 12vh auto auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--radius-card);
	background: var(--white);
	box-shadow: var(--elevation-overlay);
	color: var(--ink);
}

.search-dialog[open] {
	display: flex;
	flex-direction: column;
}

.search-dialog::backdrop {
	background: var(--scrim);
}

.search-dialog form {
	display: flex;
	align-items: center;
	gap: var(--space-1-5);
	padding: 0 var(--space-2);
	border-bottom: var(--hairline) solid var(--rule);
	color: var(--ink-2);
}

.search-dialog input {
	flex: 1;
	min-width: 0;
	height: var(--control-height);
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: var(--text-body);
	outline: none;
}

/* the field draws no ring of its own: the rule under it turns ember and
   thickens while it has focus */
.search-dialog form:focus-within {
	box-shadow: inset 0 -2px 0 var(--ember-deep);
}

.search-dialog input::placeholder {
	color: var(--ink-2);
	opacity: 1;
}

.search-dialog input::-webkit-search-cancel-button {
	display: none;
}

.search-close {
	padding: var(--space-0) var(--space-1);
	border: var(--hairline) solid var(--rule);
	border-radius: var(--radius-control);
	background: none;
	color: var(--ink-2);
	font: inherit;
	font-size: var(--text-label);
	cursor: pointer;
}

.search-results {
	margin: 0;
	padding: var(--space-1);
	overflow-y: auto;
	list-style: none;
}

.search-results:empty {
	display: none;
}

.search-results a {
	display: grid;
	gap: 2px;
	padding: var(--space-1) var(--space-1-5);
	border-radius: var(--radius-control);
	color: var(--ink);
	text-decoration: none;
}

.search-results a:hover,
.search-results a:focus-visible {
	background: var(--white-2);
	outline-offset: -2px;
}

.search-title {
	font-size: var(--text-small);
	font-weight: 500;
}

.search-where {
	overflow: hidden;
	color: var(--ink-2);
	font-size: var(--text-label);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-status {
	margin: 0;
	padding: var(--space-1) var(--space-2);
	border-top: var(--hairline) solid var(--rule);
	color: var(--ink-2);
	font-size: var(--text-label);
}

.search-status:empty {
	display: none;
}

/* ---- the sidebar: the door, then its pages, the page you are on in ember */

.docs-nav {
	border-right: var(--hairline) solid var(--rule);
	font-size: var(--text-small);
	line-height: var(--leading-ui);
}

.docs-nav > nav {
	position: sticky;
	top: var(--header-h);
	max-height: calc(100vh - var(--header-h));
	max-height: calc(100dvh - var(--header-h));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--space-5) var(--space-3) var(--space-6) 0;
	scrollbar-width: thin;
	scrollbar-color: var(--rule) transparent;
}

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

.docs-nav nav > ul {
	display: grid;
}

/* a group stands apart from what is around it; pages sit close */
.docs-nav nav > ul > .local-group:not(:first-child),
.docs-nav nav > ul > .local-group + li {
	margin-top: var(--space-3);
}

.docs-nav .local-label {
	display: block;
	padding-bottom: var(--space-0);
	color: var(--ink);
	font-size: var(--text-label);
	font-weight: 600;
}

.docs-nav a {
	display: block;
	margin-left: calc(-1 * var(--space-1-5));
	padding: 5px var(--space-1-5);
	border-radius: var(--radius-control);
	color: var(--ink-2);
	text-decoration: none;
	transition: color var(--t), background-color var(--t);
}

.docs-nav a:hover {
	background: var(--white-2);
	color: var(--ink);
}

/* the page itself, and the page a page sits under, as a hook under PHP */
.docs-nav a[aria-current] {
	background: var(--white-2);
	color: var(--ember-deep);
	font-weight: 500;
}

.docs-nav a:focus-visible {
	outline-offset: -2px;
}

/* the door, and the other three under it */
.door-switch {
	position: relative;
	margin-bottom: var(--space-4);
}

.door-switch summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--control-height-small);
	padding: 0 var(--space-1-5);
	border: var(--hairline) solid var(--field-edge);
	border-radius: var(--radius-control);
	color: var(--ink);
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.door-switch summary::-webkit-details-marker {
	display: none;
}

.door-switch summary::after,
.toc-box summary::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	margin-right: 2px;
	border-right: 1.5px solid var(--ink-2);
	border-bottom: 1.5px solid var(--ink-2);
	transform: translateY(-2px) rotate(45deg);
}

.door-switch[open] summary::after,
.toc-box[open] summary::after {
	transform: translateY(2px) rotate(-135deg);
}

.door-switch ul {
	position: absolute;
	top: calc(100% + var(--space-0));
	left: 0;
	right: 0;
	z-index: 5;
	padding: var(--space-0);
	border-radius: var(--radius-card);
	background: var(--white);
	box-shadow: var(--elevation-overlay);
}

.door-switch a {
	margin: 0;
}

.docs-menu,
.docs-scrim {
	display: none;
}

/* ---- the page: the article, and "On this page" in the rail beside it */

main.doc,
main.reference,
main.dl {
	display: grid;
	grid-template-columns: minmax(0, var(--article-w)) var(--rail-w);
	column-gap: var(--gutter);
	align-content: start;
	padding-top: var(--space-6);
	padding-bottom: var(--space-8);
}

main.doc > *,
main.reference > *,
main.dl > * {
	grid-column: 1;
	min-width: 0;
}

.with-toc {
	display: contents;
}

/* the article keeps the first column whether or not the rail is beside it */
.with-toc > .entry {
	grid-column: 1;
	min-width: 0;
}

.toc {
	grid-column: 2;
	grid-row: 1 / span 40;
	align-self: start;
	position: sticky;
	top: calc(var(--header-h) + var(--space-6));
	max-height: calc(100vh - var(--header-h) - var(--space-6) * 2);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--rule) transparent;
	font-size: var(--text-label);
	line-height: var(--leading-ui);
}

.lede,
.reference .summary p {
	max-width: var(--measure);
	margin: var(--space-3) 0 0;
}

.reference .summary p {
	margin-top: 0;
}

.lede,
.reference .summary p {
	color: var(--ink-3);
	font-size: var(--text-intro);
	line-height: 1.5;
}

.entry {
	margin-top: var(--space-6);
}

/* a reference page opens with its summary, which is its lede */
.entry:has(> .summary:first-child) {
	margin-top: var(--space-3);
}

.reference .summary p {
	margin-bottom: var(--space-6);
}

/* the article's rhythm: more room over a heading than under it */
main h2 {
	margin: var(--space-6) 0 var(--space-2);
	scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

main h3 {
	margin: var(--space-5) 0 var(--space-1);
	scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

main h4 {
	margin: var(--space-3) 0 var(--space-0);
}

.entry > h2:first-child,
.entry > section:first-child > :first-child,
.entry > .handbook > :first-child {
	margin-top: 0;
}

.entry > section + section {
	margin-top: var(--space-6);
}

.entry > section > h2:first-child {
	margin-top: 0;
}

main p {
	margin: 0 0 var(--space-2);
}

main ul,
main ol {
	margin: 0 0 var(--space-2);
	padding-left: 1.25em;
}

main li {
	margin: 0 0 var(--space-1);
}

/* Schibsted's figures are tabular unless asked; a step's number sits
   close to its point */
main li::marker {
	color: var(--ink-2);
	font-variant-numeric: proportional-nums;
}

.fine {
	color: var(--ink-2);
	font-size: var(--text-small);
	line-height: var(--leading-ui);
}

/* "On this page" */
.toc-box summary {
	display: block;
	margin-bottom: var(--space-1);
	color: var(--ink);
	font-weight: 600;
	list-style: none;
	cursor: default;
	pointer-events: none;
}

.toc-box summary::after {
	display: none;
}

.toc-box summary::-webkit-details-marker {
	display: none;
}

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

.toc ul ul {
	padding-left: var(--space-1-5);
}

.toc li {
	margin: 0;
}

.toc a {
	display: block;
	padding: 3px 0;
	color: var(--ink-2);
	text-decoration: none;
	overflow-wrap: anywhere;
}

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

/* the section being read (docs.js) */
.toc a[aria-current] {
	color: var(--ember-deep);
	font-weight: 500;
}

/* where to edit it, and the pages either side */
.edit {
	margin-top: var(--space-5);
	font-size: var(--text-small);
}

.edit a {
	color: var(--ink-2);
}

.pager {
	display: flex;
	justify-content: space-between;
	gap: var(--space-3);
	margin-top: var(--space-5);
	padding-top: var(--space-3);
	border-top: var(--hairline) solid var(--rule);
}

.pager a {
	display: grid;
	gap: 2px;
	text-decoration: none;
}

.pager .pager-dir {
	color: var(--ink-2);
	font-size: var(--text-label);
}

.pager .pager-name {
	font-weight: 500;
}

.pager a[rel="prev"] .pager-dir::before {
	content: "← ";
}

.pager a[rel="next"] {
	margin-left: auto;
	text-align: right;
}

.pager a[rel="next"] .pager-dir::after {
	content: " →";
}

/* ---- the home: the four doors, a list between hairlines */

main.doc > .doors {
	grid-column: 1 / -1;
}

.doors {
	margin: var(--space-6) 0 0;
	padding: 0;
	border-top: var(--hairline) solid var(--rule);
	list-style: none;
}

.doors li {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr);
	gap: var(--space-1) var(--gutter);
	margin: 0;
	padding: var(--space-4) 0;
	border-bottom: var(--hairline) solid var(--rule);
}

.doors h2 {
	grid-row: span 2;
	margin: 0;
}

.doors h2 a {
	color: var(--ink);
	text-decoration: none;
}

.doors h2 a:hover {
	color: var(--ember-deep);
}

.doors p {
	margin: 0;
	color: var(--ink-3);
}

.doors .doors-first {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-0) var(--space-3);
	font-size: var(--text-small);
}

.doors .doors-first a {
	color: var(--ink-2);
}

.doors .doors-first a:hover {
	color: var(--ink);
}

/* a door's own page: its pages, each with what it covers */
.pages-group {
	margin: var(--space-5) 0 var(--space-1);
	font-family: var(--text-face);
	font-size: var(--text-small);
	font-weight: 600;
	line-height: var(--leading-ui);
	letter-spacing: 0;
}

.door .entry > .pages-group:first-child {
	margin-top: 0;
}

.pages {
	margin: 0;
	padding: 0;
	border-top: var(--hairline) solid var(--rule);
	list-style: none;
}

.pages li {
	display: grid;
	grid-template-columns: 12rem minmax(0, 1fr);
	gap: var(--space-0) var(--space-4);
	margin: 0;
	padding: var(--space-1-5) 0;
	border-bottom: var(--hairline) solid var(--rule);
	line-height: var(--leading-ui);
}

.pages a {
	color: var(--ink);
	font-weight: 500;
	text-decoration: none;
}

.pages a:hover {
	color: var(--ember-deep);
	text-decoration: underline;
}

.pages span {
	color: var(--ink-2);
	font-size: var(--text-small);
}

/* ---- pictures */

figure {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	margin: var(--space-4) 0;
	padding: var(--space-4);
	border-radius: var(--radius-card);
	background: var(--white-2);
}

figcaption {
	max-width: var(--measure);
	color: var(--ink-2);
	font-size: var(--text-label);
	line-height: var(--leading-ui);
	text-align: center;
	text-wrap: balance;
}

.device {
	display: block;
	width: min(300px, 100%);
	overflow: hidden;
	border-radius: var(--radius-frame);
	box-shadow: var(--elevation-raised);
}

.device img,
.desk {
	display: block;
	width: 100%;
	height: auto;
}

.desk {
	border-radius: var(--radius-card);
	box-shadow: var(--elevation-raised);
}

/* ---- code */

.wp-block-code,
.where pre {
	margin: 0 0 var(--space-3);
	padding: var(--space-2) var(--space-3);
	overflow: auto;
	border-radius: var(--radius-control);
	background: var(--white-2);
	box-shadow: inset 0 0 0 var(--hairline) var(--rule);
	color: var(--ink);
	font-family: var(--mono);
	font-size: var(--text-code);
	line-height: var(--leading-code);
	tab-size: 4;
	scrollbar-width: thin;
	scrollbar-color: var(--rule) transparent;
}

.wp-block-code:focus-visible {
	outline-offset: -2px;
}

.wp-block-code code,
.where pre code {
	display: block;
	padding: 0;
	background: none;
	box-shadow: none;
	font-size: inherit;
	white-space: pre;
}

.wp-block-code .row {
	display: block;
}

.wp-block-code .n {
	display: inline-block;
	min-width: 2.5em;
	margin-right: var(--space-2);
	color: var(--ink-2);
	font-variant-numeric: var(--numerals);
	text-align: right;
	user-select: none;
}

/* what a block of source is: the file, and where to read it */
.dot-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--space-1-5);
	margin-top: calc(-1 * var(--space-1-5));
	color: var(--ink-2);
	font-size: var(--text-label);
}

.dot-links > :not(:last-child)::after {
	content: "·";
	margin-left: var(--space-1-5);
}

.dot-links code {
	padding: 0;
	background: none;
	box-shadow: none;
	color: inherit;
}

.where {
	display: grid;
	gap: var(--space-2);
	margin: 0 0 var(--space-2);
	padding: 0;
	list-style: none;
}

.where li {
	min-width: 0;
	margin: 0;
	font-size: var(--text-small);
}

.where pre {
	margin: var(--space-1) 0 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* ---- tables: a rule under the head and each row */

.code-table {
	width: 100%;
	margin: var(--space-3) 0;
	border-collapse: collapse;
	font-size: var(--text-small);
	line-height: 1.55;
}

.code-table th,
.code-table td {
	padding: var(--space-1-5) var(--space-3) var(--space-1-5) 0;
	border-bottom: var(--hairline) solid var(--rule);
	text-align: left;

	/* a name, its type and what it is share one line, whatever their sizes */
	vertical-align: baseline;
}

.code-table th:last-child,
.code-table td:last-child {
	padding-right: 0;
}

.code-table th {
	padding-block: var(--space-1);
	border-bottom-color: var(--field-edge);
	color: var(--ink-2);
	font-size: var(--text-label);
	font-weight: 600;
}

.code-table tr > :first-child:nth-last-child(2) {
	width: 32%;
}

.code-table tr > :first-child:nth-last-child(3),
.code-table tr > :first-child:nth-last-child(4) {
	width: 30%;
}

.code-table td > .type {
	color: var(--ink-2);
	font-family: var(--mono);
	font-size: var(--text-mono);
	white-space: nowrap;
}

.changelog .code-table tr > :first-child {
	width: 7rem;
	white-space: nowrap;
	font-variant-numeric: var(--numerals);
}

.code-table td a {
	overflow-wrap: anywhere;
}

.code-table td:first-child code {
	display: block;
	width: fit-content;
	padding: 0;
	background: none;
	box-shadow: none;
	color: var(--ink);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.code-table td:first-child a code {
	color: inherit;
}

.code-table td:first-child .path {
	color: var(--ink-2);
	font-weight: 400;
}

/* ---- the reference */

/* a hook's title: the call itself */
.reference .code-title {
	margin-bottom: var(--space-2);
	font-family: var(--mono);
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

.code-title .hook-func,
.code-title .arg-type {
	color: var(--ink-2);
}

.code-title .arg-name {
	color: var(--ink);
}

.is-toc-heading a {
	color: inherit;
	text-decoration: none;
}

.is-toc-heading a::after {
	content: "#";
	margin-left: 0.3em;
	color: var(--ink-2);
	font-weight: 400;
	opacity: 0;
	transition: opacity var(--t);
}

.is-toc-heading a:hover::after,
.is-toc-heading a:focus-visible::after {
	opacity: 1;
}

.reference h2 code,
.reference h3 code {
	padding: 0;
	background: none;
	box-shadow: none;
	font-size: 0.9em;
}

/* parameters: the name, its type, then what it is, a hairline between each */
.parameters dl {
	margin: 0 0 var(--space-3);
	border-top: var(--hairline) solid var(--rule);
}

.parameters dt {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 var(--space-1);
	padding-top: var(--space-1-5);
}

.parameters dt > code,
.param-hash li > code {
	padding: 0;
	background: none;
	box-shadow: none;
	color: var(--ink);
	font-size: var(--text-small);
	font-weight: 600;
}

.parameters .type,
.param-hash .type,
.member .returns .type {
	color: var(--ink-2);
	font-family: var(--mono);
	font-size: var(--text-mono);
}

.param-hash .type {
	margin-left: var(--space-1);
}

.parameters .required {
	color: var(--ember-deep);
	font-size: var(--text-label);
	font-weight: 500;
}

.parameters dd {
	margin: var(--space-0) 0 0;
	padding-bottom: var(--space-1-5);
	border-bottom: var(--hairline) solid var(--rule);
	font-size: var(--text-small);
	line-height: 1.55;
}

.param-hash {
	margin: var(--space-1) 0 0;
	padding: 0 0 0 var(--space-2);
	border-left: var(--hairline) solid var(--rule);
	list-style: none;
}

.param-hash li {
	margin: 0;
	padding: var(--space-1) 0;
}

/* the JavaScript reference: a section per member of window.riff */
.member {
	padding-top: var(--space-4);
	border-top: var(--hairline) solid var(--rule);
	scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

.entry > .member + .member {
	margin-top: var(--space-4);
}

.reference .member-title {
	margin: 0 0 var(--space-1-5);
	font-family: var(--mono);
	font-size: 1.125rem;
	font-weight: 600;
}

.member-title a {
	color: var(--ink);
	text-decoration: none;
}

.member .dot-links {
	margin-top: var(--space-2);
}

/* the hooks: a search over the list it filters */
.hooks-index .intro {
	max-width: var(--measure);
	margin: var(--space-2) 0 var(--space-4);
	color: var(--ink-3);
	font-size: var(--text-intro);
	line-height: 1.5;
}

.hook-search {
	margin-bottom: var(--space-3);
}

.hook-search input {
	width: 100%;
	max-width: var(--measure-form);
	height: var(--control-height-small);
	padding: 0 var(--space-1-5);
	border: var(--hairline) solid var(--field-edge);
	border-radius: var(--radius-control);
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-size: var(--text-small);
}

.hook-search input::placeholder {
	color: var(--ink-2);
	opacity: 1;
}

.hook-search input:focus-visible {
	outline-offset: -1px;
	border-color: var(--ember-deep);
}

.hook-group[hidden],
.hook-list li[hidden] {
	display: none;
}

.hook-list {
	margin: 0;
	padding: 0;
	border-top: var(--hairline) solid var(--rule);
	list-style: none;
}

.hook-list li {
	margin: 0;
	padding: var(--space-2) 0;
	border-bottom: var(--hairline) solid var(--rule);
}

.hook-list .hook-name {
	font-family: var(--mono);
	font-size: var(--text-small);
	font-weight: 600;
	text-decoration: none;
}

.hook-list .hook-name:hover {
	text-decoration: underline;
}

.hook-list p {
	margin: var(--space-0) 0 0;
	font-size: var(--text-small);
}

.hook-list .meta {
	color: var(--ink-2);
	font-size: var(--text-label);
}

.hook-list .meta code {
	padding: 0;
	background: none;
	box-shadow: none;
	color: inherit;
}

/* a long selector or path in the running text breaks rather than widen the
   page */
.handbook :not(pre) > code {
	overflow-wrap: anywhere;
}

/* Built on the open web: a section for each feature, under its group */
.features > h2 {
	margin-bottom: 0;
}

.feature {
	padding-top: var(--space-4);
}

.feature + .feature {
	margin-top: var(--space-4);
	border-top: var(--hairline) solid var(--rule);
}

.feature > h3 {
	margin-top: 0;
}

.feature-summary {
	color: var(--ink-3);
}

/* ---- the guide and the download */

/* the guide's sections are numbered, the number hung in the margin before
   each title */
.guide .entry {
	counter-reset: step;
}

.guide .entry > h2 {
	position: relative;
}

.guide .entry > h2::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	right: calc(100% + 0.5em);
	color: var(--ink-2);
	font-variant-numeric: var(--numerals);
}

.guide .toc-box > ul {
	counter-reset: track;
}

.guide .toc-box > ul > li {
	display: flex;
	gap: var(--space-1);
}

.guide .toc-box > ul > li::before {
	counter-increment: track;
	content: counter(track);
	flex: none;
	width: 1.25em;
	padding-top: 3px;
	color: var(--ink-2);
	font-variant-numeric: var(--numerals);
}

.with-cover {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: var(--space-3);
	align-items: start;
	margin: var(--space-3) 0;
}

.with-cover img {
	display: block;
	width: 100%;
	border-radius: var(--radius-control);
}

.with-cover p {
	margin: 0;
}

.aside {
	margin-top: var(--space-5);
	padding-top: var(--space-2);
	border-top: var(--hairline) solid var(--rule);
	color: var(--ink-2);
	font-size: var(--text-small);
}

.cta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	align-items: center;
	margin: var(--space-3) 0 var(--space-1-5);
}

.btn {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-height);
	padding: 0 var(--control-pad);
	border: 1px solid var(--primary);
	border-radius: var(--radius-control);
	background: var(--primary);
	color: var(--on-primary);
	font-size: var(--text-small);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color var(--t), border-color var(--t);
}

.btn:hover {
	border-color: var(--primary-hover);
	background: var(--primary-hover);
	color: var(--on-primary);
}

/* the download: the button and its fine print, what it needs beside them,
   between two rules */
.get {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3) var(--space-5);
	align-items: start;
	margin-top: var(--space-5);
	padding: var(--space-4) 0;
	border-block: var(--hairline) solid var(--rule);
}

.get .fine {
	margin: var(--space-1-5) 0 0;
}

.get-needs {
	display: grid;
	gap: var(--space-0);
	margin: 0;
	font-size: var(--text-small);
	line-height: var(--leading-ui);
}

.get-needs div {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr);
	gap: var(--space-1-5);
}

.get-needs dt {
	color: var(--ink-2);
}

.get-needs dd {
	margin: 0;
}

.req {
	display: grid;
	gap: var(--space-0);
	margin: 0 0 var(--space-2);
	padding: 0;
	list-style: none;
}

.req li {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr);
	gap: var(--space-2);
	margin: 0;
}

.req li span:first-child {
	color: var(--ink-2);
}

/* the missing page: its one line set large */
main.lost {
	padding-top: var(--space-7);
	padding-bottom: var(--space-8);
}

.lost h1 {
	font-size: var(--text-display);
	line-height: 1;
	letter-spacing: -0.03em;
}

.lost .lede {
	margin-top: var(--space-4);
}

.lost .cta {
	margin-top: var(--space-4);
}

/* ---- the footer: one line */

footer {
	border-top: var(--hairline) solid var(--rule);
	color: var(--ink-2);
	font-size: var(--text-label);
	line-height: var(--leading-ui);
}

footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-1) var(--space-3);
	padding-block: var(--space-3);
}

footer p,
footer ul {
	margin: 0;
	padding: 0;
}

footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1) var(--space-3);
	list-style: none;
}

footer a {
	color: var(--ink-2);
	text-decoration: none;
}

footer a:hover,
footer a[aria-current] {
	color: var(--ink);
	text-decoration: underline;
}

/* what is the page's chrome cannot be selected, so select-all picks up
   words, not the bar */
.nav,
.docs-nav,
.btn,
.device,
.desk,
figure img {
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

/* ---- narrower than the three columns: "On this page" folds into a
   disclosure over the article */

@media (width < 1200px) {

	main.doc,
	main.reference,
	main.dl {
		grid-template-columns: minmax(0, var(--article-w));
	}

	.toc {
		grid-column: 1;
		grid-row: auto;
		position: static;
		max-height: none;
		margin-top: var(--space-4);
		overflow: visible;
		border-block: var(--hairline) solid var(--rule);
		font-size: var(--text-small);
	}

	.toc + .entry {
		margin-top: var(--space-5);
	}

	.toc-box summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: var(--control-height-small);
		margin: 0;
		cursor: pointer;
		pointer-events: auto;
	}

	.toc-box summary::after {
		display: block;
	}

	.toc-box > ul {
		padding-bottom: var(--space-1-5);
	}

	.toc a {
		padding: var(--space-0) 0;
	}

	.doors li {
		grid-template-columns: 12rem minmax(0, 1fr);
	}

	/* no sidebar, so no empty column for it */
	body:not(:has(> .docs-nav)) > main {
		grid-column: side-start / main-end;
		padding-left: 0;
	}
}

/* ---- a phone: one column, and the sidebar a Menu button, held at the top
   of the window, that names where you are and opens the door's pages as a
   sheet over the page */

@media (width < 900px) {

	body {
		display: flex;
		flex-direction: column;
	}

	body > main,
	body > main.wrap {
		flex: 1 0 auto;
		padding-inline: var(--page-edge);
	}

	main.doc,
	main.reference,
	main.dl,
	main.lost {
		padding-top: var(--space-4);
		padding-bottom: var(--space-6);
	}

	/* the bar scrolls away here; the Menu bar under it stays */
	.nav {
		position: relative;
	}

	.nav .wrap {
		gap: var(--space-2);
	}

	.brand .host {
		font-size: 1.25rem;
	}

	.nav nav a {
		font-size: var(--text-label);
	}

	/* search is its lens alone */
	.search {
		justify-content: center;
		width: var(--control-height-small);
		padding: 0;
		border-color: transparent;
		color: var(--ink);
	}

	.search-label,
	.search-key {
		display: none;
	}

	.search-dialog {
		margin-top: var(--space-2);
		max-height: calc(100dvh - 2 * var(--space-2));
	}

	html {
		scroll-padding-top: calc(var(--control-height) + var(--space-2));
	}

	main h2,
	main h3 {
		scroll-margin-top: calc(var(--control-height) + var(--space-2));
	}

	.entry,
	.doors {
		margin-top: var(--space-5);
	}

	main h2 {
		margin-top: var(--space-5);
	}

	.reference .summary p {
		margin-bottom: var(--space-5);
	}

	.docs-nav {
		border-right: 0;
		border-bottom: var(--hairline) solid var(--rule);
		background: var(--white);
	}

	.docs-nav > nav {
		position: static;
		max-height: none;
		padding: var(--space-2) var(--page-edge) var(--space-3);
	}

	.docs-nav.has-menu {
		position: sticky;
		top: 0;
		z-index: 30;
	}

	.docs-nav.has-menu > nav {
		display: none;
	}

	.docs-nav.has-menu.is-open > nav {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100dvh - var(--control-height) - var(--space-5));
		overflow-y: auto;
		border-bottom: var(--hairline) solid var(--rule);
		background: var(--white);
		box-shadow: var(--elevation-overlay);
	}

	.docs-nav a {
		padding-block: 10px;
	}

	.docs-menu:not([hidden]) {
		display: flex;
		align-items: center;
		gap: var(--space-1-5);
		width: 100%;
		min-height: var(--control-height);
		margin: 0;
		padding: 0 var(--page-edge);
		border: 0;
		background: none;
		color: var(--ink);
		font: 500 var(--text-small) / 1 var(--text-face);
		text-align: left;
		cursor: pointer;
	}

	.docs-menu:focus-visible {
		outline-offset: -4px;
	}

	.docs-where {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.docs-where-up {
		color: var(--ink-2);
		font-weight: 400;
	}

	.docs-where-up::after {
		content: "/";
		margin: 0 var(--space-1);
		color: var(--field-edge);
	}

	/* three lines, a cross while open */
	.docs-menu-icon,
	.docs-menu-icon::before,
	.docs-menu-icon::after {
		display: block;
		flex: none;
		width: 16px;
		height: 1.5px;
		background: currentcolor;
		transition: transform var(--t) var(--ease-out);
	}

	.docs-menu-icon {
		position: relative;
	}

	.docs-menu-icon::before,
	.docs-menu-icon::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.docs-menu-icon::before {
		top: -5px;
	}

	.docs-menu-icon::after {
		top: 5px;
	}

	.docs-menu[aria-expanded="true"] .docs-menu-icon {
		background: transparent;
	}

	.docs-menu[aria-expanded="true"] .docs-menu-icon::before {
		transform: translateY(5px) rotate(45deg);
	}

	.docs-menu[aria-expanded="true"] .docs-menu-icon::after {
		transform: translateY(-5px) rotate(-45deg);
	}

	.docs-scrim:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 25;
		background: var(--scrim);
	}

	.docs-menu-open {
		overflow: hidden;
	}

	/* the step numbers come in from the margin, before each title */
	.guide .entry > h2::before {
		position: static;
		margin-right: 0.4em;
	}

	figure {
		padding: var(--space-2);
	}

	.wp-block-code {
		margin-inline: calc(-1 * var(--page-edge));
		padding-inline: var(--page-edge);
		border-radius: 0;
		box-shadow: inset 0 var(--hairline) 0 var(--rule), inset 0 calc(-1 * var(--hairline)) 0 var(--rule);
	}

	.where pre {
		padding-inline: var(--space-2);
	}

	.doors li,
	.pages li,
	.get {
		grid-template-columns: minmax(0, 1fr);
	}

	.doors li {
		padding: var(--space-3) 0;
	}

	.doors h2 {
		grid-row: auto;
	}

	.with-cover {
		grid-template-columns: 1fr;
	}

	.with-cover img {
		width: 160px;
	}

	.req li {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.code-table thead {
		display: none;
	}

	.code-table tr {
		display: block;
		padding: var(--space-1-5) 0;
		border-bottom: var(--hairline) solid var(--rule);
	}

	/* as specific as the column widths above, so it wins over them */
	.code-table tr > :nth-child(n):nth-last-child(n) {
		display: block;
		width: auto;
		padding: 0;
		border: 0;
	}

	.code-table td + td {
		margin-top: var(--space-0);
	}

	footer .wrap {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* motion is colour and one icon; tokens.css stills both for whoever asks
   for less */
