/*
Theme Name: Parafraz Galley
Version: 1.0.2
Description: A marked-up typescript for Parafraz: typing paper, typewriter headings, a calm serif text and the editor's red pencil.
Author: Parafraz
Text Domain: parafraz-galley
License: GPL-2.0-or-later
*/

/* Courier Prime and Source Serif 4: SIL Open Font License 1.1, see assets/fonts/. */
@font-face { font-family: "Courier Prime"; src: url("assets/fonts/courier-prime-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("assets/fonts/courier-prime-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-roman.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
	--paper: #ffffff;
	--feint: #dfe8f2;
	--ink: #202124;
	--red: #d1242f;
	--blue: #3f6fb5;
	--muted: #6b6f76;
	--pencil: #b9bec6;
	--typed: "Courier Prime", "Courier New", Courier, monospace;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--line: 1.65;
	--measure: 36.5rem;
	--margin: 11rem;
	--gutter: 2.5rem;
	--wide: 50rem;
	--feint-lines: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.2rem - 1px), var(--feint) calc(2.2rem - 1px), var(--feint) 2.2rem);
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.1875rem;
	line-height: var(--line);
	font-optical-sizing: auto;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--red); text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 3px;
	border-radius: 2px;
}

h1, h2, h3, h4 { font-family: var(--typed); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0; }

.skip {
	position: absolute; left: 1rem; top: -4rem; z-index: 50;
	background: var(--paper); border: 2px solid var(--ink); padding: 0.5rem 0.9rem;
	font-family: var(--typed);
}
.skip:focus { top: 1rem; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* The sheet: a wide left margin for the proof marks, a reading column, white space to the right. */
.sheet {
	max-width: 76rem;
	margin: 0 auto;
	padding: 0 2rem;
	display: grid;
	grid-template-columns: var(--margin) minmax(0, var(--measure)) minmax(0, 1fr);
	column-gap: var(--gutter);
}
.sheet > * { grid-column: 2; min-width: 0; }
.sheet > .in-margin { grid-column: 1; }
.sheet > .wide { grid-column: 2 / 4; max-width: var(--wide); }

/* Header: one typed line over a feint rule. */
.typed-line { border-bottom: 1px solid var(--feint); }
.typed-line .sheet { align-items: center; padding-top: 1.4rem; padding-bottom: 1.1rem; }
.wordmark { grid-column: 1 / 2; display: inline-block; line-height: 0; text-decoration: none; }
.wordmark img { width: 9.5rem; height: auto; }
.primary-menu { grid-column: 2 / 4; justify-self: start; }
.primary-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 2rem; }
.primary-menu a {
	font-family: var(--typed); font-size: 1.125rem; text-decoration: none; color: var(--ink);
	padding: 0.35rem 0 0.55rem; display: inline-block;
}
.primary-menu a:hover { color: var(--red); }
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current-post-parent > a,
.primary-menu .current-category-ancestor > a,
.primary-menu a[aria-current] {
	background: url("assets/marks/underline.svg") no-repeat left bottom / 100% 0.6rem;
}

