/*
Theme Name: How to Save the US Broadside
Theme URI: https://howtosavetheus.com/
Author: Ryan Orrock
Description: "Broadside" for How to Save the US. A Common Sense pamphlet engraved like a banknote: Libre Caslon and Archivo Narrow, navy and flag red, guilloche rosettes, security-paper waves and a waving flag ribbon. Dark (navy) by default, with a light paper version a reader can switch to.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: htsus-broadside
*/

/* ------------------------------------------------------------------ tokens */

:root,
:root[data-theme="dark"] {
	--bg: #0A1628;
	--ink: #F3F5F9;
	--muted: #A9B4C6;
	--hair: #26364F;
	--accent: #FF6B6B;
	--blue: #13315C;
	--on-blue: #FFFFFF;
	--on-blue-muted: #C9D3E6;
	--star: #F3F5F9;
	--orn: #2F4C78;
	--orn-red: #6A2C40;
	--paper: #122340;
	--card: #0F1F38;
	--flag-white: #E8ECF4;
	--band: #13315C;
	--band-ink: #FFFFFF;
	--band-muted: #C9D3E6;
	--band-kicker: #FFB3B3;
	--band-orn: #4A6FA6;
	--band-orn-red: #A0475E;
	--band-field: #0A1628;
	--band-hair: #4A6A9A;
	--band-btn: #D62839;
	--band-btn-ink: #FFFFFF;
	--sel: #6A2C40;
	color-scheme: dark;
}

:root[data-theme="light"] {
	--bg: #FCFBF8;
	--ink: #0B1B33;
	--muted: #4A566B;
	--hair: #C9D2E0;
	--accent: #B22234;
	--blue: #0A3161;
	--on-blue: #FFFFFF;
	--on-blue-muted: #C9D3E6;
	--star: #0A3161;
	--orn: #AFC0DB;
	--orn-red: #E6AEB6;
	--paper: #E3E8F1;
	--card: #F3F6FB;
	--flag-white: #FFFFFF;
	--band: #0A3161;
	--band-ink: #FFFFFF;
	--band-muted: #C9D3E6;
	--band-kicker: #F7C1C6;
	--band-orn: #4F72A8;
	--band-orn-red: #9C4A62;
	--band-field: #072549;
	--band-hair: #5B7BAE;
	--band-btn: #B22234;
	--band-btn-ink: #FFFFFF;
	--sel: #F7C1C6;
	color-scheme: light;
}

:root {
	--serif: 'Libre Caslon Text', Georgia, serif;
	--display: 'Libre Caslon Display', Georgia, serif;
	--caps: 'Archivo Narrow', 'Arial Narrow', sans-serif;
	--gutter: clamp(16px, 4vw, 40px);
}

/* ------------------------------------------------------------------- base */

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.6;
	overflow-x: hidden;
}

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

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

img, video, iframe, embed, object { max-width: 100%; }
img { height: auto; }

.skip-link {
	position: absolute; left: 8px; top: -60px; z-index: 100;
	padding: 10px 16px; background: var(--accent); color: #fff;
	font-family: var(--caps); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; }

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

.wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--mid { max-width: 1000px; }
.wrap--head { max-width: 920px; }
.wrap--text { max-width: 680px; }

/* security-paper waves behind everything */
.sheet { position: relative; min-height: 100vh; overflow: hidden; }
.sheet::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-color: var(--paper);
	-webkit-mask: url("assets/tiles/paper.svg") repeat;
	mask: url("assets/tiles/paper.svg") repeat;
}
.sheet > * { position: relative; }

/* -------------------------------------------------------------- ornaments */

.strip {
	height: 16px;
	background-color: var(--orn);
	-webkit-mask: url("assets/tiles/strip.svg") repeat-x;
	mask: url("assets/tiles/strip.svg") repeat-x;
}
.strip--red { background-color: var(--orn-red); }

