/*
Theme Name: The Taipei Review
Theme URI: https://taipeitourism.org/
Author: TaipeiTourism
Author URI: https://taipeitourism.org/
Description: An editorial, periodical-style theme for a city guide. Warm paper, ink hairlines, rare vermilion accents and decorative Traditional Chinese type. Built around numbered dispatches, a hairline grid, a practical-information panel and a Chinese-gloss heading system, with every string editable in the Customizer.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taipei-review
Tags: blog, news, one-column, two-columns, custom-logo, custom-menu, editor-style, featured-images, block-patterns, block-styles, translation-ready, threaded-comments, sticky-post
*/

/* ---------------------------------------------------------------------- */
/* 1. Tokens                                                              */
/* ---------------------------------------------------------------------- */

:root {
	--paper: #faf7f1;
	--paper-2: #f1ece1;
	--paper-3: #e9e2d4;
	--ink: #1c1a17;

	/*
	 * Two vermilions. #D43D2A is the brand colour and is used wherever it is a
	 * fill, a rule or display-sized type. Small text on paper needs 4.5:1, and
	 * the brand colour reaches only 4.30:1 there, so links, kickers and card
	 * metadata use the slightly deeper --vermilion-text (4.73:1). On ink the
	 * relationship inverts and the lighter --vermilion-on-ink is used (4.60:1).
	 */
	--vermilion: #d43d2a;
	--vermilion-text: #c93a22;
	--vermilion-on-ink: #e1553c;
	--vermilion-on-tint: #c23520; /* on paper-2, where the tint costs 0.4 of a point */

	--rule: rgba(28, 26, 23, 0.18);
	--rule-soft: rgba(28, 26, 23, 0.1);
	--rule-strong: #1c1a17;

	--body-ink: rgba(28, 26, 23, 0.85);
	--soft-ink: #5e5c58;      /* ink @70% on paper — 6.1:1 */
	--muted: #706e6a;         /* ink @62% on paper — 4.67:1, safe at 10px */
	--faint: rgba(28, 26, 23, 0.12);
	--sep: rgba(28, 26, 23, 0.32);

	--on-ink: #faf7f1;
	--on-ink-muted: rgba(250, 247, 241, 0.55); /* 5.6:1 on ink */

	--display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
	--ui: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--han: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MS Mincho", serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--gutter: clamp(20px, 4vw, 56px);
	--measure: 680px;
	--wide: 1100px;
	--shell: 1440px;

	--speed: 140ms;
}

/* ---------------------------------------------------------------------- */
/* 2. Reset and base                                                      */
/* ---------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--paper-3);
	color: var(--ink);
	font-family: var(--ui);
	font-size: 1rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

a {
	color: var(--ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--speed) ease;
}

a:hover,
a:focus-visible {
	color: var(--vermilion-text);
}

:focus-visible {
	outline: 2px solid var(--vermilion);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.15;
	margin: 0;
	letter-spacing: -0.005em;
}

p {
	margin: 0 0 1.375rem;
}

p:last-child {
	margin-bottom: 0;
}

::selection {
	background: var(--vermilion);
	color: var(--on-ink);
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--ink);
	color: var(--on-ink);
	padding: 12px 20px;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.skip-link:focus {
	left: 0;
	color: var(--on-ink);
}

/* ---------------------------------------------------------------------- */
/* 3. Shell                                                               */
/* ---------------------------------------------------------------------- */

.site {
	max-width: var(--shell);
	margin: 0 auto;
	background: var(--paper);
}

@media (min-width: 1441px) {
	.site {
		border-left: 1px solid var(--rule);
		border-right: 1px solid var(--rule);
	}
}

.site-main {
	display: block;
}

.han {
	font-family: var(--han);
	font-weight: 400;
}

/*
 * Grid children default to min-width:auto, which lets a long headline push a
 * column wider than its track and scroll the page sideways on small screens.
 */
.hero__text,
.hero__media,
.dispatches,
.cover__aside,
.dispatch,
.card,
.related__item,
.footer-grid > * {
	min-width: 0;
}

.hero__title,
.article__title,
.archive-head__title,
.dispatch__title,
.card__title,
.related__item-title,
.entry-content h2,
.entry-content h3 {
	overflow-wrap: break-word;
}

/* ---------------------------------------------------------------------- */
/* 4. Shared type components                                              */
/* ---------------------------------------------------------------------- */

.kicker {
	font-size: 0.6875rem;
	line-height: 1.4;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 1rem;
	font-weight: 500;
}