/* Home: the tagline, edited in red pencil. */
.desk { padding: 4.5rem 0 3rem; }
.draft {
	grid-column: 2 / 4;
	max-width: 52rem;
	margin: 0;
	font-family: var(--typed);
	font-size: clamp(1.45rem, 1rem + 1.9vw, 2.35rem);
	line-height: 2.45;
	color: var(--ink);
	background: var(--feint-lines);
	background-size: 100% 2.45em;
	background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.45em - 1px), var(--feint) calc(2.45em - 1px), var(--feint) 2.45em);
	background-position: 0 0.38em;
}
.draft del {
	text-decoration: none;
	background: linear-gradient(var(--red), var(--red)) no-repeat 0 58% / 100% 0.11em;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
	animation: strike 0.7s ease-out both;
	color: #50545a;
}
.draft del + .dele { display: inline-block; width: 0.8em; height: 0.8em; vertical-align: 0.05em; margin: 0 0.1em 0 -0.15em; background: url("assets/marks/dele.svg") no-repeat center / contain; animation: appear 0.3s ease-out both; }
.draft .first, .draft .first + .dele { animation-delay: 0.5s; }
.draft .second, .draft .second + .dele { animation-delay: 1.3s; }
.draft .cap { position: relative; padding-bottom: 0.1em; }
.draft .cap::after { content: ""; position: absolute; left: calc(50% - 0.31em); bottom: 0.11em; width: 0.62em; height: 0.32em; background: url("assets/marks/capital.svg") no-repeat center / contain; animation: appear 0.4s 2.1s ease-out both; }
.draft .caret { position: relative; display: inline-block; width: 0.7em; height: 1em; vertical-align: -0.12em; }
.draft .caret::after { content: ""; position: absolute; left: 0.04em; right: 0.04em; bottom: -0.45em; height: 0.55em; background: url("assets/marks/caret.svg") no-repeat center / contain; animation: appear 0.3s 2.5s ease-out both; }
.draft .caret ins {
	position: absolute; bottom: 0.92em; left: -0.1em; white-space: nowrap;
	font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 0.86em; line-height: 1;
	color: var(--red); text-decoration: none;
	animation: write 0.6s 2.8s ease-out both;
}
.clean {
	grid-column: 2 / 4;
	margin-top: 2.2rem;
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
	line-height: 1.2;
	display: flex; align-items: baseline; gap: 0.5em;
}
.clean::before { content: "¶"; font-family: var(--serif); font-weight: 700; color: var(--red); font-size: 0.8em; }
.desk-note { grid-column: 2; margin: 1.2rem 0 0; color: var(--muted); font-size: 1.125rem; }