.stars-bg { position: relative; isolation: isolate; }
.stars-bg::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-color: #fff; opacity: 0.22;
	-webkit-mask: url("assets/tiles/stars.svg") repeat;
	mask: url("assets/tiles/stars.svg") repeat;
}
.stars-bg--band::before {
	opacity: 0.16;
	-webkit-mask-image: url("assets/tiles/stars-band.svg");
	mask-image: url("assets/tiles/stars-band.svg");
}

.rosette { position: absolute; aspect-ratio: 1; pointer-events: none; }
.rosette svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; fill: none; stroke-width: 0.7; }
.rosette__a { stroke: var(--orn-red); }
.rosette__b, .rosette__c { stroke: var(--orn); }

.flag { position: relative; display: block; }
.flag svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.flag__edge { fill: var(--flag-white); stroke: var(--blue); stroke-width: 1.2; }
.flag__red { fill: var(--accent); }
.flag--masthead { height: clamp(46px, 5.6vw, 82px); margin-top: clamp(18px, 2.4vw, 30px); }
.flag--small { width: min(360px, 80%); height: 44px; margin: 36px auto 0; }
.flag--left { margin-left: 0; }
.flag--band { height: clamp(30px, 3.4vw, 50px); }
.flag--band .flag__edge { stroke: none; }
.flag--band .flag__red { fill: var(--band-btn); }

/* ------------------------------------------------------------- type bits */

.kicker {
	margin: 0 0 18px;
	font-family: var(--caps); font-size: 14px; font-weight: 700;
	letter-spacing: 0.14em; text-transform: uppercase;
}
.kicker--accent { color: var(--accent); }
.kicker--muted { color: var(--muted); font-size: 13px; max-width: 24ch; }
.kicker--band { color: var(--band-kicker); letter-spacing: 0.16em; margin-bottom: 16px; }

.byline { font-style: italic; color: var(--muted); }
.byline--chip { margin: 26px auto 0; display: table; padding: 2px 12px; background: var(--bg); }

.date {
	display: block; margin-top: 4px;
	font-family: var(--caps); font-size: 14px; color: var(--muted);
}

.button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 22px;
	font-family: var(--caps); font-size: 15px; font-weight: 700;
	letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
	border: 0; border-radius: 0; cursor: pointer;
}
.button--outline { border: 2px solid var(--ink); background: var(--bg); color: var(--ink); }
.button--outline:hover { background: var(--ink); color: var(--bg); }
.button--red { min-height: 54px; padding: 0 30px; font-size: 16px; letter-spacing: 0.12em; background: var(--band-btn); color: var(--band-btn-ink); }
.button--red:hover { filter: brightness(1.1); }

.link-caps {
	display: inline-flex; align-items: center; min-height: 48px; margin-top: 24px;
	font-family: var(--caps); font-size: 15px; font-weight: 700; letter-spacing: 0.1em;
	text-transform: uppercase; text-underline-offset: 5px;
}

/* ------------------------------------------------------------ top + bars */

.topbar { background: var(--blue); }
.topbar__inner {
	display: flex; flex-wrap: wrap; gap: 0 24px; justify-content: space-between; align-items: center;
	font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--on-blue-muted);
}
.topbar__byline, .topbar__actions { display: inline-flex; align-items: center; min-height: 44px; gap: 18px; }
.topbar__join {
	display: inline-flex; align-items: center; min-height: 44px;
	color: var(--on-blue); text-underline-offset: 4px; text-decoration-color: var(--band-kicker);
}

.theme-toggle {
	display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px;
	background: transparent; color: var(--on-blue); cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 0;
	font: inherit; font-family: var(--caps); font-size: 13px; font-weight: 700;
	letter-spacing: 0.1em; text-transform: uppercase;
}
.theme-toggle::before {
	content: ""; width: 12px; height: 12px; border-radius: 50%;
	background: linear-gradient(90deg, #fff 50%, transparent 50%); border: 1px solid #fff;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.sitebar { z-index: 2; background: var(--blue); border-bottom: 6px solid var(--accent); }
.sitebar__inner { display: flex; flex-wrap: wrap; gap: 0 28px; justify-content: space-between; align-items: center; }
.sitebar__name {
	display: inline-flex; align-items: center; min-height: 64px;
	color: var(--on-blue); text-decoration: none; font-family: var(--display); font-size: 28px;
}
.sitebar__nav {
	display: flex; flex-wrap: wrap; align-items: center; gap: 0 26px;
	font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.sitebar__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-blue); text-decoration: none; }
.sitebar__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sitebar__nav .sitebar__subscribe { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--band-kicker); }

