/*
 * davidairey.com — theme styles
 *
 * 1.  Tokens
 * 2.  Base
 * 3.  Layout
 * 4.  Type
 * 5.  Links and buttons
 * 6.  Header and menu
 * 7.  Footer
 * 8.  Page head and section bars
 * 9.  Pictures and slideshows
 * 10. Home
 * 11. Work
 * 12. Project
 * 13. News
 * 14. Books
 * 15. Process, profile and text pages
 * 16. Forms
 * 17. Archive
 * 18. Client portal
 * 19. Motion
 * 20. Small screens
 * 21. Page and project text from the editor
 */


/* 1. Tokens
---------------------------------------------------------------------------- */

:root {
	--bg:      #0e0e0e;
	--fg:      #e4e4df;
	--soft:    #b5b5b0;
	--muted:   #8a8a85;
	--line:    #484845; /* fine rules between items */
	--strong:  #a3a39e; /* section rules: softer than the text */
	--btn:     var(--soft); /* button outlines */
	--surface: #171717;

	--sans: "neue-haas-grotesk-text", "Neue Haas Grotesk Text Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, monospace;

	--t-xs: 12px;
	--t-s:  15px;
	--t-b:  15px; /* body text everywhere below the page head */
	--t-m:  18px; /* page ledes only */
	--t-l:  clamp(19px, 1.5vw, 24px);
	--t-xl: clamp(36px, 4.2vw, 76px);

	--maxw: 2000px;
	--pad:  clamp(24px, 5vw, 100px);   /* side margin */
	--gut:  clamp(16px, 2.2vw, 40px);  /* column gap */
	--sec:  clamp(120px, 13vw, 220px); /* between sections */
	--rule: clamp(28px, 2.4vw, 40px);  /* below a section rule */
	--hdr:  108px;                     /* header height */

	--ease: cubic-bezier(.22, .61, .36, 1);
	--slow: .7s;

	color-scheme: dark;
}

:root[data-theme="light"] {
	--bg:      #e6e3dc; /* a warm light grey, easier on the eye than white */
	--fg:      #1b1a18;
	--soft:    #45423d;
	--muted:   #6c6862;
	--line:    #c9c4b9;
	--strong:  #2a2825; /* section rules: near black */
	--hover:   #8a857d; /* links fade to this as they're hovered */
	--btn:     #8a857d; /* button outlines */
	--surface: #dad6cd;

	color-scheme: light;
}


/* 2. Base
---------------------------------------------------------------------------- */

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

html {
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 400 var(--t-b)/1.5 var(--sans);
	-webkit-font-smoothing: antialiased;
	transition: background-color .9s var(--ease), color .9s var(--ease);
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote {
	margin: 0;
}

ul, ol {
	padding: 0;
	list-style: none;
}

h1, h2, h3 {
	font-weight: 500;
	text-wrap: balance;
}

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

img {
	display: block;
	max-width: 100%;
}

::selection {
	background: var(--fg);
	color: var(--bg);
}

:focus-visible {
	outline: 1px solid var(--fg);
	outline-offset: 4px;
}

[hidden] {
	display: none !important;
}

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


/* 3. Layout
---------------------------------------------------------------------------- */

.wrap {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--pad);
}

/* Eight columns throughout; four on small screens */
.g {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	column-gap: var(--gut);
}


.s1-4 { grid-column: 1 / 4; }
.s1-5 { grid-column: 1 / 5; }
.s1-7 { grid-column: 1 / 7; }
.s1-9 { grid-column: 1 / -1; }


.s4-9 { grid-column: 4 / -1; }

.s5-9 { grid-column: 5 / -1; }
.s6-9 { grid-column: 6 / -1; }

.sec {
	padding-top: var(--sec);
}

/* Jumping to a section leaves the same room above its rule as below */
[id] {
	scroll-margin-top: var(--rule);
}

/* Homepage: links that close a list sit beneath it */
.body > .after {
	display: grid;
	gap: 1em;
	margin-top: 64px;
}

.body > .after-rule {
	padding-top: var(--rule);
}

/* A short note, a quarter of the page wide, from the centre */
.split .quarter {
	grid-column: 5 / -1;
}

.split .quarter > * {
	max-width: calc((100% - var(--gut)) / 2);
}

/* Label in the left half, content in the right, each under its own rule */
.split {
	align-items: start;
}

.split > .side,
.split > .body {
	padding-top: var(--rule);
	border-top: 1px solid var(--strong);
}

.split > .side {
	display: grid;
	justify-items: start;
	gap: 20px;
	grid-column: 1 / 5;
	padding-right: var(--gut);
}

.split > .body {
	grid-column: 5 / -1;
}

.measure {
	max-width: 36em;
}

/* The last section on a page keeps the same space before the footer */
[data-end],
#main > :last-child:not(.close):not(.post):not(.head) {
	padding-bottom: var(--sec);
}

/* A lede beside a section heading, as in the page head */
.g > .lede {
	margin-top: 32px;
}


/* 4. Type
---------------------------------------------------------------------------- */

.xl {
	margin-left: -.05em; /* optical: large capitals sit in from the edge */
	font-size: var(--t-xl);
	line-height: 1.04;
	letter-spacing: -.03em;
}

.lede {
	color: var(--soft);
	font-size: var(--t-m);
}

.mono {
	font: 400 var(--t-xs)/1.5 var(--mono);
	letter-spacing: .04em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}

.mono .n {
	margin-right: 16px;
	color: var(--muted);
}

.soft  { color: var(--soft); }
.muted { color: var(--muted); }
.small { font-size: var(--t-s); }

/* Attributions: the name, with the role beneath it */
.who {
	display: grid;
	gap: 2px;
}