@keyframes strike { from { background-size: 0% 0.11em; } to { background-size: 100% 0.11em; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes write { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.draft del { background-size: 100% 0.11em; }
}

/* Section headings on the sheet. */
.section-head { margin: 3.5rem 0 1.2rem; display: flex; align-items: baseline; gap: 0.6rem; font-size: 1.5rem; }
.section-head::before { content: "¶"; font-family: var(--serif); color: var(--red); font-weight: 700; }

/* A typed contents list: home, niche archives and search. */
.contents { list-style: none; max-width: 76rem; margin: 0 auto; padding: 0 2rem; }
.contents-entry {
	display: grid;
	grid-template-columns: var(--margin) minmax(0, var(--measure)) minmax(0, 1fr);
	column-gap: var(--gutter);
	padding: 1.6rem 0 1.8rem;
	border-top: 1px solid var(--feint);
}
.contents-entry:last-child { border-bottom: 1px solid var(--feint); }
.contents-folio { grid-column: 1; grid-row: 1 / span 2; margin: 0.15rem 0 0; font-size: 0.95rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.15rem; }
.contents-folio .pilcrow { color: var(--red); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.contents-title { grid-column: 2; font-size: 1.55rem; line-height: 1.25; }
.contents-title a { text-decoration: none; color: var(--ink); }
.contents-title a:hover { color: var(--red); text-decoration: underline; text-decoration-color: var(--red); }
.contents-excerpt { grid-column: 2; margin: 0.6rem 0 0; }
.contents-niche { grid-column: 2; margin: 0.5rem 0 0; font-style: italic; color: var(--muted); font-size: 1rem; }
.contents-sheet { grid-column: 3; grid-row: 1 / span 3; margin: 0; align-self: start; max-width: 15rem; border: 1px solid var(--feint); padding: 0.5rem; background: var(--paper); }
.contents-sheet img { display: block; width: 100%; }

/* The website's own text on the home page. */
.about-sheet { padding: 2rem 0 3rem; }
.about-sheet .copy > * { grid-column: 2; }

/* Titles of articles and pages: a typescript title block. */
.title-block { padding-top: 3.6rem; padding-bottom: 2.2rem; }
.title-block .in-margin { grid-row: 1 / span 3; font-size: 0.98rem; line-height: 1.5; color: var(--muted); padding-top: 0.5rem; }
.title-block h1 { font-size: clamp(1.85rem, 1.2rem + 2.4vw, 2.85rem); line-height: 1.15; }
.standfirst { margin: 1.1rem 0 0; font-size: 1.32rem; line-height: 1.5; color: #3c3f44; }
.niche-link { display: inline-block; font-style: italic; color: var(--ink); margin-bottom: 1.4rem; text-decoration: none; background: url("assets/marks/underline.svg") no-repeat left bottom / 100% 0.5rem; padding-bottom: 0.3rem; }
.byline { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 0.7rem; align-items: center; margin: 0 0 1.2rem; }
.byline img { width: 2.6rem; height: 2.6rem; border: 1px solid var(--feint); border-radius: 0.4rem; grid-row: 1 / span 2; }
.byline strong { color: var(--ink); font-weight: 600; }
.dates { margin: 0; }
.dates time { color: var(--ink); }

.featured { margin: 0 0 2.5rem; }
.featured img { display: block; width: 100%; border: 1px solid var(--feint); }

/* The copy: one serif column, figures break wider. */
.copy { padding-bottom: 2rem; }
.copy > * { grid-column: 2; margin-top: 0; margin-bottom: 1.15rem; }
.copy > h2 { position: relative; font-size: 1.6rem; margin-top: 3rem; margin-bottom: 1rem; }
.copy > h2::before { content: "¶"; position: absolute; right: calc(100% + 0.9rem); top: -0.05em; font-family: var(--serif); color: var(--red); font-weight: 700; font-size: 1.15em; }
.copy > h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.6rem; }
.copy p { margin: 0 0 1.15rem; }
.copy strong { font-weight: 650; }
.copy ul { padding-left: 1.4rem; list-style: none; }
.copy ul > li { position: relative; margin-bottom: 0.45rem; }
.copy ul > li::before { content: "–"; position: absolute; left: -1.3rem; color: var(--red); font-weight: 700; }

/* Steps: red circled numbers in the margin. */
.copy ol { list-style: none; counter-reset: step; padding-left: 0; }
.copy ol > li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1rem; min-height: 2.1rem; }
.copy ol > li::before {
	content: counter(step); position: absolute; left: 0; top: -0.05rem;
	width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
	border: 2px solid var(--red); border-radius: 48% 52% 46% 54%;
	color: var(--red); font-style: italic; font-weight: 600; font-size: 1.05rem; line-height: 1;
}

/* Figures: marked-up panels, wider than the column. */
.copy > figure { grid-column: 2 / 4; max-width: var(--wide); margin: 2rem 0 2.2rem; }
.copy figure img { display: block; width: 100%; border: 1px solid var(--feint); background: var(--paper); }
.copy figcaption, .featured figcaption { margin-top: 0.7rem; max-width: var(--measure); font-size: 1rem; line-height: 1.5; font-style: italic; color: var(--muted); }

/* Rewrite blocks: the struck draft beside the clean version, the reason in red pencil. */
.copy > figure:has(> del) {
	grid-column: 2 / 4;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0 2.2rem;
	padding: 1.4rem 1.5rem 1.2rem;
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--feint);
	background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.9rem - 1px), var(--feint) calc(1.9rem - 1px), var(--feint) 1.9rem);
	background-position: 0 0.95rem;
}
.copy > figure > del, .copy > figure > ins {
	display: block; font-family: var(--typed); font-size: 1.06rem; line-height: 1.9rem; text-decoration: none;
	position: relative;
}
.copy > figure > del {
	color: #55595f;
	text-decoration-line: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px;
}
.copy > figure:has(> del) > br { display: none; }
.copy > figure > ins { color: var(--ink); padding-left: 1.6rem; }
.copy > figure > ins::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 1rem; height: 0.85rem; background: url("assets/marks/caret.svg") no-repeat center / contain; }
.copy > figure:has(> del) > figcaption {
	grid-column: 1 / -1; margin-top: 0.9rem; max-width: none;
	font-style: italic; color: var(--red); font-size: 1.04rem;
}