.kicker--accent {
	color: var(--vermilion-text);
	letter-spacing: 0.3em;
}

.kicker--accent a {
	color: inherit;
	text-decoration: none;
}

.kicker--accent a:hover {
	text-decoration: underline;
}

.kicker--card {
	font-size: 0.625rem;
	letter-spacing: 0.2em;
	margin-bottom: 0.625rem;
	color: var(--muted);
}

.kicker__cat {
	color: inherit;
	text-decoration: none;
}

.kicker__cat:hover {
	color: var(--vermilion-text);
}

.kicker__number {
	font-variant-numeric: tabular-nums;
}

.meta {
	font-size: 0.75rem;
	line-height: 1.5;
	letter-spacing: 0.02em;
	color: var(--muted);
	margin: 0;
}

.period {
	color: var(--vermilion);
}

.gloss {
	font-size: 0.66em;
	color: var(--muted);
	margin-left: 0.5em;
	letter-spacing: 0.05em;
	font-weight: 400;
}

/* Buttons ------------------------------------------------------------- */

.btn,
.wp-block-button__link {
	display: inline-block;
	border: 1px solid transparent;
	border-radius: 0;
	font-family: var(--ui);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 13px 26px;
	cursor: pointer;
	transition: background-color var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease;
}

.btn--ink,
.wp-block-button__link {
	background: var(--ink);
	color: var(--on-ink);
	border-color: var(--ink);
}

.btn--ink:hover,
.btn--ink:focus-visible,
.wp-block-button__link:hover {
	background: var(--vermilion);
	border-color: var(--vermilion);
	color: var(--on-ink);
}

.btn--accent {
	background: var(--vermilion);
	/*
	 * Pure white rather than paper: at 13px, #FAF7F1 on the brand vermilion is
	 * 4.30:1 and white is 4.67:1. At this size the two are indistinguishable
	 * and only one of them passes.
	 */
	color: #fff;
	border-color: var(--vermilion);
}

.btn--accent:hover,
.btn--accent:focus-visible {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-ink);
}

.btn--secondary {
	background: transparent;
	color: var(--ink);
	border-color: rgba(28, 26, 23, 0.4);
	padding: 12px 25px;
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--on-ink);
}

/* Tags and chips ------------------------------------------------------ */

.tag,
.chip {
	display: inline-block;
	border: 1px solid rgba(28, 26, 23, 0.3);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 6px 14px;
	text-decoration: none;
	color: var(--soft-ink);
	transition: background-color var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease;
}

.tag:hover,
.chip:hover,
.tag:focus-visible,
.chip:focus-visible {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-ink);
}

.chip {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	padding: 8px 18px;
}

.chip--active {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-ink);
}

/* Photo frames -------------------------------------------------------- */

.frame {
	position: relative;
	overflow: hidden;
	background: var(--paper-2);
}

.frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.frame--empty {
	background: repeating-linear-gradient(45deg, #efe9de 0 14px, #f5f0e6 14px 28px);
	display: grid;
	place-items: center;
}

.frame__label {
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
	color: var(--muted);
	border: 1px dashed rgba(28, 26, 23, 0.3);
	padding: 8px 12px;
	background: rgba(250, 247, 241, 0.6);
}

.vertical-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	writing-mode: vertical-rl;
	font-family: var(--han);
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	/*
	 * Decorative and aria-hidden, but it lies over photographs of unknown
	 * luminance. Ink type on a soft paper scrim keeps it legible over a dark
	 * night-market frame and stays invisible over the empty placeholder.
	 */
	color: rgba(28, 26, 23, 0.62);
	background: radial-gradient(
		130% 130% at 100% 100%,
		rgba(250, 247, 241, 0.92) 0%,
		rgba(250, 247, 241, 0.6) 42%,
		rgba(250, 247, 241, 0) 76%
	);
	padding: 44px 18px 22px 44px;
	pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* 5. Top bar and masthead                                                */
/* ---------------------------------------------------------------------- */

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 10px var(--gutter);
	border-bottom: 1px solid var(--rule);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.topbar__line {
	margin: 0;
}

.topbar__links {
	display: flex;
	align-items: center;
	gap: 22px;
}

.topbar__menu {
	display: flex;
	align-items: center;
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.topbar__menu a,
.topbar__lang {
	color: inherit;
	text-decoration: none;
}

.topbar__menu a:hover {
	color: var(--vermilion-text);
}

.topbar__lang {
	color: var(--vermilion-text);
	font-family: var(--han);
	letter-spacing: 0.1em;
	text-transform: none;
	font-size: 0.75rem;
}

.masthead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 26px var(--gutter);
	border-bottom: 2px solid var(--rule-strong);
	background: var(--paper);
}

.masthead--condensed {
	padding-top: 18px;
	padding-bottom: 18px;
}

.has-sticky-masthead .masthead {
	position: sticky;
	top: 0;
	z-index: 40;
}

/* Branding ------------------------------------------------------------ */

.brand {
	flex: 0 0 auto;
}

.brand__link {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	color: var(--ink);
}

.brand__link:hover {
	color: var(--ink);
}

.seal {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	background: var(--vermilion);
	border-radius: 4px;
	color: var(--on-ink);
}

.seal__glyph {
	width: 100%;
	height: 100%;
	fill: var(--on-ink);
}

.seal__char {
	font-family: var(--han);
	font-weight: 600;
	font-size: 23px;
	line-height: 1;
}

.masthead--condensed .seal {
	width: 34px;
	height: 34px;
	border-radius: 3px;
}

.masthead--condensed .seal__char {
	font-size: 18px;
}

.brand__wordmark {
	font-family: var(--display);
	font-size: 1.875rem;
	line-height: 1;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.brand__wordmark em {
	font-style: italic;
}

.brand--condensed .brand__wordmark {
	font-size: 1.4375rem;
}

.brand--custom img {
	max-height: 56px;
	width: auto;
}

/* Navigation ---------------------------------------------------------- */

.primary-nav {
	margin-left: auto;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu a {
	display: inline-block;
	font-size: 0.78125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--soft-ink);
	padding-bottom: 3px;
	border-bottom: 2px solid transparent;
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
	color: var(--ink);
	border-bottom-color: var(--rule);
}

.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current-menu-ancestor > a,
.primary-menu .current-post-parent > a,
.primary-menu .current_page_item > a {
	color: var(--ink);
	border-bottom-color: var(--vermilion);
}

.primary-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav__lang {
	display: none;
}

.masthead--condensed .primary-menu {
	gap: 28px;
	font-size: 0.75rem;
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	background: none;
	border: 1px solid var(--rule);
	padding: 9px 14px;
	cursor: pointer;
	font-family: var(--ui);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink);
	margin-left: auto;
}

.nav-toggle__bars {
	display: grid;
	gap: 3px;
	width: 16px;
}

.nav-toggle__bars i {
	display: block;
	height: 1px;
	background: var(--ink);
}

.search-toggle {
	background: none;
	border: 0;
	padding: 4px 2px;
	cursor: pointer;
	color: var(--vermilion-text);
	line-height: 1;
	flex: none;
}

.search-toggle__glyph {
	font-size: 1.375rem;
}

.search-toggle:hover {
	color: var(--ink);
}

/* Search overlay ------------------------------------------------------ */

.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: var(--paper);
	display: grid;
	place-items: center;
	padding: var(--gutter);
}

.search-overlay[hidden] {
	display: none;
}

.search-overlay__inner {
	width: min(680px, 100%);
	position: relative;
	text-align: center;
}

.search-overlay__close {
	position: fixed;
	top: var(--gutter);
	right: var(--gutter);
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--ink);
}

.searchform {
	display: flex;
	border: 1px solid var(--rule);
	background: var(--paper);
}

.searchform__field {
	flex: 1;
	border: 0;
	background: transparent;
	padding: 14px 16px;
	font-family: var(--ui);
	font-size: 0.9375rem;
	color: var(--ink);
	min-width: 0;
}

.searchform__field::placeholder {
	color: var(--muted);
}

.searchform__field:focus {
	outline: none;
}

.searchform:focus-within {
	border-color: var(--ink);
}

.searchform__submit {
	flex: none;
}

/* ---------------------------------------------------------------------- */
/* 6. Front page                                                          */
/* ---------------------------------------------------------------------- */

.hero {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: 1px;
	background: var(--rule);
	border-bottom: 1px solid var(--rule);
}

.hero__text {
	background: var(--paper);
	padding: 64px var(--gutter) 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero__title {
	font-size: clamp(2.375rem, 4.6vw, 4.125rem);
	line-height: 1.02;
	max-width: 15ch;
	margin: 0;
}

.hero__title a {
	text-decoration: none;
	color: inherit;
}

.hero__title a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--vermilion);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.1em;
}