/* Opening quote marks hang outside the text edge */
.quote p:first-child,
p.quote {
	text-indent: -.34em;
}


/* 5. Links and buttons
---------------------------------------------------------------------------- */

a {
	color: inherit;
	text-decoration: none;
}

/* Links change tone, slowly: white ones dim to grey, grey ones brighten
   to white. No underlines, so line spacing stays as it is. */
.ul {
	transition: color var(--slow) var(--ease);
}

.ul:hover {
	color: var(--soft);
}

/* Links take the tone of the text around them. Grey ones brighten to
   white on hover. */
a.soft:hover,
a.muted:hover,
.soft .ul:hover,
.muted .ul:hover,
.lede .ul:hover,
.copy .ul:hover,
.prose .ul:hover,
.site-foot .ul:hover,
.buy a:hover {
	color: var(--fg);
}

a.soft,
a.muted {
	transition: color var(--slow) var(--ease);
}

.buy a {
	color: var(--soft);
}

/* Long articles keep a faint underline, so links stand out mid-sentence */
.post .prose a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .3em;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

/* External links get a small arrow, up and to the right */
.ext::after {
	content: "";
	display: inline-block;
	width: .62em;
	height: .62em;
	margin-left: .32em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.3'%3E%3Cpath d='M3 9 9 3M4 3h5v5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.3'%3E%3Cpath d='M3 9 9 3M4 3h5v5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Square-cornered, outlined buttons that fill on hover.
   Their edges line up with the grid and the rules. */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid var(--btn);
	background: transparent;
	color: var(--fg);
	font: 400 var(--t-s)/1 var(--sans);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease), border-color var(--slow) var(--ease);
}

.btn:hover {
	border-color: var(--fg);
	background: var(--fg);
	color: var(--bg);
}

.icon-btn {
	width: 42px;
	padding: 0;
	border-color: var(--line);
}

.icon-btn:hover {
	border-color: var(--fg);
	background: transparent;
	color: var(--fg);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
}


/* 6. Header and menu
---------------------------------------------------------------------------- */

.site-head {
	align-items: center;
	min-height: var(--hdr);
	border-bottom: 1px solid var(--line);
	font-size: var(--t-s);
}

/* The header leaves as you scroll down and fades back in as you scroll up */
header.site-head {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--bg);
	transition: opacity .9s var(--ease), transform .9s var(--ease), visibility 0s;
}

.tucked header.site-head {
	opacity: 0;
	transform: translateY(-12px);
	visibility: hidden;
	pointer-events: none;
	transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}

.site-head .name {
	grid-column: 1 / 5;
	justify-self: start;
	transition: color var(--slow) var(--ease);
}

.site-head .name:hover {
	color: var(--soft);
}

.site-nav {
	display: flex;
	grid-column: 5 / -1;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.nav-link {
	color: var(--soft);
	transition: color var(--slow) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
	color: var(--fg);
}

/* Sun in dark mode, moon in light */
.theme-toggle .moon,
:root[data-theme="light"] .theme-toggle .sun {
	display: none;
}

:root[data-theme="light"] .theme-toggle .moon {
	display: block;
}

.menu-bar {
	display: none;
	justify-self: end;
	gap: 10px;
}

.menu {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	background: var(--bg);
}

.menu-in {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.menu .site-head {
	display: flex;
	justify-content: space-between;
}

.menu nav {
	display: flex;
	flex-direction: column;
	padding-top: 12px;
}

.menu nav a {
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
	font-size: 24px;
	letter-spacing: -.015em;
}

.menu .btn {
	align-self: flex-start;
	margin-top: 40px;
}

.menu .mono {
	margin-top: auto;
	padding: 48px 0 32px;
}


/* 7. Footer
---------------------------------------------------------------------------- */

.site-foot {
	align-items: center;
	row-gap: 16px;
	min-height: var(--hdr);
	padding-block: 32px 96px;
	border-top: 1px solid var(--line);
}

.site-foot > p {
	grid-column: 1 / 5;
	color: var(--muted);
}

.site-foot nav {
	display: flex;
	flex-wrap: wrap;
	grid-column: 5 / -1;
	gap: 12px 28px;
	color: var(--soft);
}

/* Client login sits apart, at the right edge */
.site-foot .login {
	margin-left: auto;
}


/* 8. Page head and section bars
---------------------------------------------------------------------------- */

.head {
	row-gap: 32px;
	padding-block: clamp(96px, 10vw, 180px) clamp(80px, 9vw, 160px);
}

.head .mono {
	grid-column: 1 / -1;
	color: var(--muted);
}

.head .xl {
	grid-column: 1 / 7;
}

.head .lede,
.head .extra {
	grid-column: 5 / -1;
	max-width: 36em;
	margin-top: 32px;
}

.head .extra {
	margin-top: 16px;
}

/* A numbered label under a full-width rule, as with every section */
.bar {
	display: flex;
	flex-wrap: wrap;
	grid-column: 1 / -1;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: var(--rule);
	border-top: 1px solid var(--strong);
}

.bar .muted {
	margin-left: auto;
}


/* 9. Pictures and slideshows
---------------------------------------------------------------------------- */

.ph {
	display: block;
	background: var(--t, var(--surface));
}

.r16x8 { aspect-ratio: 16 / 8; }
.r16x7 { aspect-ratio: 16 / 7; }
.r4x3  { aspect-ratio: 4 / 3; }
.r3x2  { aspect-ratio: 3 / 2; }
.r4x5  { aspect-ratio: 4 / 5; }
.r3x4  { aspect-ratio: 3 / 4; }
.r1x1  { aspect-ratio: 1 / 1; }
.r16x9 { aspect-ratio: 16 / 9; }

/* A frame shows its first picture; on hover, the others fade in over it */
.frame {
	display: block;
	position: relative;
	overflow: hidden;
	background: var(--surface);
}

.frame > .ph {
	position: absolute;
	inset: 0;
}

.frame > .cy {
	opacity: 0;
	transition: opacity 1.2s var(--ease);
}

.frame > .cy.on {
	opacity: 1;
}


/* Covers at their trim sizes, bottoms aligned. The Identity Designed books
   (8.5 × 10 in) fill the shelf; the others are scaled from them. */
.shelf {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 17 / 20;
}

.b-id  { width: 100%;  aspect-ratio: 17 / 20; } /* 8.5 × 10 in */
.b-ldl { width: 82.4%; aspect-ratio: 7 / 9; }   /* 7 × 9 in */
.b-wfm { width: 64.7%; aspect-ratio: 11 / 17; } /* 5.5 × 8.5 in */

/* Book covers and spreads get a hairline so dark ones hold their edge */
.cover,
.spread {
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent);
}


/* 10. Home
---------------------------------------------------------------------------- */

.tiles {
	row-gap: clamp(96px, 11vw, 200px);
}

.tiles .bar {
	margin-bottom: calc(var(--rule) - clamp(96px, 11vw, 200px));
}

.tile {
	display: grid;
	grid-template-columns: subgrid; /* the tile's own columns, on the page grid */
	align-content: start;
	row-gap: 20px;
}

.tile > .frame {
	grid-column: 1 / -1;
}

/* The name in the first column, its line in the next two */
.tile .title {
	grid-column: 1 / 2;
	font-weight: 500;
	transition: color .8s var(--ease);
}

.tile:hover .title {
	color: var(--muted);
}

.tile .line {
	grid-column: 2 / span 2;
	padding-right: var(--gut);
	color: var(--soft);
}

.drop    { margin-top: clamp(0px, 14vw, 260px); }
.drop-sm { margin-top: clamp(0px, 10vw, 180px); }

/* Index: the list on the left, a picture of the hovered project on the right */
.index {
	align-items: start;
	row-gap: var(--rule);
}

.index li:first-child a {
	padding-top: 0;
}

.index ul {
	grid-column: 1 / 5;
}

.index li a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto 24px;
	align-items: baseline;
	gap: 16px;
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
	color: var(--soft);
	font-size: var(--t-l);
	letter-spacing: -.01em;
	transition: color var(--slow) var(--ease);
}