/* Queries in blue pencil: asides and questions. */
.copy > aside {
	position: relative;
	margin: 1.8rem 0 2rem;
	padding: 1rem 1.25rem 0.2rem;
	border: 1.5px solid var(--blue);
	border-radius: 3px 10px 4px 9px;
	background: var(--paper);
}
.copy > aside::before { content: ""; position: absolute; right: calc(100% + 0.9rem); top: 0.85rem; width: 1.9rem; height: 1.9rem; background: url("assets/marks/query.svg") no-repeat center / contain; }
.copy > aside strong:first-child { color: var(--blue); }
.copy details { border-bottom: 1px solid var(--feint); padding: 0.75rem 0; margin: 0; }
.copy details + details { margin-top: 0; }
.copy details:first-of-type { border-top: 1px solid var(--feint); }
.copy summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; align-items: start; }
.copy summary::-webkit-details-marker { display: none; }
.copy summary::before { content: ""; width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; background: url("assets/marks/query.svg") no-repeat center / contain; }
.copy details[open] summary { color: var(--blue); }
.copy details > :not(summary) { margin: 0.6rem 0 0.4rem 2.2rem; }

/* Stet: a takeaway that stands, typed, with the editor's dotted line under it. */
.copy > blockquote {
	position: relative; margin: 2rem 0; padding: 0.2rem 0 0.4rem;
	font-family: var(--typed); font-size: 1.18rem; line-height: 1.7;
}
.copy > blockquote p { margin: 0 0 0.5rem; }
.copy > blockquote p:last-child { margin: 0; text-decoration: underline dotted var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.copy > blockquote::before { content: "stet"; position: absolute; right: calc(100% + 0.9rem); top: 0.3rem; font-family: var(--serif); font-style: italic; color: var(--red); font-size: 1.05rem; }

/* Terms. */
.copy dl { margin: 1.5rem 0; }
.copy dt { font-family: var(--typed); font-weight: 700; margin-top: 0.9rem; }
.copy dd { margin: 0.2rem 0 0; padding-bottom: 0.6rem; border-bottom: 1px solid var(--feint); }

/* Tables: typed heads, feint ruling, scroll on a phone. */
.table-scroll { grid-column: 2 / 4; max-width: var(--wide); overflow-x: auto; margin: 1.6rem 0 2rem; }
.table-scroll:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.copy table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 1.02rem; line-height: 1.5; }
.copy th { font-family: var(--typed); font-weight: 700; text-align: left; vertical-align: bottom; padding: 0.6rem 0.9rem 0.55rem 0; border-bottom: 2px solid var(--ink); }
.copy td { vertical-align: top; padding: 0.65rem 0.9rem 0.65rem 0; border-bottom: 1px solid var(--feint); }
.copy td del { color: #55595f; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.copy td ins { text-decoration: none; }

.copy hr { border: 0; height: 1.6rem; background: url("assets/marks/dele.svg") no-repeat center / 1.6rem; margin: 2.4rem 0; }
.copy code { font-family: var(--typed); font-size: 0.95em; background: #f3f6fa; padding: 0.05em 0.3em; }

/* Ad slots: blank paper in a pencilled frame, with their label. */
.galley {
	display: block;
	margin: 2.4rem 0;
	padding: 0.6rem 0.8rem 0.9rem;
	border: 1px dashed var(--pencil);
	background: var(--paper);
	text-align: center;
	clear: both;
}
.galley-note { display: block; text-align: left; font-family: var(--serif); font-style: italic; font-size: 0.86rem; color: var(--muted); margin-bottom: 0.5rem; }
.galley iframe { display: block; margin: 0 auto; border: 0; max-width: 100%; }
.copy > .galley { grid-column: 2; }
.slot-row { padding-top: 0.5rem; padding-bottom: 1rem; }
.slot-row > .galley { grid-column: 2 / 4; max-width: var(--wide); }
body > .galley { width: min(var(--wide), calc(100% - 2.3rem)); margin: 2.4rem auto 3rem; }

/* The editors' note at the end of an article. */
.editors-note { padding-top: 1rem; padding-bottom: 3rem; }
.editors-note .note {
	grid-column: 2;
	display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 1rem;
	padding: 1.4rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--feint);
}
.editors-note img { width: 3.4rem; height: 3.4rem; border: 1px solid var(--feint); border-radius: 0.5rem; }
.editors-note h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.editors-note p { margin: 0; font-size: 1.05rem; }
.more-reading { grid-column: 2; margin-top: 2rem; }
.more-reading h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.more-reading ul { list-style: none; padding: 0; margin: 0; }
.more-reading li { padding: 0.55rem 0; border-bottom: 1px solid var(--feint); }

/* Page header for archives, search and the missing page. */
.archive-head { padding-top: 3.6rem; padding-bottom: 2rem; }
.archive-head .in-margin { color: var(--red); font-size: 3.2rem; line-height: 1; font-weight: 700; text-align: right; }
.archive-head h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); }
.archive-head p { margin: 0.9rem 0 0; font-size: 1.2rem; color: #3c3f44; }
.archive-list { padding-bottom: 3rem; }
.pager { grid-column: 2; display: flex; gap: 2rem; margin-top: 1.5rem; font-family: var(--typed); }

.search-form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.search-form label { width: 100%; font-style: italic; color: var(--muted); font-size: 1rem; }
.search-form input[type="search"] {
	flex: 1 1 14rem; font: inherit; font-family: var(--typed); font-size: 1.05rem;
	padding: 0.55rem 0.2rem; border: 0; border-bottom: 2px solid var(--ink); background: transparent; color: var(--ink);
}
.search-form button, .stet-choice button, .query-slip button {
	font-family: var(--typed); font-size: 1rem; font-weight: 700;
	padding: 0.55rem 1.3rem; min-width: 7.5rem;
	background: var(--paper); color: var(--ink);
	border: 2px solid var(--ink); border-radius: 2px; cursor: pointer;
}
.search-form button:hover, .stet-choice button:hover, .query-slip button:hover { border-color: var(--red); color: var(--red); }

.lost { overflow-wrap: anywhere; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; }

/* The cookie choice on the cookies page, and the measurement banner. */
.stet-choice {
	margin: 1.6rem 0 2rem; padding: 1.1rem 1.25rem 1.2rem;
	border: 1.5px solid var(--blue); border-radius: 3px 10px 4px 9px;
}
.stet-choice p { margin: 0 0 0.8rem; }
.stet-status { font-style: italic; color: var(--blue); }
.stet-status:empty { display: none; }
fieldset.stet-choice { min-width: 0; }
fieldset.stet-choice legend { font-family: var(--typed); font-weight: 700; padding: 0 0.4rem; font-size: 1.2rem; }
fieldset.stet-choice p { display: inline-block; margin: 0.4rem 0.8rem 0 0; }

.query-slip {
	position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
	width: min(46rem, calc(100% - 2rem)); z-index: 40;
	padding: 1rem 1.25rem 1.1rem;
	background: var(--paper); color: var(--ink);
	border: 1.5px solid var(--blue); border-top-width: 4px; border-radius: 3px;
	box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0), 0 6px 0 -2px var(--feint);
	font-size: 1rem; line-height: 1.5;
}
.query-slip p { margin: 0 0 0.85rem; }
.query-slip a { color: var(--blue); text-decoration-color: var(--blue); }
.query-slip button { margin-right: 0.5rem; }