.hero__standfirst {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--soft-ink);
	max-width: 44ch;
	margin: 1.5rem 0 1.875rem;
}

.hero__actions {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.hero__media {
	background: var(--paper);
	position: relative;
	min-height: 420px;
	display: grid;
}

.frame--hero {
	min-height: 420px;
	height: 100%;
}

.cover {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 1px;
	background: var(--rule);
}

.cover--full {
	grid-template-columns: 1fr;
}

.dispatches {
	background: var(--paper);
	display: flex;
	flex-direction: column;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 20px;
	padding: 28px var(--gutter) 20px;
}

.section-head__title {
	font-size: 1.75rem;
}

.section-head__link {
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--vermilion-text);
	text-decoration: none;
	white-space: nowrap;
}

.section-head__link:hover {
	text-decoration: underline;
}

.dispatch-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--rule);
	border-top: 1px solid var(--rule);
	flex: 1;
}

.dispatch {
	background: var(--paper);
	padding: 28px 32px 32px;
	display: flex;
	flex-direction: column;
}

.dispatch:nth-child(odd) {
	padding-left: var(--gutter);
}

.dispatch:nth-child(even) {
	padding-right: var(--gutter);
}

.dispatch__title {
	font-size: 1.625rem;
	line-height: 1.15;
	margin: 0 0 0.625rem;
}

.dispatch__title a {
	text-decoration: none;
	color: inherit;
}

.dispatch__title a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--vermilion);
	text-underline-offset: 0.14em;
}

.dispatch__excerpt {
	font-size: 0.84375rem;
	line-height: 1.55;
	color: var(--soft-ink);
	margin: 0 0 0.75rem;
}

.dispatch__more {
	margin: auto 0 0;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.dispatch__more a {
	color: var(--vermilion-text);
	text-decoration: none;
}

.dispatch__more a:hover {
	text-decoration: underline;
}

/* The Index ----------------------------------------------------------- */

.cover__aside {
	background: var(--paper);
	display: flex;
	flex-direction: column;
}

.index-list {
	padding: 28px 40px 24px;
	border-bottom: 1px solid var(--rule);
}

.index-list__title {
	font-family: var(--ui);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 1rem;
}

.index-list__title .han {
	letter-spacing: 0.2em;
	text-transform: none;
	margin-left: 0.35em;
	font-size: 0.8125rem;
}

.index-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.index-list__item + .index-list__item {
	border-top: 1px solid var(--rule-soft);
}

.index-list__item a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 0;
	text-decoration: none;
}

.index-list__name {
	font-family: var(--display);
	font-size: 1.125rem;
	line-height: 1.3;
}

.index-list__count {
	font-size: 0.6875rem;
	color: var(--muted);
	white-space: nowrap;
}

.index-list__item a:hover .index-list__name {
	color: var(--vermilion-text);
}

/* Newsletter ---------------------------------------------------------- */

.newsletter {
	background: var(--ink);
	color: var(--on-ink);
	padding: 28px 40px 30px;
}

.newsletter--panel {
	flex: 1;
}

.newsletter--band {
	margin: 0;
	padding: 40px var(--gutter);
}

.newsletter__seal {
	font-family: var(--han);
	font-size: 0.8125rem;
	letter-spacing: 0.4em;
	color: var(--vermilion-on-ink);
	margin: 0 0 0.75rem;
}

.newsletter__title {
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--on-ink);
	margin: 0;
}

.newsletter__title .period {
	color: var(--vermilion-on-ink);
}

.newsletter__form {
	display: flex;
	margin-top: 1.125rem;
}

.newsletter__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--ui);
	font-size: 0.75rem;
	padding: 11px 14px;
}

.newsletter__input::placeholder {
	color: var(--muted);
}

.newsletter__button {
	flex: none;
	padding: 11px 18px;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
}

.newsletter__note {
	font-size: 0.65625rem;
	line-height: 1.5;
	color: var(--on-ink-muted);
	margin: 0.625rem 0 0;
	letter-spacing: 0.02em;
}

.newsletter__embed {
	margin-top: 1.125rem;
}

.newsletter__embed input[type="email"],
.newsletter__embed input[type="text"] {
	width: 100%;
	border: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--ui);
	font-size: 0.8125rem;
	padding: 11px 14px;
}

.newsletter__embed input[type="submit"],
.newsletter__embed button {
	background: var(--vermilion);
	color: var(--on-ink);
	border: 0;
	font-family: var(--ui);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 11px 18px;
	margin-top: 8px;
	cursor: pointer;
}