.index li a:hover,
.index li a.on {
	color: var(--fg);
}

.index .arrow {
	font-size: var(--t-s);
	text-align: right;
	transition: transform var(--slow) var(--ease);
}

.index li a:hover .arrow {
	transform: translateX(6px);
}

.index .preview {
	position: sticky;
	top: calc(var(--hdr) + 40px);
	grid-column: 6 / -1;
	padding-bottom: 28px; /* where it stops, its caption sits level with the last project */
}

.index .preview .mono {
	margin-top: 24px;
	color: var(--muted);
}

.points {
	grid-column: 1 / -1;
	margin-top: clamp(56px, 5vw, 88px);
	border-top: 1px solid var(--strong);
}

.points li {
	display: grid;
	align-content: start;
	gap: 14px;
	grid-column: span 2;
	padding: var(--rule) var(--gut) 48px 0;
	border-bottom: 1px solid var(--line);
}

.points h3 {
	font-size: var(--t-b);
}

.points p {
	color: var(--soft);
}

/* Testimonials in even columns */
.voices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 64px var(--gut);
}

.voice {
	display: grid;
	align-content: start;
	gap: 20px;
	padding-right: 16px;
}

.voice blockquote {
	color: var(--fg);
}


.voice blockquote p + p {
	margin-top: 1em;
}

.voice figcaption {
	color: var(--fg);
}

.logos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--gut);
	margin-top: calc(var(--rule) * -1); /* the cells carry their own padding */
}

.logos li {
	display: grid;
	place-items: center;
	aspect-ratio: 3 / 2;
	border-bottom: 1px solid var(--line);
}

.logos li span {
	width: 52%;
	height: 22%;
	background: var(--muted);
	opacity: .35;
}

.notes li {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	gap: 16px;
	padding: 0 var(--gut) var(--rule) 0;
	border-bottom: 1px solid var(--line);
}

.notes li + li {
	padding-top: var(--rule);
}

.notes .mono {
	padding-top: 5px;
	color: var(--muted);
}

.covers {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--gut);
}

.covers a {
	display: grid;
	align-content: start;
	gap: 16px;
	font-size: var(--t-s);
	line-height: 1.4;
}

.close {
	row-gap: 32px;
	padding-bottom: var(--sec);
}

.close.ruled {
	border-top: 1px solid var(--line);
}

.close .xl {
	grid-column: 1 / 7;
}

.close .actions {
	grid-column: 5 / -1;
	margin-top: 40px;
}


/* 11. Lists: services, clients, resources


/* Resources: a link with its note beside it */
.links li {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px var(--gut);
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
	font-size: var(--t-s);
}

.links li:first-child {
	padding-top: 0;
}

.fig {
	width: 100%;
	margin-top: 8px;
}

.post .fig,
.prose > .ph {
	margin-block: 2.4em;
}

.post:has(+ .close) {
	padding-bottom: 0;
}

/* A picture beside the start of an article, three columns wide */
.post {
	align-items: start;
}

.post .aside {
	grid-column: 1 / 4;
	grid-row: 1;
}

.post .aside figcaption {
	padding-top: 10px;
	color: var(--muted);
	font-size: var(--t-xs);
}

.post .aside ~ .prose {
	grid-row: 1;
}

.fig figcaption {
	padding-top: 10px;
	color: var(--muted);
	font-size: var(--t-xs);
}

.side > h2:not(.mono) {
	font-size: var(--t-b);
	font-weight: 400;
}