/* --------------------------------------------------------------- masthead */

.masthead { padding-top: clamp(20px, 4vw, 44px); }
.masthead__frame {
	position: relative; border: 2px solid var(--blue); padding: clamp(7px, 1vw, 11px); background: var(--bg);
}
.masthead__frame::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-color: var(--orn-red);
	-webkit-mask: url("assets/tiles/frame.svg") repeat;
	mask: url("assets/tiles/frame.svg") repeat;
}
.masthead__panel {
	position: relative; overflow: hidden; border: 1px solid var(--blue); background: var(--bg);
	padding: clamp(30px, 5vw, 64px) clamp(14px, 3vw, 40px) clamp(34px, 5vw, 60px); text-align: center;
}
.masthead__rosette { left: 50%; top: 50%; width: min(620px, 118%); transform: translate(-50%, -50%); }
.corner-seal { position: absolute; width: 64px; height: 64px; fill: none; stroke: var(--orn); stroke-width: 0.6; }
.corner-seal--tl { left: 12px; top: 12px; }
.corner-seal--tr { right: 12px; top: 12px; }
.corner-seal--bl { left: 12px; bottom: 12px; }
.corner-seal--br { right: 12px; bottom: 12px; }
.masthead__text { position: relative; }
.masthead__stars { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.masthead__star { width: 14px; height: 14px; fill: var(--star); }
.masthead__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(52px, 9vw, 128px); line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance;
}
.masthead__title a { text-decoration: none; }
.masthead__motto {
	margin: 18px auto 0; display: table; padding: 4px 14px; background: var(--bg);
	font-style: italic; font-size: clamp(19px, 2vw, 23px); color: var(--muted);
}

.subject-bar__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; white-space: nowrap;
	border-bottom: 1px solid var(--ink);
	font-family: var(--caps); font-size: 15px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
	scrollbar-width: thin;
}
.subject-bar__list { display: flex; flex-wrap: wrap; flex: 1 1 0; min-width: 0; gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.subject-bar__list a, .subject-bar__subscribe {
	display: inline-flex; align-items: center; min-height: 46px; text-decoration: none;
}
.subject-bar__list a:hover { text-decoration: underline; text-underline-offset: 6px; }
.subject-bar__subscribe { margin-left: auto; color: var(--accent); }

/* ------------------------------------------------------------- front page */

.lead {
	padding-top: clamp(36px, 5vw, 72px); padding-bottom: clamp(36px, 5vw, 72px);
	display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start;
}
.lead__essay { flex: 999 1 560px; min-width: 0; }
.lead__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(40px, 5.4vw, 78px); line-height: 1.02; text-wrap: balance;
}
.lead__title a { text-decoration: none; }
.lead__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.lead__lede { margin: 26px 0 0; max-width: 36ch; font-size: clamp(20px, 2vw, 25px); line-height: 1.5; }
.lead__meta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }

.quote-card {
	position: relative; flex: 1 1 320px; min-width: 0;
	background: var(--card); border: 1px solid var(--blue);
	box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--orn);
}
.quote-card__seal { position: absolute; right: 14px; top: 26px; width: 74px; height: 74px; fill: none; stroke: var(--accent); stroke-width: 0.6; opacity: 0.7; }
.quote-card__body { position: relative; padding: 22px clamp(18px, 2.4vw, 28px) 24px; }
.quote-card__quote { margin: 0; font-family: var(--display); font-size: clamp(26px, 2.4vw, 32px); line-height: 1.25; }
.q { color: var(--accent); }
.quote-card__link {
	display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px;
	color: var(--accent); font-weight: 700; text-underline-offset: 4px;
}