.newsletter__embed a {
	color: var(--vermilion-on-ink);
}

/* ---------------------------------------------------------------------- */
/* 7. Article                                                             */
/* ---------------------------------------------------------------------- */

.crumbbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 10px var(--gutter);
	border-bottom: 1px solid var(--rule);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.breadcrumbs a:hover {
	color: var(--vermilion-text);
}

.breadcrumbs__sep {
	margin: 0 0.5em;
	color: var(--sep);
}

.crumbbar__number {
	color: var(--vermilion-text);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.article__header {
	max-width: 860px;
	margin: 0 auto;
	padding: 60px var(--gutter) 36px;
	text-align: center;
}

.article__title {
	font-size: clamp(2rem, 4.2vw, 3.5rem);
	line-height: 1.05;
}

.article__standfirst {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--soft-ink);
	max-width: 38em;
	margin: 1.375rem auto 1.625rem;
}

.article__byline {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 0.75rem;
	color: var(--muted);
	margin: 0;
}

.article__byline span[aria-hidden] {
	color: var(--sep);
}

.article__author {
	font-weight: 600;
	color: var(--ink);
}

.article__figure {
	max-width: calc(var(--wide) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.frame--figure {
	aspect-ratio: 5 / 2;
	max-height: 440px;
}

.article__caption {
	font-size: 0.71875rem;
	line-height: 1.5;
	color: var(--muted);
	text-align: right;
	margin-top: 8px;
}

.article__caption .han {
	letter-spacing: 0.08em;
}

.article__body {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 44px var(--gutter) 20px;
	color: var(--body-ink);
}

.article--page .article__header {
	text-align: left;
	max-width: calc(var(--measure) + var(--gutter) * 2);
	padding-bottom: 24px;
}

.article--page .article__standfirst {
	margin-left: 0;
}

/* Article body typography --------------------------------------------- */

.entry-content > p {
	font-size: 1rem;
	line-height: 1.75;
	margin: 0 0 1.375rem;
}

.entry-content > p:first-of-type {
	font-family: var(--display);
	font-size: 1.4375rem;
	line-height: 1.5;
	color: var(--ink);
	margin-bottom: 1.625rem;
}

.has-drop-cap .entry-content > p:first-of-type::first-letter {
	float: left;
	font-size: 4rem;
	line-height: 0.8;
	padding: 8px 12px 0 0;
	color: var(--vermilion);
}

.entry-content h2 {
	font-size: 1.875rem;
	line-height: 1.2;
	margin: 2.25rem 0 1rem;
}

.entry-content h3 {
	font-size: 1.4375rem;
	margin: 1.875rem 0 0.75rem;
}

.entry-content h4 {
	font-family: var(--ui);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 1.75rem 0 0.625rem;
	color: var(--ink);
}

.entry-content a {
	color: var(--vermilion-text);
	text-decoration: underline;
	text-decoration-color: rgba(201, 58, 34, 0.4);
}

.entry-content a:hover {
	text-decoration-color: currentColor;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.375rem;
	padding-left: 1.25rem;
}

.entry-content li {
	margin-bottom: 0.5rem;
}

.entry-content blockquote {
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--rule);
	border-left: 0;
	margin: 2.125rem 0;
	padding: 1.75rem 0;
	font-family: var(--display);
	font-size: 1.875rem;
	line-height: 1.25;
	font-style: italic;
	color: var(--ink);
}

.entry-content blockquote p {
	margin-bottom: 0.5rem;
	font-size: inherit;
	line-height: inherit;
}

.entry-content blockquote cite,
.entry-content blockquote .wp-block-quote__citation {
	display: block;
	font-family: var(--ui);
	font-style: normal;
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 0.75rem;
}

.entry-content figure {
	margin: 2rem 0;
}

.entry-content figcaption {
	font-size: 0.71875rem;
	color: var(--muted);
	margin-top: 8px;
	text-align: right;
}

.entry-content img {
	display: block;
}

.entry-content code,
.entry-content kbd {
	font-family: var(--mono);
	font-size: 0.875em;
	background: var(--paper-2);
	padding: 2px 5px;
}

.entry-content pre {
	font-family: var(--mono);
	font-size: 0.8125rem;
	background: var(--paper-2);
	padding: 18px 20px;
	overflow-x: auto;
	border-left: 3px solid var(--rule);
}

.entry-content hr,
.entry-content .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2.25rem 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	margin-bottom: 1.375rem;
}