.side .fig {
	max-width: 320px;
}

/* Resources: the label in the first quarter, the picture in the second.
   Hovering a link shows its picture, which stays in view down long lists. */
.res .side {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	align-self: stretch;
	column-gap: var(--gut);
}

.res .hover-pic {
	position: sticky;
	top: calc(var(--hdr) + 32px);
	max-width: none;
}

.hover-pic .ph {
	transition: opacity .9s var(--ease);
}


/* 12. Project
---------------------------------------------------------------------------- */

.facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px var(--gut);
	padding-top: 24px;
	border-top: 1px solid var(--line);
	font-size: var(--t-s);
}

.facts dt {
	margin-bottom: 8px;
	color: var(--muted);
}

.story {
	row-gap: 64px;
	padding-block: var(--sec);
}

.story h2 {
	grid-column: 1 / 5;
	padding-top: 6px;
	color: var(--muted);
}

.story p {
	grid-column: 5 / -1;
	max-width: 34em;
	padding-right: var(--gut);
	color: var(--soft);
}

.gallery {
	row-gap: clamp(80px, 9vw, 160px);
}

.next {
	align-items: baseline;
	row-gap: 24px;
	padding-block: 32px var(--sec);
	border-top: 1px solid var(--line);
}

.next .big {
	grid-column: 5 / -1;
	font-size: clamp(24px, 2.4vw, 40px);
	letter-spacing: -.02em;
}


/* 13. News
---------------------------------------------------------------------------- */

.entries {
	border-top: 1px solid var(--strong);
}

.entry {
	row-gap: 20px;
	padding-block: 40px 44px;
	border-bottom: 1px solid var(--line);
}

.entry .date { grid-column: 1 / 3; color: var(--soft); }
.entry .tag  { grid-column: 3 / 5; color: var(--muted); }

.entry .text {
	display: grid;
	justify-items: start;
	gap: 14px;
	grid-column: 5 / -1;
	padding-right: var(--gut);
}

.entry .text p {
	max-width: 32em;
}

.entry .ph {
	grid-column: 5 / 8;
	margin-top: 12px;
}

.pager {
	align-items: baseline;
	row-gap: 16px;
	padding-block: 32px 0;
}

.signup {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 24px;
	max-width: 32em;
	margin-top: 28px;
}

.signup .field-wrap {
	flex: 1 1 240px;
}

.signup input {
	padding-inline: 0;
	border: 0;
	border-bottom: 1px solid var(--soft);
	background: transparent;
}


/* 14. Books
---------------------------------------------------------------------------- */

/* One book: cover on the left, text from the middle, spreads beneath */
.book {
	row-gap: clamp(56px, 6vw, 96px);
	padding-block: clamp(56px, 6vw, 96px) clamp(80px, 8vw, 140px);
	border-top: 1px solid var(--line);
}

/* Every book gets the same panel, two columns wide like the first spread.
   The cover sits inside it at its true size, so the panels line up. */
.book .panel,
.book .shelf {
	grid-column: 1 / 3;
	align-self: start;
}

.panel {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 5;
	background: var(--surface);
}

.panel .b-id  { width: 62%; }
.panel .b-ldl { width: 51%; }
.panel .b-wfm { width: 40%; }

.book .tx {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 22px;
	grid-column: 5 / -1;
}

.book .tx h2 {
	font-size: var(--t-l);
	line-height: 1.2;
	letter-spacing: -.01em;
}

.book .sub {
	margin-top: -10px;
	color: var(--soft);
	font-size: var(--t-s);
}

.book .quotes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px var(--gut);
	width: 100%;
	margin-top: 18px; /* a little more room below the subtitle */
}

.book .quotes.wide {
	margin-top: 0;
}

.split .reviews-col .quotes {
	width: calc((100% - var(--gut)) / 2);
}

.split .paras {
	display: grid;
	gap: 1em;
}