.rule-title { display: flex; align-items: center; gap: 18px; }
.rule-title .strip { flex: 1 1 0; min-width: 0; }
.rule-title h2 {
	margin: 0; flex: none;
	font-family: var(--caps); font-size: 16px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}

.subjects { padding-bottom: clamp(56px, 7vw, 96px); }
.subjects__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
	gap: 22px; margin-top: 26px;
}
.subject-card {
	background: var(--card); border: 1px solid var(--hair);
	box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--orn);
	padding: 26px 24px 28px;
}
.medal { position: relative; width: 76px; height: 76px; display: grid; place-items: center; }
.medal__ring { position: absolute; inset: 0; width: 76px; height: 76px; fill: none; stroke: var(--orn-red); stroke-width: 0.6; }
.medal__disc {
	position: relative; width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--card); border: 1px solid var(--accent);
	font-family: var(--display); font-size: 24px; line-height: 1; color: var(--accent);
}
.subject-card__title {
	margin: 12px 0 18px;
	font-family: var(--caps); font-size: 19px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.subject-card__title a { text-decoration: none; }
.subject-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.subject-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.subject-card__list a { text-decoration: none; font-size: 19px; line-height: 1.35; }
.subject-card__list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

.essays { padding-bottom: clamp(56px, 7vw, 96px); scroll-margin-top: 16px; }
.essay-index {
	list-style: none; margin: 26px 0 0; padding: 0;
	columns: 2 420px; column-gap: 64px;
}
.essay-index li {
	break-inside: avoid; padding: 14px 0; border-bottom: 1px solid var(--hair);
	display: flex; gap: 6px 20px; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
}
.essay-index a { text-decoration: none; font-size: 19px; line-height: 1.35; flex: 1 1 240px; }
.essay-index a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.essay-index .date { margin: 0; flex: none; }

/* ----------------------------------------------------------- join band */

.join { position: relative; color: var(--band-ink); }
.join__panel { position: relative; overflow: hidden; background: var(--band); }
.join__rosette { right: -14%; top: 50%; width: min(760px, 120%); transform: translateY(-46%); opacity: 0.55; }
.join__rosette svg { stroke-width: 0.8; }
.join__rosette .rosette__a { stroke: var(--band-orn-red); }
.join__rosette .rosette__b, .join__rosette .rosette__c { stroke: var(--band-orn); }
.join__inner {
	position: relative;
	padding-top: clamp(46px, 6vw, 90px); padding-bottom: clamp(52px, 7vw, 100px);
	display: flex; flex-wrap: wrap; gap: 36px 72px; align-items: flex-end;
}
.join__text { flex: 1 1 480px; min-width: 0; }
.join__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(36px, 5vw, 66px); line-height: 1.04; text-wrap: balance;
}
.join__sub { margin: 18px 0 0; font-size: 19px; color: var(--band-muted); }
.join__action { flex: 0 1 auto; }

.join--boxed { margin-top: clamp(48px, 6vw, 80px); }
.join--boxed .join__rosette { right: -18%; top: 50%; width: min(560px, 120%); transform: translateY(-50%); }
.join--boxed .flag--band { height: 30px; }
.join--boxed .join__inner { padding: clamp(28px, 4vw, 48px); gap: 24px 48px; }
.join--boxed .join__text { flex-basis: 340px; }
.join--boxed .join__title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; }
.join--boxed .join__sub { font-size: 17px; margin-top: 10px; }

/* ------------------------------------------------------------- the essay */

.essay__head {
	position: relative; text-align: center;
	padding-top: clamp(40px, 6vw, 88px);
}
.essay__rosette { left: 50%; top: 46%; width: min(640px, 150%); transform: translate(-50%, -50%); }
.essay__head-text { position: relative; }
.essay__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(40px, 6vw, 82px); line-height: 1.02; text-wrap: balance;
}
.essay--page .essay__title { font-size: clamp(36px, 5vw, 66px); }
.essay__image { margin: 40px auto 0; }
.essay__image img { display: block; width: 100%; border: 2px solid var(--blue); padding: 8px; background: var(--card); }