.entry-content th,
.entry-content td {
	border-bottom: 1px solid var(--rule);
	padding: 10px 12px;
	text-align: left;
}

.entry-content th {
	font-family: var(--ui);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	border-bottom-color: var(--ink);
}

.entry-content .alignwide,
.entry-content .alignfull {
	max-width: var(--wide);
	margin-left: 50%;
	transform: translateX(-50%);
	width: 100vw;
}

@media (min-width: 780px) {
	.entry-content .alignwide,
	.entry-content .alignfull {
		width: var(--wide);
	}
}

.entry-content .alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
	max-width: 45%;
}

.entry-content .alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
	max-width: 45%;
}

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.page-links {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-top: 1.5rem;
}

.edit-link {
	margin-top: 2rem;
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* The practical bit --------------------------------------------------- */

.article__aside {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.practical {
	background: var(--paper-2);
	border-left: 3px solid var(--vermilion);
	padding: 22px 26px;
	margin: 1.5rem 0 0;
}

.practical__title {
	font-size: 0.625rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--vermilion-on-tint);
	margin: 0 0 0.625rem;
	font-weight: 500;
}

.practical__title .han {
	letter-spacing: 0.16em;
	margin-left: 0.5em;
	text-transform: none;
	font-size: 0.8125rem;
}

.practical__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 24px;
	margin: 0;
	font-size: 0.84375rem;
	line-height: 1.6;
}

.practical__row dt {
	display: inline;
	font-weight: 600;
}

.practical__row dt::after {
	content: " — ";
	font-weight: 400;
	color: var(--muted);
}

.practical__row dd {
	display: inline;
	margin: 0;
	color: var(--soft-ink);
}

/* Tags, author box, related -------------------------------------------- */

.article__tags {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 2.25rem auto 0;
	padding: 0 var(--gutter);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.article__author-box {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 2.25rem auto 0;
	padding: 0 var(--gutter);
}

.author-box {
	display: flex;
	align-items: center;
	gap: 18px;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	padding: 22px 0;
}

.author-box__avatar {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: repeating-linear-gradient(45deg, #efe9de 0 8px, #e6dfd0 8px 16px);
}

.author-box__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.author-box__name {
	font-family: var(--display);
	font-size: 1.1875rem;
	line-height: 1.2;
	margin: 0 0 0.25rem;
}

.author-box__bio {
	font-size: 0.78125rem;
	line-height: 1.5;
	color: var(--soft-ink);
	margin: 0;
}

.related {
	max-width: calc(var(--wide) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 44px var(--gutter) 60px;
}

.related__title {
	font-size: 1.625rem;
	margin-bottom: 1.375rem;
}

.related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--rule);
	border-top: 1px solid var(--rule);
}

.related__item {
	background: var(--paper);
	padding: 22px 24px 22px 0;
	display: flex;
	flex-direction: column;
}

.related__item:not(:first-child) {
	padding-left: 24px;
}

.related__item-title {
	font-size: 1.3125rem;
	line-height: 1.2;
	margin: 0 0 0.5rem;
}

.related__item-title a {
	text-decoration: none;
	color: inherit;
}

.related__item-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--vermilion);
}

.article__comments {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter) 60px;
}

/* ---------------------------------------------------------------------- */
/* 8. Archives                                                            */
/* ---------------------------------------------------------------------- */

.archive-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 32px;
	padding: 56px var(--gutter) 36px;
	border-bottom: 1px solid var(--rule);
}

.archive-head__title {
	font-size: clamp(2.125rem, 4.4vw, 3.75rem);
	line-height: 1;
}

.archive-head__desc {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--soft-ink);
	max-width: 46ch;
	margin-top: 1.125rem;
}

.archive-head__desc p:last-child {
	margin-bottom: 0;
}

.archive-head__watermark {
	writing-mode: vertical-rl;
	font-size: 2.75rem;
	letter-spacing: 0.2em;
	color: var(--faint);
	flex: none;
	line-height: 1;
}

.filterbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 20px var(--gutter);
	border-bottom: 1px solid var(--rule);
}

.chips {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.sortform {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem;
	color: var(--muted);
}

.sortform__select {
	font-family: var(--ui);
	font-size: 0.75rem;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 0;
	padding: 7px 10px;
}

.sortform__go {
	font-family: var(--ui);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: none;
	border: 1px solid var(--rule);
	padding: 8px 12px;
	cursor: pointer;
	color: var(--ink);
}

.sortform__go[hidden] {
	display: none;
}

.sortform__go:hover {
	background: var(--ink);
	color: var(--on-ink);
	border-color: var(--ink);
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--rule);
	border-bottom: 1px solid var(--rule);
}