.reviews-col .quotes.wide {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

.reviews-col blockquote + blockquote {
	padding-top: 64px;
}

.reviews-col blockquote {
	max-width: none;
}

.reviews-col cite {
	display: grid;
	gap: 4px;
	margin-top: 24px;
}

/* About the book: the blurb, then the studios in two columns */
.book .blurb {
	max-width: 36em;
}

.studios {
	display: grid;
	gap: 14px;
	width: 100%;
}

.studios ul {
	columns: 2;
	column-gap: var(--gut);
	color: var(--soft);
}

/* The other books, to finish the page */
.other-books {
	row-gap: 0;
}

.other-books article {
	grid-column: span 2;
	padding-top: var(--rule);
}

.other-books a {
	display: grid;
	gap: 10px;
}

.other-books .panel {
	margin-bottom: 12px;
}

.other-books .t {
	transition: color var(--slow) var(--ease);
}

.other-books a:hover .t {
	color: var(--soft);
}

.other-books .sub {
	color: var(--soft);
	font-size: var(--t-s);
}

.book blockquote {
	max-width: 34ch;
	color: var(--soft);
}

.book cite {
	margin-top: 14px;
	color: var(--fg);
	font-style: normal;
}

.book .in {
	color: var(--soft);
	font-size: var(--t-s);
}

.book .in b {
	color: var(--fg);
	font-weight: 400;
}

/* Book layout options (draft) */
.opt-b {
	align-items: center;
}

.opt-b .panel {
	display: grid;
	grid-column: 1 / 5;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: var(--surface);
}

.opt-b .panel .cover {
	width: 46%;
}

.opt-b .tx {
	align-content: center;
}

.opt-c {
	row-gap: 56px;
	padding-top: clamp(56px, 6vw, 96px);
}

.opt-c article {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 12px;
	grid-column: span 2;
}

.opt-c .cover {
	width: 100%;
	margin-bottom: 12px;
}

.opt-c h2 {
	font-size: var(--t-m);
	line-height: 1.3;
}

.opt-c .sub {
	color: var(--soft);
	font-size: var(--t-s);
}

/* Buy links: a label, then every shop and the publisher */
.buy {
	display: grid;
	gap: 10px;
	margin-top: 10px;
}

.buy ul {
	display: grid;
	gap: 6px;
}

.spreads {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(28px, 2.6vw, 40px) var(--gut);
}

.spreads figcaption {
	padding-top: 12px;
	color: var(--muted);
	font-size: var(--t-xs);
}

.sites {
	row-gap: 80px;
	padding-block: var(--sec);
}

[data-view="book"] .book:first-of-type {
	border-top-color: var(--strong);
}


/* After a section that ends without its own bottom space */
.split + .next {
	margin-top: var(--sec);
}

[data-view="book"] .spreads {
	margin-top: var(--rule);
}

/* The latest posts: picture over two columns, then the name, then the studio */
.site .latest {
	margin-top: var(--rule);
	padding-left: calc(50% + var(--gut) / 2); /* above the names */
}

.site-list {
	margin-top: 14px;
}

.site-list a {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: start;
	column-gap: var(--gut);
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.site-list li:first-child a {
	padding-top: 0;
}

.site-list .frame { grid-column: 1 / 3; }
.site-list .who   { grid-column: 3 / -1; }

.site-list .name {
	transition: color var(--slow) var(--ease);
}

.site-list a:hover .name {
	color: var(--soft);
}

/* A short stack: text, then a link beneath it */
.stack {
	display: grid;
	justify-items: start;
	gap: 16px;
}

.details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px var(--gut);
	width: 100%;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	font-size: var(--t-s);
}

.details dt {
	margin-bottom: 6px;
	color: var(--muted);
}


/* 15. Process, profile and text pages
---------------------------------------------------------------------------- */

.steps li {
	row-gap: 16px;
	padding-block: var(--rule) clamp(48px, 5vw, 80px);
	border-top: 1px solid var(--line);
}

.steps li:first-child {
	border-top-color: var(--strong);
}

.steps h2 {
	grid-column: 1 / 5;
	font-size: var(--t-m);
}

.steps .n {
	display: block;
	margin-bottom: 10px;
	color: var(--muted);
}

.steps .copy,
.prose {
	display: grid;
	gap: 1em;
	grid-column: 5 / -1;
	max-width: 36em;
	padding-right: var(--gut);
	color: var(--soft);
}

.steps .copy {
	font-size: var(--t-s);
	line-height: 1.65;
}

.copy ul,
.prose ul {
	display: grid;
	gap: .4em;
	padding-left: 1.1em;
	list-style: "— ";
}

.prose h2 {
	margin-top: 1.4em;
	color: var(--fg);
	font-size: var(--t-b);
}

.terms {
	padding-top: var(--rule);
	border-top: 1px solid var(--strong);
}

.terms .prose > h2:first-child {
	margin-top: 0;
}

.label {
	margin-bottom: 20px;
}


/* Profile: a label, then up to three quarter-width cells */
.quarters {
	align-items: start;
	row-gap: 32px;
	padding-top: var(--rule);
	border-top: 1px solid var(--strong);
	margin-top: var(--sec);
}

.quarters:first-of-type {
	margin-top: 0;
}

.quarters > h2 {
	grid-column: 1 / 3;
	font-size: var(--t-b);
	font-weight: 400;
}
.quarters > .q { grid-column: span 2; padding-right: var(--gut); }
.quarters > .q2 { grid-column: span 4; }
.quarters > .q3 { grid-column: 3 / -1; }
.quarters > .portrait { grid-column: 5 / -1; }

/* A white first line, then grey ones */
.quarters {
	line-height: 1.45;
}

.tones + .tones {
	margin-top: 1.2em;
}

.prose-s {
	display: grid;
	gap: 1em;
}

/* The book's shops on the left; the sample from halfway across */
.ask {
	display: grid;
	gap: 32px;
	margin-block: 56px;
}

.ask .pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px var(--gut);
}

.q2 figcaption {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gut);
	padding-top: 16px;
}

.talks li {
	display: grid;
	margin-bottom: 1.1em;
}

.voices.thirds {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* 16. Forms
---------------------------------------------------------------------------- */

label.mono {
	display: block;
	color: var(--muted);
}

input,
textarea,
select {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: var(--fg);
	font: 400 var(--t-b)/1.6 var(--sans);
	transition: border-color var(--slow) var(--ease), background-color .9s var(--ease);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--soft);
	outline: none;
}

textarea {
	resize: vertical;
}

select {
	appearance: none;
	padding-right: 40px;
	background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
}

::placeholder {
	color: var(--muted);
	opacity: 1;
}

.enquiry {
	align-items: start;
	padding-bottom: var(--sec);
	border-top: 1px solid var(--strong);
}

.enquiry .side {
	display: grid;
	align-content: start;
	gap: 48px;
	grid-column: 1 / 5;
	padding-right: var(--gut);
}

.enquiry .side > p:only-child {
	padding-top: var(--rule);
}

.enquiry form {
	display: grid;
	gap: 40px;
	grid-column: 5 / -1;
	padding-top: var(--rule);
}


/* 17. Archive
---------------------------------------------------------------------------- */

.year {
	align-items: start;
	padding-bottom: 64px;
}

.year li a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 24px;
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
}

.year li:first-child a {
	padding-top: 0;
}

.year .mono {
	color: var(--muted);
	white-space: nowrap;
}

.year li a:hover span:first-child {
	color: var(--soft);
}

.post {
	padding-bottom: var(--sec);
}

.post .prose {
	line-height: 1.65;
}