.entry-content {
	padding-top: clamp(36px, 5vw, 60px);
	font-size: 19px; line-height: 1.7;
	overflow-wrap: break-word;
}
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content figure, .entry-content table, .entry-content pre { margin: 0 0 1.1em; }
.entry-content > p:first-of-type { font-size: clamp(20px, 1.6vw, 22px); }
.dropcap > p:first-of-type::first-letter {
	float: left; margin: 6px 12px 0 0;
	font-family: var(--display); font-size: 96px; line-height: 0.8; color: var(--accent);
}
.entry-content h2 {
	margin: 1.8em 0 0.6em;
	font-family: var(--caps); font-size: 18px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.entry-content h3, .entry-content h4 {
	margin: 1.6em 0 0.5em; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.2;
}
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin: 0.35em 0; }
.entry-content ul li::marker { color: var(--accent); }
.entry-content strong { font-weight: 700; }
.entry-content blockquote {
	position: relative; margin: 1.6em 0; padding: 24px 28px;
	background: var(--card); border: 1px solid var(--blue);
	box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--orn);
	font-family: var(--display); font-size: 24px; line-height: 1.35;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content hr { border: 0; height: 16px; margin: 2em 0; background-color: var(--orn); -webkit-mask: url("assets/tiles/strip.svg") repeat-x; mask: url("assets/tiles/strip.svg") repeat-x; }
.entry-content img { border: 1px solid var(--hair); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 17px; }
.entry-content th, .entry-content td { border: 1px solid var(--hair); padding: 8px 10px; text-align: left; }
.entry-content pre, .entry-content code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; }
.entry-content pre { background: var(--card); padding: 16px; overflow-x: auto; border: 1px solid var(--hair); }
.entry-content iframe { display: block; max-width: 100%; }
.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-family: var(--caps); font-size: 14px; color: var(--muted); margin-top: 6px; }
.entry-content::after { content: ""; display: table; clear: both; }

.chips { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--hair); text-decoration: none;
	font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.next-essay { margin-top: clamp(56px, 7vw, 96px); }
.next-essay__card {
	display: block; padding: 30px clamp(18px, 3vw, 32px);
	background: var(--card); border: 1px solid var(--blue);
	box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--orn);
	text-decoration: none;
}
.next-essay__card .kicker { display: block; margin: 0; letter-spacing: 0.16em; }
.next-essay__title {
	display: block; margin-top: 10px;
	font-family: var(--display); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; text-wrap: balance;
}
.next-essay__card:hover .next-essay__title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

/* ---------------------------------------------------------- sign-up page */

.signup { padding-top: clamp(28px, 4vw, 48px); text-align: center; }
.signup__intro { font-style: italic; color: var(--muted); font-size: 20px; margin: 0 0 24px; }
.signup__card {
	padding: 18px; background: #FFFFFF; color: #0B1B33;
	border: 2px solid var(--blue); box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--orn);
	text-align: left;
}
.signup__card.entry-content { padding-top: 18px; }
.signup__card iframe { width: 100%; min-height: 360px; }

/* ----------------------------------------------------------- listings */

.listing { padding-top: clamp(40px, 6vw, 80px); }
.listing__head { position: relative; margin-bottom: 20px; }
.listing--404 .listing__head { text-align: center; }
.listing__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(40px, 6vw, 76px); line-height: 1.04; text-wrap: balance;
}
.listing__desc { margin-top: 14px; color: var(--muted); }
.listing__empty { font-size: 20px; }
.listing__empty a { color: var(--accent); }
.listing__search { margin-top: 24px; }