.card {
	background: var(--paper);
	display: flex;
	flex-direction: column;
}

.card__media {
	display: block;
}

.frame--card {
	aspect-ratio: 16 / 7;
}

.card__body {
	padding: 22px 28px 26px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.card__title {
	font-size: 1.5rem;
	line-height: 1.15;
	margin: 0 0 0.625rem;
}

.card__title a {
	text-decoration: none;
	color: inherit;
}

.card__title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--vermilion);
	text-underline-offset: 0.14em;
}

.card .meta {
	margin-top: auto;
}

.pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 32px var(--gutter);
	font-size: 0.8125rem;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid rgba(28, 26, 23, 0.3);
	text-decoration: none;
	color: var(--ink);
	letter-spacing: 0.04em;
}

.pagination .page-numbers.current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-ink);
}

.pagination .page-numbers:hover:not(.current) {
	border-color: var(--ink);
	color: var(--vermilion-text);
}

.pagination .prev,
.pagination .next {
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.75rem;
	color: var(--vermilion-text);
}

.pagination .dots {
	border-color: transparent;
}

.no-results {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 64px var(--gutter) 72px;
	text-align: center;
}

.no-results__title {
	font-size: clamp(1.875rem, 3.6vw, 2.75rem);
	margin-bottom: 1rem;
}

.no-results__text {
	color: var(--soft-ink);
	margin-bottom: 1.75rem;
}

.no-results .searchform {
	text-align: left;
}

/* Simple pages --------------------------------------------------------- */

.page-body {
	max-width: calc(var(--wide) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 72px var(--gutter) 80px;
}

.page-body--narrow {
	max-width: calc(var(--measure) + var(--gutter) * 2);
}

.page-title {
	font-size: clamp(2rem, 4.2vw, 3.5rem);
	line-height: 1.05;
	margin-bottom: 1.25rem;
}

.page-lede {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--soft-ink);
	margin-bottom: 2rem;
}

.page-back {
	margin-top: 2rem;
}

/* ---------------------------------------------------------------------- */
/* 9. Comments                                                            */
/* ---------------------------------------------------------------------- */

.comments {
	border-top: 2px solid var(--ink);
	padding-top: 2.5rem;
	margin-top: 2.5rem;
}

.comments__title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
}

.comments__list,
.comments__list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comments__list .children {
	padding-left: 24px;
	border-left: 1px solid var(--rule);
	margin-top: 1rem;
}

.comments__list .comment-body {
	border-bottom: 1px solid var(--rule);
	padding: 1.25rem 0;
	font-size: 0.9375rem;
}

.comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.8125rem;
	font-weight: 500;
}

.comments__list .comment-author img {
	border-radius: 50%;
	width: 44px;
	height: 44px;
}

.comments__list .comment-metadata,
.comments__list .reply {
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.comments__list .comment-metadata a,
.comments__list .reply a {
	color: var(--vermilion-text);
	text-decoration: none;
}

.comment-form label {
	display: block;
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--rule);
	background: var(--paper);
	font-family: var(--ui);
	font-size: 0.9375rem;
	color: var(--ink);
	padding: 10px 12px;
	border-radius: 0;
}

.comment-form textarea:focus,
.comment-form input:focus {
	border-color: var(--ink);
	outline: none;
}

.comment-form .form-submit {
	margin-top: 1rem;
}

/* ---------------------------------------------------------------------- */
/* 10. Footer                                                             */
/* ---------------------------------------------------------------------- */

.site-footer {
	border-top: 2px solid var(--ink);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 32px;
	padding: 36px var(--gutter);
}

.footer-brand__lockup {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--ink);
	margin-bottom: 0.875rem;
}

.footer-brand__lockup .seal {
	width: 32px;
	height: 32px;
	border-radius: 3px;
}

.footer-brand__lockup .seal__char {
	font-size: 17px;
}

.footer-brand__name {
	font-family: var(--display);
	font-size: 1.3125rem;
	line-height: 1;
}

.footer-brand__name em {
	font-style: italic;
}

.footer-brand__blurb {
	font-size: 0.78125rem;
	line-height: 1.6;
	color: var(--muted);
	max-width: 32ch;
	margin: 0;
}

.footer-col__title {
	font-family: var(--ui);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 0.75rem;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 0.8125rem;
}