.comments li {
	display: grid;
	gap: 12px;
	padding: 0 var(--gut) var(--rule) 0;
	border-bottom: 1px solid var(--line);
}

.comments li + li {
	padding-top: var(--rule);
}

.comments .who-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 16px;
	font-size: var(--t-s);
}

.comments p {
	max-width: 34em;
	color: var(--soft);
	font-size: 16px;
	line-height: 1.65;
}

.more-comments {
	margin-top: 32px;
}


/* 18. Client portal
---------------------------------------------------------------------------- */

.portal {
	align-items: start;
	padding-bottom: var(--sec);
	border-top: 1px solid var(--strong);
}

.portal nav {
	display: grid;
	grid-column: 1 / 3;
	padding-top: var(--rule);
	font-size: var(--t-s);
}

.portal nav a {
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	color: var(--soft);
	transition: color var(--slow) var(--ease);
}

.portal nav a:hover,
.portal nav a[aria-current="true"] {
	color: var(--fg);
}

.portal .main {
	display: grid;
	gap: 56px;
	grid-column: 5 / -1;
	padding-top: var(--rule);
}

.portal .intro {
	max-width: 36em;
	color: var(--soft);
}

/* Sign-in fields no wider than the line of text above them */
.signin form {
	grid-column: 5 / 8;
}

.ask-david {
	display: grid;
	gap: 20px;
}

/* Logo files and colours share one format: four squares to a row, one
   grid column each, with the name and details beneath */
.assets,
.swatches {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px var(--gut);
}

.assets li,
.swatches li {
	display: grid;
	align-content: start;
	gap: 6px;
	font-size: var(--t-s);
}

.assets .ph,
.swatches .ph {
	margin-bottom: 8px;
	box-shadow: 0 0 0 1px var(--line);
}


/* Archive: a post's pictures float on the left as its title is hovered */
.float-pic {
	position: fixed;
	top: 0;
	left: var(--pad);
	z-index: 5;
	width: min(28vw, 480px);
	opacity: 0;
	will-change: transform;
	pointer-events: none;
	transition: opacity .9s var(--ease);
}

.float-pic .frame > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover; /* fill the frame, cropping as needed */
}

.float-pic.on {
	opacity: 1;
}


/* 19. Motion
---------------------------------------------------------------------------- */

/* Pieces fade up as they come into view (site.js adds .in) */
.rise {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

.rise.in {
	opacity: 1;
	transform: none;
}

.rise.now {
	transition: none;
}

/* Each page fades in when it opens */
main[data-view]:not([hidden]) {
	animation: arrive .7s var(--ease);
}

@keyframes arrive {
	from { opacity: 0; }
}

/* Colours fade slowly when the theme changes */
.site-head,
.site-foot,
.bar,
.split > *,
.entry,
.entries,
.index li a,
.points,
.points li,
.notes li,
.logos li,
.steps li,
.year li a,
.comments li,
.book,
.next,
.enquiry,
.portal,
.portal nav a,
.facts,
.details,
.site-list a,
.btn {
	transition-property: border-color, background-color, color, text-decoration-color, opacity, transform;
	transition-duration: .9s;
	transition-timing-function: var(--ease);
}

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

	.rise {
		opacity: 1;
		transform: none;
	}
}



/* 21. Page and project text from the editor
---------------------------------------------------------------------------- */

/* Real pictures fill their frames, cropped to fit */
img.ph {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: var(--surface);
}

.frame > img.ph {
	position: absolute;
	inset: 0;
}

/* A picture drawn at its own shape (r3x2 and so on) rather than in a frame */
img.ph[class*=" r"] {
	height: auto;
}

img.cover {
	height: auto;
	object-fit: contain;
	background: none;
}

.hp {
	position: absolute;
	left: -9999px;
}

.sent {
	margin-block: 56px;
	color: var(--fg);
}

.not-found-links {
	display: grid;
	gap: 6px;
}

.book .panel-link {
	grid-column: 1 / 3;
	align-self: start;
}

.book .tx h2 a {
	color: inherit;
}

.quarters > .portrait {
	grid-column: 5 / -1;
}

.book-fig {
	display: flex;
	align-items: center;
	justify-content: center;
}

.book-fig .cover {
	width: 30%;
}

/* Articles and pages: text in the right half, pictures as placed */
.post {
	align-items: start;
	row-gap: 1em;
	color: var(--soft);
	line-height: 1.65;
}

.post > *,
.work-text > * {
	grid-column: 5 / -1;
	max-width: 36em;
	padding-right: var(--gut);
}

.post > h2,
.post > h3 {
	margin-top: 1.4em;
	color: var(--fg);
	font-size: var(--t-b);
}

.post > ul,
.post > ol,
.work-text > ul {
	display: grid;
	gap: .4em;
	padding-left: 1.1em;
	list-style: "— ";
}

.post a:not(.btn) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .3em;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.post .ul:hover {
	color: var(--fg);
}

.post > figure,
.work-text > figure {
	max-width: none;
	margin-block: 2.4em;
	padding-right: 0;
}

.post figure img,
.work-text figure img {
	display: block;
	width: 100%;
	height: auto;
}

.post figcaption,
.work-text figcaption {
	padding-top: 10px;
	color: var(--muted);
	font-size: var(--t-xs);
}

/* Older posts: pictures and captions inside paragraphs */
.post img {
	max-width: 100%;
	height: auto;
}

.post p:has(> img),
.post .wp-caption {
	margin-block: 2.4em;
}

.post .wp-caption {
	width: auto !important;
	max-width: none;
}

.post .wp-caption-text {
	padding-top: 10px;
	color: var(--muted);
	font-size: var(--t-xs);
}