.essay-list { list-style: none; margin: 0; padding: 0; }
.essay-list__item { padding: 30px 0; border-bottom: 1px solid var(--hair); }
.essay-list__item .kicker { margin-bottom: 10px; color: var(--accent); font-size: 13px; }
.essay-list__title {
	margin: 0; font-family: var(--display); font-weight: 400;
	font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; text-wrap: balance;
}
.essay-list__title a { text-decoration: none; }
.essay-list__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.essay-list__lede { margin: 12px 0 0; color: var(--muted); max-width: 60ch; }

.pagination, .comments-pagination { margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--caps); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-links a, .nav-links span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--hair); text-decoration: none; }
.nav-links .current { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------ forms */

.search-form { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form label { flex: 1 1 200px; display: flex; }
.search-field, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; min-height: 48px; padding: 8px 14px;
	font: inherit; font-size: 17px; color: var(--ink);
	background: var(--card); border: 1px solid var(--hair); border-radius: 0;
}
.search-submit {
	min-height: 48px; padding: 0 18px; cursor: pointer;
	background: var(--ink); color: var(--bg); border: 0; border-radius: 0;
	font-family: var(--caps); font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------------------------------------------------------- comments */

.comments { margin-top: clamp(48px, 6vw, 72px); }
.comments::before { content: ""; display: block; margin-bottom: 26px; border-top: 1px solid var(--ink); }
.comments__title, .comment-reply-title {
	margin: 0 0 18px;
	font-family: var(--caps); font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-left: 24px; border-left: 1px solid var(--hair); }
.comment__body { padding: 16px 0; border-bottom: 1px solid var(--hair); }
.comment__meta { margin: 0 0 6px; font-family: var(--caps); font-size: 14px; color: var(--muted); }
.comment__author { color: var(--ink); font-weight: 700; }
.comment__text p { margin: 0 0 0.8em; }
.comment-reply-link { font-family: var(--caps); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; margin-bottom: 4px; font-family: var(--caps); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.comment-form .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-family: var(--serif); }
.comment-respond { margin-top: 28px; }

/* ------------------------------------------------------------- footer */

.site-footer { margin-top: clamp(56px, 7vw, 96px); background: var(--bg); }
.site-footer__inner {
	padding-top: 28px; padding-bottom: 48px;
	display: flex; flex-wrap: wrap; gap: 16px 36px; justify-content: space-between; align-items: center;
}
.site-footer__name {
	display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
	font-family: var(--display); font-size: 26px; text-decoration: none;
}
.site-footer__seal { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 0.9; }
.site-footer__nav {
	display: flex; flex-wrap: wrap; gap: 0 24px;
	font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__search { flex: 1 1 280px; max-width: 420px; }
.site-footer__copy { margin: 0; font-size: 15px; color: var(--muted); }

/* front page: the full-width join band sits flush on the footer */
.home .site-footer { margin-top: 0; }

/* -------------------------------------------------------------- phone */

@media (max-width: 700px) {
	.subject-bar__inner { flex-wrap: nowrap; overflow-x: auto; }
	.subject-bar__list { flex-wrap: nowrap; flex: none; }
	body { font-size: 17px; }
	.corner-seal, .quote-card__seal { display: none; }
	.masthead__stars { gap: 6px; margin-bottom: 14px; }
	.masthead__star { width: 11px; height: 11px; }
	.topbar__byline { display: none; }
	.topbar__inner { justify-content: flex-end; }
	.sitebar__name { min-height: 56px; font-size: 24px; }
	.sitebar__inner { gap: 0; }
	.sitebar__nav { gap: 0 14px; font-size: 12.5px; padding-bottom: 6px; }
	.sitebar .theme-toggle { padding: 0 8px; font-size: 12px; }
	.essay__rosette { width: min(100%, 420px); }
	.dropcap > p:first-of-type::first-letter { font-size: 72px; margin-top: 4px; }
	.entry-content { font-size: 18px; }
	.entry-content blockquote { padding: 18px; font-size: 21px; }
	.essay-index { columns: 1; }
	.join__action, .join__action .button { width: 100%; }
	.alignleft, .alignright { float: none; margin: 0 0 1em; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