.footer-menu a {
	text-decoration: none;
	color: var(--soft-ink);
}

.footer-menu a:hover {
	color: var(--vermilion-text);
}

.footer-legal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 16px var(--gutter);
	border-top: 1px solid var(--rule);
	font-size: 0.6875rem;
	color: var(--muted);
}

.footer-legal--standalone {
	border-top: 0;
}

.footer-legal__colophon {
	letter-spacing: 0.3em;
}

/* ---------------------------------------------------------------------- */
/* 11. Responsive                                                         */
/* ---------------------------------------------------------------------- */

@media (max-width: 1080px) {
	.hero {
		grid-template-columns: 1fr;
	}

	.hero__text {
		padding-top: 44px;
		padding-bottom: 36px;
		order: 2;
	}

	.hero__media {
		order: 1;
		min-height: 0;
	}

	/*
	 * min-height and aspect-ratio together make the box solve for width, which
	 * overflows a narrow viewport. Below the two-column breakpoint the frame is
	 * driven by its ratio alone.
	 */
	.frame--hero {
		min-height: 0;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.cover {
		grid-template-columns: 1fr;
	}

	.post-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.related__grid {
		grid-template-columns: 1fr;
	}

	.related__item,
	.related__item:not(:first-child) {
		padding: 20px 0;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 900px) {
	.nav-toggle {
		display: inline-flex;
	}

	.primary-nav {
		display: none;
		order: 4;
		width: 100%;
		margin-left: 0;
		padding-top: 20px;
		border-top: 1px solid var(--rule);
	}

	.primary-nav.is-open {
		display: block;
	}

	.masthead {
		flex-wrap: wrap;
	}

	.primary-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.primary-menu > li {
		width: 100%;
		border-bottom: 1px solid var(--rule-soft);
	}

	.primary-menu a {
		display: block;
		padding: 12px 0;
		border-bottom: 0;
		font-size: 0.875rem;
	}

	.primary-menu .current-menu-item > a,
	.primary-menu .current-menu-parent > a,
	.primary-menu .current-post-parent > a {
		border-bottom: 0;
		color: var(--vermilion-text);
	}

	.primary-menu .sub-menu a {
		padding-left: 16px;
		color: var(--muted);
	}

	.primary-nav__lang {
		display: inline-block;
		margin-top: 14px;
		font-family: var(--han);
		color: var(--vermilion-text);
		text-decoration: none;
	}

	.dispatch-grid {
		grid-template-columns: 1fr;
	}

	.dispatch,
	.dispatch:nth-child(odd),
	.dispatch:nth-child(even) {
		padding-left: var(--gutter);
		padding-right: var(--gutter);
	}

	.archive-head {
		align-items: flex-start;
	}

	.archive-head__watermark {
		font-size: 2rem;
	}

	.article__header {
		padding-top: 40px;
	}
}

@media (max-width: 680px) {
	.topbar {
		font-size: 0.625rem;
		gap: 8px;
	}

	.topbar__line {
		flex: 1 1 100%;
	}

	.post-grid {
		grid-template-columns: 1fr;
	}

	.practical__grid {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.article__header {
		text-align: left;
	}

	.article__standfirst {
		margin-left: 0;
	}

	.article__byline {
		justify-content: flex-start;
	}

	.entry-content > p:first-of-type {
		font-size: 1.25rem;
	}

	.has-drop-cap .entry-content > p:first-of-type::first-letter {
		font-size: 3.25rem;
	}

	.entry-content blockquote {
		font-size: 1.5rem;
	}

	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		margin: 1.5rem 0;
		max-width: 100%;
	}

	.searchform {
		flex-wrap: wrap;
	}

	.searchform__submit {
		width: 100%;
	}

	.sortform {
		margin-left: 0;
		width: 100%;
	}

	.sortform__select {
		flex: 1;
	}

	.brand__wordmark {
		font-size: 1.5rem;
	}

	.seal {
		width: 36px;
		height: 36px;
	}

	.seal__char {
		font-size: 19px;
	}

	.archive-head__watermark {
		display: none;
	}
}

/* ---------------------------------------------------------------------- */
/* 12. Print                                                              */
/* ---------------------------------------------------------------------- */

@media print {
	.topbar,
	.masthead,
	.crumbbar,
	.filterbar,
	.related,
	.newsletter,
	.site-footer,
	.search-overlay,
	.article__tags {
		display: none !important;
	}

	body {
		background: #fff;
	}

	.article__body {
		max-width: none;
		padding: 0;
	}
}