/* "Beside the text": the left columns, level with the paragraph that follows */
.post > .is-style-da-aside {
	grid-column: 1 / 4;
	grid-row-end: span 8;
	margin-block: 0;
}

/* Projects: a column of text, and pictures across the grid */
.work-text {
	align-items: start;
	row-gap: 1em;
	padding-top: var(--rule);
	color: var(--soft);
}

.work-text > p + figure,
.work-text > figure + p {
	margin-top: clamp(64px, 7vw, 120px);
}

.work-text > figure {
	grid-column: 1 / -1;
	margin-block: clamp(48px, 6vw, 112px) 0;
}

.work-text > h2 {
	margin-top: 2em;
	color: var(--muted);
	font: 400 var(--t-xs)/1.5 var(--mono);
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* Picture placements from the editor's image styles */
.is-style-da-full  { grid-column: 1 / -1 !important; }
.is-style-da-left  { grid-column: 1 / 5 !important; }
.is-style-da-right { grid-column: 5 / -1 !important; margin-top: clamp(0px, 10vw, 180px) !important; }
.is-style-da-inset { grid-column: 3 / -1 !important; }

/* Picture placements carried over from Semplice (columns on the 8-column grid) */
.c1-2 { grid-column: 1 / 2 !important; }
.c1-3 { grid-column: 1 / 3 !important; }
.c1-4 { grid-column: 1 / 4 !important; }
.c1-5 { grid-column: 1 / 5 !important; }
.c1-6 { grid-column: 1 / 6 !important; }
.c1-7 { grid-column: 1 / 7 !important; }
.c1-8 { grid-column: 1 / 8 !important; }
.c1-9 { grid-column: 1 / 9 !important; }
.c2-3 { grid-column: 2 / 3 !important; }
.c2-4 { grid-column: 2 / 4 !important; }
.c2-5 { grid-column: 2 / 5 !important; }
.c2-6 { grid-column: 2 / 6 !important; }
.c2-7 { grid-column: 2 / 7 !important; }
.c2-8 { grid-column: 2 / 8 !important; }
.c2-9 { grid-column: 2 / 9 !important; }
.c3-4 { grid-column: 3 / 4 !important; }
.c3-5 { grid-column: 3 / 5 !important; }
.c3-6 { grid-column: 3 / 6 !important; }
.c3-7 { grid-column: 3 / 7 !important; }
.c3-8 { grid-column: 3 / 8 !important; }
.c3-9 { grid-column: 3 / 9 !important; }
.c4-5 { grid-column: 4 / 5 !important; }
.c4-6 { grid-column: 4 / 6 !important; }
.c4-7 { grid-column: 4 / 7 !important; }
.c4-8 { grid-column: 4 / 8 !important; }
.c4-9 { grid-column: 4 / 9 !important; }
.c5-6 { grid-column: 5 / 6 !important; }
.c5-7 { grid-column: 5 / 7 !important; }
.c5-8 { grid-column: 5 / 8 !important; }
.c5-9 { grid-column: 5 / 9 !important; }
.c6-7 { grid-column: 6 / 7 !important; }
.c6-8 { grid-column: 6 / 8 !important; }
.c6-9 { grid-column: 6 / 9 !important; }
.c7-8 { grid-column: 7 / 8 !important; }
.c7-9 { grid-column: 7 / 9 !important; }
.c8-9 { grid-column: 8 / 9 !important; }

/* Two pictures side by side keep their own heights */
.work-text > figure.c-pair {
	align-self: start;
}



/* Light: hovered links fade clearly to a lighter grey (in dark, white links
   dim to grey and grey ones brighten to white) */
:root[data-theme="light"] a:not(.btn):not(.tile):hover,
:root[data-theme="light"] a:not(.btn):hover :is(.name, .t),
:root[data-theme="light"] .tile .title:hover,
:root[data-theme="light"] .index li a:hover span:first-child,
:root[data-theme="light"] .year li a:hover span:first-child {
	color: var(--hover);
}

/* The first rule under every page head sits the same distance below it */
.head + * {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.head + .quarters,
.head + .split > .side,
.head + .split > .body {
	padding-top: var(--rule) !important;
}

/* Books: a section rule between each book */
.book {
	border-top-color: var(--strong);
}

/* As much room after the last review as between the subtitle and the first */
.book .quotes {
	margin-bottom: 8px;
}

/* The websites: name, then "Latest posts" above the post names, then the year */
.site > .bar {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: var(--gut);
}

.site > .bar > a { grid-column: 1 / 3; justify-self: start; }
.site > .bar > .latest { grid-column: 3 / 4; margin: 0; padding: 0; }
.site > .bar > span.muted:not(.latest) { grid-column: 4 / 5; justify-self: end; }

.site > .bar + .site-list {
	margin-top: var(--rule);
}

/* Profile: the rule breaks at the gutter after the first quarter, as the
   split sections do at the centre */
.quarters {
	border-top: 0;
	background:
		linear-gradient(var(--strong), var(--strong)) left top / calc((100% - 7 * var(--gut)) / 4 + var(--gut)) 1px no-repeat,
		linear-gradient(var(--strong), var(--strong)) right top / calc(100% - (100% - 7 * var(--gut)) / 4 - 2 * var(--gut)) 1px no-repeat;
}

/* Work with me: the paragraphs a quarter wide, the form across two */
.q2 > .q-text {
	display: grid;
	gap: 1em;
	max-width: calc((100% - var(--gut)) / 2);
}

/* Logged in: the header sits below the WordPress bar */
.admin-bar header.site-head {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar header.site-head {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar header.site-head {
		top: 0;
	}
}


/* Pictures and videos in posts: the full width of the right half, with room
   above and below; the text keeps its measure */
.post > p:has(> img),
.post > p:has(> a > img),
.post > p:has(> iframe),
.post > figure,
.post > .wp-caption,
.post > iframe,
.post > video,
.post > div:has(> iframe) {
	max-width: none;
	margin-block: 3.5em;
	padding-right: 0;
}

.post > p:has(> img) img,
.post > p:has(> a > img) img,
.post > figure img,
.post > .wp-caption img {
	display: block;
	width: 100%;
	height: auto;
}

.post iframe,
.post video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}

/* A credit sits just below its picture, small and grey */
.post > p:has(> img):has(+ .credit),
.post > p:has(> a > img):has(+ .credit) {
	margin-bottom: 0;
}

.post > .credit {
	margin-bottom: 2.4em;
	color: var(--muted);
	font-size: var(--t-xs);
	line-height: 1.5;
}

/* Comments: the same size as the post, names in white, linked where given */
.comments p {
	font-size: var(--t-b);
	line-height: 1.65;
}

.comments .who-line a {
	color: var(--fg);
}

.comments .who-line a:hover {
	color: var(--soft);
}

/* 20. Small screens
---------------------------------------------------------------------------- */

@media (max-width: 860px) {
	/* No hovering on phones, so no resources pictures */
	.hover-pic,
	.float-pic {
		display: none;
	}

	/* Latest posts: picture, then the name and studio beneath */
	.site .latest {
		padding-left: 0;
	}

	.site-list a {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 12px;
	}

	.site-list .frame,
	.site-list .who {
		grid-column: 1 / -1;
	}

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

	.split .reviews-col,
	.post .aside {
		grid-column: 1 / -1;
	}

	.post .aside ~ .prose {
		grid-row: auto;
	}

	.other-books article {
		grid-column: 1 / -1;
	}

	.assets,
	.swatches {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

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

	/* Everything takes the full width; staggers are dropped */
	.g > *,
	.tile > * {
		grid-column: 1 / -1 !important;
	}

	.tile {
		row-gap: 12px;
	}

	.drop,
	.drop-sm {
		margin-top: 0;
	}

	.site-nav {
		display: none;
	}

	.site-head {
		display: flex;
		justify-content: space-between;
	}

	.menu-bar {
		display: flex;
	}

	.head .lede,
	.head .extra {
		margin-top: 8px;
	}

	/* Stacked halves share one rule: the label's */
	.split > .body {
		margin-top: 32px;
		padding-top: 0;
		border-top: 0;
	}

	.split > .side {
		padding-right: 0;
	}

	.tiles .bar {
		margin-bottom: calc(var(--rule) - clamp(96px, 11vw, 200px));
	}

	.index .preview {
		display: none;
	}

	.points li {
		padding-right: 0;
	}

	.voices,
	.voices.thirds {
		grid-template-columns: 1fr;
		row-gap: 48px;
	}

	.quarters > .q {
		padding-right: 0;
	}

	.book .shelf {
		grid-column: 1 / 3 !important;
	}

	.logos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-top: 0;
	}

	.notes li {
		grid-template-columns: 1fr;
		gap: 8px;
		padding-right: 0;
	}

	.covers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 32px;
	}

	.facts {
		grid-template-columns: 1fr 1fr;
	}

	.story {
		row-gap: 48px;
	}

	.story h2 {
		margin-bottom: -32px;
	}

	.entry {
		row-gap: 8px;
	}

	.entry .text {
		margin-top: 8px;
		padding-right: 0;
	}

	.spreads {
		grid-template-columns: 1fr 1fr;
	}

	.steps h2 {
		margin-bottom: 8px;
	}

	.enquiry form {
		padding-top: 0;
	}

	.enquiry .side {
		padding-block: var(--rule) 56px;
		padding-right: 0;
	}

	.site-foot nav {
		gap: 12px 24px;
	}

	.next .big {
		margin-top: 8px;
	}

	.book .quotes {
		grid-template-columns: 1fr;
	}

	.links li {
		grid-template-columns: 1fr;
	}


	.opt-b .panel {
		grid-column: 1 / -1 !important;
	}

	.opt-c article {
		grid-column: span 2 !important;
	}

	.portal nav {
		display: flex;
		flex-wrap: wrap;
		gap: 0 20px;
	}

	.portal nav a {
		border-bottom: 0;
	}
}

@media (max-width: 480px) {
	.facts,
	.details {
		grid-template-columns: 1fr;
	}

	.site-list a {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 16px;
	}
}


/* Back to the top: phones only, once you reach the end of a page */
.to-top {
	display: none;
}

@media (max-width: 860px) {
	.to-top {
		display: grid;
		place-items: center;
		position: fixed;
		right: 16px;
		bottom: 16px;
		z-index: 30;
		width: 44px;
		height: 44px;
		border: 1px solid var(--fg);
		background: var(--bg);
		color: var(--fg);
		font: inherit;
		opacity: 0;
		visibility: hidden;
		transition: opacity .9s var(--ease), visibility 0s .9s;
	}

	.to-top.on {
		opacity: 1;
		visibility: visible;
		transition: opacity .9s var(--ease), visibility 0s;
	}
}

@media (max-width: 860px) {
	.post > *,
	.work-text > *,
	.post > .is-style-da-aside,
	.work-text > figure[class*="c"],
	[class*="is-style-da-"] {
		grid-column: 1 / -1 !important;
		grid-row-end: auto;
		margin-top: 0 !important;
	}

	.work-text > figure {
		margin-top: 24px !important;
	}

	.book .panel-link {
		grid-column: 1 / -1;
	}
}

@media (max-width: 860px) {
	.q2 > .q-text {
		max-width: none;
	}

	.quarters {
		background: linear-gradient(var(--strong), var(--strong)) left top / 100% 1px no-repeat;
	}

	.site > .bar > .latest {
		display: none;
	}
}