/* Footer: a typed colophon. */
.colophon { border-top: 1px solid var(--feint); margin-top: 2rem; padding: 2.4rem 0 3rem; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.colophon .in-margin img { width: 3.2rem; height: 3.2rem; border: 1px solid var(--feint); border-radius: 0.5rem; }
.colophon-name { margin: 0; font-family: var(--typed); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.colophon p { margin: 0.3rem 0 0; }
.colophon a { color: var(--ink); }
.footer-menu { grid-column: 3; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; font-family: var(--typed); font-size: 1rem; }
.footer-menu li { margin-bottom: 0.35rem; }
.footer-menu li::before { content: "- "; color: var(--red); }

/* Phones and narrow windows: one column, the margin marks move inline. */
@media (max-width: 62rem) {
	:root { --margin: 7.5rem; --gutter: 1.6rem; }
	.contents-sheet { display: none; }
	.footer-menu { grid-column: 2; margin-top: 1.6rem; }
}

@media (max-width: 46rem) {
	body { font-size: 1.125rem; }
	.sheet { grid-template-columns: minmax(0, 1fr); padding: 0 1.15rem; column-gap: 0; }
	.sheet > *, .sheet > .in-margin, .sheet > .wide, .copy > *, .copy > figure, .copy > figure:has(> del), .table-scroll, .slot-row > .galley { grid-column: 1; }
	.typed-line .sheet { row-gap: 0.6rem; padding-top: 1rem; }
	.wordmark img { width: 8.2rem; }
	.primary-menu { grid-column: 1; }
	.primary-menu ul { gap: 0.1rem 1.4rem; }
	.primary-menu a { font-size: 1.05rem; }
	.desk { padding: 2.6rem 0 2rem; }
	.draft, .clean, .desk-note { grid-column: 1; }
	.draft { line-height: 2.5; }
	.contents { padding: 0 1.15rem; }
	.contents-entry { grid-template-columns: minmax(0, 1fr); padding: 1.3rem 0 1.5rem; }
	.contents-folio { grid-row: auto; flex-direction: row; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
	.contents-folio, .contents-title, .contents-excerpt, .contents-niche { grid-column: 1; }
	.contents-sheet { display: block; grid-column: 1; grid-row: auto; margin-top: 1rem; max-width: 100%; }
	.title-block { padding-top: 2.2rem; }
	.title-block .in-margin { grid-row: auto; order: 2; margin-top: 1.4rem; padding-top: 0; }
	.copy > h2::before { position: static; margin-right: 0.45rem; }
	.copy > aside { padding-top: 2.8rem; }
	.copy > aside::before { right: auto; left: 1rem; top: 0.7rem; width: 1.6rem; height: 1.6rem; }
	.copy > blockquote { padding-top: 1.7rem; }
	.copy > blockquote::before { right: auto; left: 0; top: 0; }
	.copy > figure:has(> del) { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 1rem 0.9rem; margin-left: -0.2rem; margin-right: -0.2rem; }
	.archive-head .in-margin { text-align: left; font-size: 2.4rem; }
	.colophon .in-margin { margin-bottom: 1rem; }
	.footer-menu, .pager, .more-reading, .editors-note .note { grid-column: 1; }
	.query-slip { bottom: 0; width: 100%; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
	.query-slip button { min-width: 0; flex: 1; }
}

@media print {
	.typed-line, .colophon, .galley, .query-slip { display: none; }
}


@media screen {
	.query-slip {
		left: 0.5rem;
		right: 0.5rem;
		bottom: max(0.5rem, env(safe-area-inset-bottom));
		width: auto;
		max-width: 34rem;
		margin: 0 auto;
		transform: none;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
		padding: 0.75rem;
		border: 1px solid var(--pencil);
		border-radius: 3px;
		background: var(--paper);
		color: var(--ink);
		box-shadow: none;
		font: 400 0.875rem/1.4 var(--serif);
	}
	.query-slip::before,
	.query-slip::after { display: none; }
	.query-slip p {
		grid-column: 1 / -1;
		margin: 0;
		max-width: none;
		font: inherit;
	}
	.query-slip a {
		color: var(--blue);
		font-weight: 400;
		white-space: normal;
		text-decoration: underline;
	}
	.query-slip button {
		min-width: 0;
		min-height: 44px;
		width: 100%;
		margin: 0;
		padding: 0.4rem 0.5rem;
		border: 1px solid var(--pencil);
		border-radius: 3px;
		background: var(--paper);
		color: var(--ink);
		box-shadow: none;
		font: 500 0.875rem/1.25 var(--serif);
		font-stretch: normal;
		letter-spacing: normal;
		text-transform: none;
		cursor: pointer;
	}
	.query-slip button:hover { background: var(--feint); color: var(--ink); border-color: var(--pencil); }
	.query-slip :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
	body:has(.query-slip) { padding-bottom: 10rem; }
}
@media screen and (max-width: 620px) {
	body:has(.query-slip) { padding-bottom: 12rem; }
}
