/* ==========================================================================
   Perim — main stylesheet
   Identity: Bab al-Mandab. Deep-sea blue, the logo's cyan and olive,
   Markazi Text for reading, IBM Plex Sans Arabic for the interface.
   ========================================================================== */

/* Tokens
   -------------------------------------------------------------------------- */
:root {
	--ink: #10252d;
	--ink-2: #2f4850;
	--muted: #4a636b;
	--paper: #ffffff;
	--mist: #eef5f6;
	--rule: #d8e4e7;
	--rule-strong: #b9ccd1;
	--sea: #00788a;
	--sea-bright: #00afc0;
	--olive: #8f9a35;
	--abyss: #072b36;
	--abyss-2: #0c3d4a;
	--on-abyss: #e8f3f4;
	--on-abyss-muted: #a3c3c9;
	/* Section pill: the logo's olive, deep enough to carry white text. */
	--pill: #6f7926;
	--on-pill: #fff;
	/* Focus rings and form-field edges keep 3:1 against both paper and mist. */
	--focus: #00788a;
	--field-edge: #748b92;
	/* Primary buttons. */
	--action: var(--abyss);
	--on-action: #fff;
	--action-hover: var(--sea);

	--font-serif: "Markazi Text", "Noto Naskh Arabic", "Amiri", serif;
	--font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

	--fs-xs: 0.875rem;
	--fs-sm: 0.9375rem;
	--fs-base: 1rem;
	--fs-md: 1.125rem;
	--fs-lg: 1.3125rem;
	--fs-xl: 1.625rem;
	--fs-2xl: clamp(1.75rem, 1.35rem + 1.2vw, 2.375rem);
	--fs-3xl: clamp(2rem, 1.45rem + 1.9vw, 3.125rem);
	--fs-4xl: clamp(2.25rem, 1.5rem + 2.7vw, 3.875rem);

	--container: 1280px;
	--gutter: clamp(1rem, 0.4rem + 2.2vw, 2rem);
	--space-section: clamp(3rem, 2rem + 3vw, 5.5rem);
	--radius-img: 6px;
	--radius-box: 12px;
	--radius-pill: 999px;
	--tint: #f3f7f8;
	--band: #e8f1f3;
	--card-shadow: 0 1px 2px rgb(7 43 54 / 0.05), 0 12px 28px -20px rgb(7 43 54 / 0.4);
	--header-h: 76px;
	--sticky-offset: calc(var(--header-h) + 1.25rem);

	/* "only" keeps phone browsers' own dark mode (Samsung Internet, Chrome) from darkening the light site. */
	color-scheme: only light;
}

:root[data-theme="dark"] {
	--tint: #08222a;
	--band: #0b2830;
	--card-shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 12px 28px -20px rgb(0 0 0 / 0.9);
	--ink: #e3eef0;
	--ink-2: #bfd3d8;
	--muted: #9db8bf;
	--paper: #061c23;
	--mist: #0b2830;
	--rule: #17363f;
	--rule-strong: #255260;
	--sea: #45c6d5;
	--sea-bright: #2fd2e2;
	--olive: #b9c55e;
	--abyss: #02141a;
	--abyss-2: #082731;
	--on-abyss: #e3eef0;
	--on-abyss-muted: #8fb2ba;
	--pill: #b9c55e;
	--on-pill: #061c23;
	--focus: #2fd2e2;
	--field-edge: #55808c;
	--action: var(--sea);
	--on-action: #061c23;
	--action-hover: #8fdde6;
	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--sticky-offset);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	display: block;
	height: auto;
}

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

h1,
h2,
h3,
h4 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* Arabic has no true italic; avoid synthesised slanting. */
em,
i {
	font-style: normal;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
	border-radius: 2px;
}

/* The dark bands keep the bright ring in light mode too, and so does the skip link. */
.skip-link,
.issue-band,
.issue-hero,
.about-hero,
.site-footer {
	--focus: var(--sea-bright);
}

::selection {
	background: color-mix(in srgb, var(--sea-bright) 30%, transparent);
}

.icon {
	display: inline-block;
	flex: none;
	vertical-align: middle;
}

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

.skip-link {
	position: absolute;
	top: -100px;
	inset-inline-start: 1rem;
	z-index: 200;
	padding: 0.6rem 1rem;
	border-radius: var(--radius-pill);
	background: var(--abyss);
	color: #fff;
	font-weight: 600;
}

.skip-link:focus {
	top: 1rem;
}

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

.contours {
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Buttons
   -------------------------------------------------------------------------- */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.72rem 1.4rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	background: var(--action);
	color: var(--on-action);
	font-size: var(--fs-sm);
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.button:hover {
	background: var(--action-hover);
}

.button--small {
	padding: 0.48rem 1.05rem;
	font-size: var(--fs-xs);
}

.button--ghost {
	border-color: var(--rule-strong);
	background: transparent;
	color: var(--ink);
}

.button--ghost:hover {
	border-color: var(--sea);
	background: transparent;
	color: var(--sea);
}

.button--light {
	background: #fff;
	color: #072b36;
}

.button--light:hover {
	background: var(--sea-bright);
	color: #04222a;
}

.button--outline-light {
	border-color: rgb(255 255 255 / 0.35);
	background: transparent;
	color: #fff;
}

.button--outline-light:hover {
	border-color: #fff;
	background: rgb(255 255 255 / 0.08);
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
	background: var(--mist);
	color: var(--sea);
}

.icon-btn--outline {
	border: 1px solid var(--rule-strong);
}

.theme-toggle .icon-sun {
	display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
	display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
	display: inline-block;
}

/* Social links (footer and menu drawer)
   -------------------------------------------------------------------------- */
.social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social a {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	transition: color 0.2s, background-color 0.2s;
}

.social a:hover {
	background: rgb(255 255 255 / 0.08);
	color: var(--sea-bright);
}

/* Header: one row with the logo, the menu and the search
   -------------------------------------------------------------------------- */
.masthead {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	border-bottom: 1px solid var(--rule);
	background: var(--paper);
	transition: box-shadow 0.3s;
}

/* Once the page scrolls under it, a short shadow separates the header from the page. */
.masthead.is-stuck {
	box-shadow: 0 8px 20px -16px rgb(4 30 38 / 0.5);
}

.masthead__inner {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 0.2rem + 1.4vw, 2rem);
	height: var(--header-h);
}

.logo {
	display: inline-flex;
	flex: none;
	align-items: center;
}

.logo__img {
	width: auto;
	height: 50px;
}

.logo__img--light {
	display: none;
}

:root[data-theme="dark"] .logo__img--default {
	display: none;
}

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

.logo__text {
	color: var(--sea);
	font-family: var(--font-serif);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1;
}

.primary-nav {
	align-self: stretch;
	min-width: 0;
}

.primary-nav__list {
	display: flex;
	gap: 0.15rem;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav__list > li {
	position: relative;
	display: flex;
	align-items: center;
}

.primary-nav__list > li > a,
.primary-nav__list > li > .submenu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.45rem 0.75rem;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--ink-2);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.primary-nav__list > li > a:hover,
.primary-nav__list > li > .submenu-toggle:hover,
.primary-nav__list > li > [aria-expanded="true"] {
	background: var(--mist);
	color: var(--ink);
}

/* The section being read: a filled pill, as the reference site marks it. */
.primary-nav__list > .current-menu-item > a,
.primary-nav__list > .current-menu-parent > a,
.primary-nav__list > .current-menu-parent > .submenu-toggle,
.primary-nav__list > .current-menu-ancestor > a,
.primary-nav__list > .current-post-ancestor > a,
.primary-nav__list > .current-category-ancestor > a {
	background: var(--mist);
	color: var(--sea);
}

/* Built menus: the parent keeps its link, and a small button beside it opens the list. */
.primary-nav__list > li > .submenu-toggle--icon {
	width: 30px;
	height: 30px;
	justify-content: center;
	margin-inline-start: -0.45rem;
	padding: 0;
}

.submenu-toggle .icon {
	transition: transform 0.2s;
}

.submenu-toggle[aria-expanded="true"] .icon {
	transform: rotate(180deg);
}

.primary-nav .sub-menu {
	position: absolute;
	top: calc(100% - 0.35rem);
	inset-inline-start: 0;
	z-index: 10;
	display: none;
	min-width: 230px;
	margin: 0;
	padding: 0.45rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	box-shadow: 0 18px 40px -18px rgb(4 30 38 / 0.35);
	list-style: none;
}

.primary-nav [aria-expanded="true"] + .sub-menu,
.primary-nav [aria-expanded="true"] ~ .sub-menu {
	display: block;
}

/* Without scripts the lists open on keyboard focus; with a mouse they open on hover. */
html:not(.js) .primary-nav li:focus-within > .sub-menu {
	display: block;
}

@media (hover: hover) {
	.primary-nav .menu-item-has-children:hover > .sub-menu {
		display: block;
	}
}

.primary-nav .sub-menu a {
	display: block;
	padding: 0.55rem 0.8rem;
	border-radius: 8px;
	color: var(--ink);
	font-size: var(--fs-sm);
	line-height: 1.5;
	white-space: nowrap;
}

.primary-nav .sub-menu a:hover {
	background: var(--mist);
	color: var(--sea);
}

.primary-nav .sub-menu .current-menu-item > a {
	color: var(--sea);
	font-weight: 700;
}

.masthead__actions {
	display: flex;
	flex: none;
	align-items: center;
	gap: 0.4rem;
	margin-inline-start: auto;
}

/* The current issue, always one click away. */
.masthead__issue {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.42rem 0.9rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	color: var(--ink-2);
	font-size: var(--fs-sm);
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	transition: border-color 0.2s, color 0.2s;
}

.masthead__issue .icon {
	color: var(--sea);
}

.masthead__issue:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.masthead__search {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 40px;
	padding-inline: 0.8rem 1rem;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--mist);
	color: var(--ink-2);
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s, background-color 0.2s;
}

.masthead__search:hover {
	color: var(--sea);
}

.masthead__menu {
	display: none;
}

/* Cards, laid out like Sanaa Center's: a white box with the picture on top and the
   section on the picture, then date and reading time, title, writers, a short
   summary and the read link at the foot. One picture shape (16:9) everywhere.
   -------------------------------------------------------------------------- */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.95rem;
	min-width: 0;
}

.card--standard {
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	box-shadow: var(--card-shadow);
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius-img);
	background: var(--mist);
}

.card--standard .card__media {
	border-radius: 0;
}

.card__media img,
.media-fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.media-fallback {
	display: block;
	background: linear-gradient(160deg, #0c4554, #052631);
	color: var(--sea-bright);
}

.media-fallback .contours {
	opacity: 0.3;
}

.card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.45rem;
	min-width: 0;
}

.card--standard .card__body {
	padding: 1rem 1.2rem 1.15rem;
}

.card__labels {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

/* On a boxed card the section and the issue sit on the picture's top corner. */
.card--standard .card__labels {
	position: absolute;
	top: 0.75rem;
	inset-inline-start: 0.75rem;
	z-index: 1;
}

.card--standard .card__labels .kicker,
.card--standard .card__labels .issue-badge {
	padding: 0.2rem 0.7rem;
	border: 0;
	border-radius: 6px;
	background: rgb(4 32 42 / 0.82);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
}

.card--standard .card__labels a:hover {
	background: var(--sea);
	color: #fff;
	text-decoration: none;
}

.kicker {
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 700;
	line-height: 1.4;
}

.kicker:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* Small text links get a touch target at least 24px tall without moving the text. */
.kicker,
.byline__author,
.card__author,
.author-box__link {
	position: relative;
}

.kicker::after,
.byline__author::after,
.card__author::after,
.author-box__link::after {
	content: "";
	position: absolute;
	inset: -0.3rem 0;
}

/* Date and reading time above the title, each with its icon. */
.card__when {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-xs);
	line-height: 1.5;
}

.card__when > span {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.card__when .icon {
	flex: none;
	color: var(--sea);
}

.card__title {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.4;
}

.card__title a:hover,
.pick__more a:hover,
.file-card__list a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.card__authors {
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-xs);
	line-height: 1.6;
}

.card__authors .sep {
	color: var(--muted);
}

.card__author {
	color: var(--ink-2);
	font-weight: 600;
}

.card__author:hover {
	color: var(--sea);
}

.card__summary {
	margin: 0.2rem 0 0;
	color: var(--ink-2);
	font-size: var(--fs-sm);
	line-height: 1.85;
}

/* The read link closes the card, level across a row of cards. */
.card__read,
.hero__read {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 0.55rem;
	color: var(--sea);
	font-size: var(--fs-sm);
	font-weight: 700;
	transition: color 0.2s;
}

.card__read:hover,
.hero__read:hover {
	color: var(--ink);
}

.byline {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-top: 0.15rem;
	color: var(--muted);
	font-size: var(--fs-xs);
	line-height: 1.5;
}

/* Writers' portraits; several overlap, the first on top as the byline reads. */
.avatar-stack {
	display: inline-flex;
	flex: none;
}

.avatar-stack img {
	position: relative;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 2px var(--paper);
}

.avatar-stack img + img {
	margin-inline-start: -0.65rem;
}

.avatar-stack img:nth-child(1) {
	z-index: 3;
}

.avatar-stack img:nth-child(2) {
	z-index: 2;
}

.avatar-stack img:nth-child(3) {
	z-index: 1;
}

.byline .avatar-stack img {
	width: 40px;
	height: 40px;
}

.byline__text {
	display: flex;
	flex-direction: column;
}

.byline__author {
	color: var(--ink-2);
	font-weight: 600;
}

.byline__author:hover {
	color: var(--sea);
}

/* A section page opens with its newest article as Sanaa Center's do: the text on
   a navy panel beside the picture. */
.card--feature {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
	gap: 0;
	min-height: clamp(300px, 26vw, 400px);
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.06);
	border-radius: var(--radius-box);
	background: var(--abyss);
	color: var(--on-abyss);
	box-shadow: var(--card-shadow);
}

.card--feature .card__media {
	grid-row: 1;
	grid-column: 2;
	aspect-ratio: auto;
	min-height: 100%;
	border-radius: 0;
}

.card--feature .card__body {
	grid-row: 1;
	grid-column: 1;
	justify-content: center;
	gap: 0.75rem;
	padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.card--feature .card__title {
	color: #fff;
	font-size: var(--fs-2xl);
	line-height: 1.3;
}

.card--feature .card__when,
.card--feature .byline {
	color: var(--on-abyss-muted);
}

.card--feature .card__when .icon {
	color: var(--sea-bright);
}

.card--feature .card__summary {
	color: var(--on-abyss);
	font-size: var(--fs-md);
}

.card--feature .byline__author {
	color: #fff;
}

.card--feature .card__read {
	margin-top: 0.5rem;
	padding: 0.6rem 1.35rem;
	border-radius: var(--radius-pill);
	background: #fff;
	color: #072b36;
}

.card--feature .card__read:hover {
	background: var(--sea-bright);
	color: #072b36;
}

.card--text .card__title {
	font-size: 1.5rem;
}

.card--row {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	align-items: start;
	gap: 1.75rem;
}

.card--row .card__title {
	font-size: 1.6rem;
}

.card__play {
	position: absolute;
	inset-inline-start: 1rem;
	bottom: 1rem;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgb(7 43 54 / 0.85);
	color: #fff;
}

/* Sections: a coloured line above the title and a small "تصفّح المزيد" button
   across from it, as on Sanaa Center's home page, with tinted bands between.
   -------------------------------------------------------------------------- */
.section {
	margin-block: var(--space-section);
}

.band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: var(--space-section);
}

/* A tinted band stands apart from the white ones, as Sanaa Center's coloured bands do. */
.band--tint {
	background: var(--band);
}

.band__motif,
.hero__motif,
.article-head__motif {
	position: absolute;
	inset: 0;
	z-index: -1;
	color: var(--sea);
	opacity: 0.05;
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: 1.75rem;
}

.section-head__eyebrow {
	margin: 0 0 0.3rem;
	color: var(--pill);
	font-size: var(--fs-sm);
	font-weight: 700;
}

.section-head__title {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: var(--fs-2xl);
	font-weight: 700;
	line-height: 1.2;
}

.section-head__desc {
	max-width: 62ch;
	margin: 0.4rem 0 0;
	color: var(--muted);
	font-size: var(--fs-sm);
}

.section-head__link {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	background: var(--pill);
	color: var(--on-pill);
	font-size: var(--fs-xs);
	font-weight: 700;
	transition: background-color 0.2s, color 0.2s;
}

.section-head__link:hover {
	background: var(--ink);
	color: var(--paper);
}

.grid {
	display: grid;
	gap: 2rem 1.5rem;
}

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

/* Featured stories: one large picture at a time with arrows on its sides, and
   under it the section, title, writers and date.
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(1.25rem, 1rem + 1vw, 2rem) clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
	background: var(--paper);
}

.hero__inner {
	position: relative;
	container-type: inline-size;
}

.hero__track,
.carousel__track {
	display: grid;
	grid-auto-flow: column;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hero__track::-webkit-scrollbar,
.carousel__track::-webkit-scrollbar {
	display: none;
}

.hero__track {
	grid-auto-columns: 100%;
}

.hero__slide,
.carousel__track > * {
	min-width: 0;
	scroll-snap-align: start;
}

.hero__media {
	display: block;
	aspect-ratio: 16 / 7;
	overflow: hidden;
	border-radius: var(--radius-box);
	background: var(--mist);
}

.hero__media img,
.hero__media .media-fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.8rem;
	max-width: 920px;
	padding-top: 1.5rem;
}

.hero__body .kicker,
.card--feature .kicker {
	padding: 0.25rem 0.95rem 0.3rem;
	border-radius: var(--radius-pill);
	background: var(--pill);
	color: var(--on-pill);
	font-size: var(--fs-sm);
}

.hero__body .kicker:hover,
.card--feature .kicker:hover {
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
}

.hero__title {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: clamp(1.85rem, 1.3rem + 1.6vw, 2.75rem);
	font-weight: 700;
	line-height: 1.3;
}

.hero__title a:hover {
	color: var(--sea);
}

.hero__read {
	margin-top: 0.15rem;
	padding-top: 0;
}

/* Round arrows on the picture's sides (the hero) or at the row's ends. */
.carousel-arrow {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--action);
	color: var(--on-action);
	box-shadow: 0 8px 20px -10px rgb(0 0 0 / 0.6);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s, opacity 0.2s;
}

.carousel-arrow:hover {
	background: var(--action-hover);
}

.hero .carousel-arrow {
	top: calc(100cqi * 7 / 32);
}

.carousel-arrow--prev {
	inset-inline-start: calc(var(--gutter) - 23px);
}

.carousel-arrow--next {
	inset-inline-end: calc(var(--gutter) - 23px);
}

/* A row of cards that scrolls sideways; --per-view cards show at once. */
.carousel {
	--carousel-gap: 1.5rem;
	--pv: var(--per-view, 3);
	position: relative;
}

.carousel__track {
	grid-auto-columns: calc((100% - (var(--pv) - 1) * var(--carousel-gap)) / var(--pv));
	gap: var(--carousel-gap);
	padding-block: 0.25rem 0.75rem;
}

.carousel .carousel-arrow {
	top: 45%;
}

.carousel .carousel-arrow--prev {
	inset-inline-start: -23px;
}

.carousel .carousel-arrow--next {
	inset-inline-end: -23px;
}

.carousel[data-static] .carousel-arrow {
	display: none;
}

/* Current issue: a navy band, as Sanaa Center shows its featured periodical.
   The issue page's hero shares its title, month and button styles.
   -------------------------------------------------------------------------- */
.issue-band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: var(--space-section);
	background: radial-gradient(120% 140% at 85% 20%, #0d4655 0%, #072b36 55%, #04202a 100%);
	color: var(--on-abyss);
}

:root[data-theme="dark"] .issue-band {
	background: radial-gradient(120% 140% at 85% 20%, #08313c 0%, #031820 60%, #020f14 100%);
}

.issue-band__motif {
	position: absolute;
	inset: 0;
	z-index: -1;
	color: var(--sea-bright);
	opacity: 0.08;
}

.issue-band .section-head__eyebrow {
	color: #c9d46c;
}

.issue-band .section-head__title {
	color: #fff;
	font-size: var(--fs-3xl);
}

.issue-band .section-head__link {
	background: rgb(255 255 255 / 0.12);
	color: #fff;
}

.issue-band .section-head__link:hover {
	background: #fff;
	color: #072b36;
}

.issue-band__feature {
	display: grid;
	grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
	padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: var(--radius-box);
	background: rgb(255 255 255 / 0.04);
}

.issue-band__title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 1.9rem + 2vw, 3.75rem);
	font-weight: 700;
	line-height: 1;
}

.issue-band__month {
	margin: 0;
	color: var(--on-abyss-muted);
	font-size: var(--fs-md);
}

.issue-hero .issue-band__month {
	margin-top: 0.9rem;
}

.issue-band__editorial-title {
	margin: 1rem 0 0;
	font-family: var(--font-serif);
	font-size: var(--fs-xl);
	font-weight: 700;
	line-height: 1.3;
}

.issue-band__editorial-title a:hover {
	color: var(--sea-bright);
}

.issue-band__editorial {
	max-width: 70ch;
	margin: 0.6rem 0 0;
	color: var(--on-abyss);
	font-size: var(--fs-md);
	line-height: 1.9;
}

.issue-band__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7rem;
	margin-top: 1.75rem;
}

.issue-band__contents {
	margin-top: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

.issue-band__toc-title {
	margin: 0 0 1.1rem;
	color: #fff;
	font-size: var(--fs-lg);
	font-weight: 700;
}

/* The issue's articles as dark cards. */
.issue-band .card--standard {
	border-color: rgb(255 255 255 / 0.12);
	background: #0a3541;
	box-shadow: none;
}

.issue-band .card__title {
	color: #fff;
	font-size: 1.2rem;
}

.issue-band .card__when,
.issue-band .card__authors,
.issue-band .card__author {
	color: var(--on-abyss-muted);
}

.issue-band .card__when .icon {
	color: var(--sea-bright);
}

.issue-band .card__author:hover {
	color: #fff;
}

.issue-band .carousel-arrow {
	background: #fff;
	color: #072b36;
}

.issue-band .carousel-arrow:hover {
	background: var(--sea-bright);
}

/* Issue cover (uploaded or generated). The spine sits on the right, as in Arabic binding. */
.issue-cover {
	position: relative;
	display: block;
	container-type: inline-size;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 6px 2px 2px 6px;
	background: #0b3a47;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 22px 45px -18px rgb(2 18 24 / 0.7);
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.issue-cover::after {
	content: "";
	position: absolute;
	inset-block: 0;
	right: 0;
	width: 6%;
	background: linear-gradient(to left, rgb(0 0 0 / 0.28), rgb(255 255 255 / 0.06) 60%, transparent);
	pointer-events: none;
}

a.issue-cover:hover {
	transform: translateY(-4px);
}

.issue-cover--lg {
	width: 100%;
	max-width: 300px;
}

.issue-cover--sm {
	width: 112px;
}

.issue-cover__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.issue-cover__generated {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	padding: 10cqi 11cqi 9cqi;
	background: linear-gradient(165deg, #0e4a59 0%, #062d38 58%, #041f27 100%);
	color: #fff;
}

.issue-cover__motif {
	position: absolute;
	inset: 0;
	color: #3fd0de;
	opacity: 0.32;
}

.issue-cover__brand {
	position: relative;
	color: #3fd0de;
	font-family: var(--font-serif);
	font-size: 18cqi;
	font-weight: 700;
	line-height: 1;
}

.issue-cover__brand img {
	width: 66%;
	height: auto;
}

.issue-cover__number {
	position: relative;
	margin-top: auto;
	font-family: var(--font-serif);
	font-size: 50cqi;
	font-weight: 700;
	line-height: 0.8;
}

.issue-cover__month {
	position: relative;
	margin-top: 4cqi;
	padding-top: 4cqi;
	border-top: 1px solid rgb(255 255 255 / 0.35);
	color: rgb(255 255 255 / 0.85);
	font-size: 7.5cqi;
	font-weight: 500;
}

/* Thematic files
   -------------------------------------------------------------------------- */
.files__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem;
}

.file-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	box-shadow: var(--card-shadow);
}

.file-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--mist);
}

.file-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.file-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding: 1.25rem 1.4rem 1.1rem;
}

.file-card__title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.3;
}

.file-card__title a:hover {
	color: var(--sea);
}

.file-card__count {
	margin: 0;
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.file-card__desc {
	margin: 0;
	color: var(--ink-2);
	font-size: var(--fs-sm);
	line-height: 1.8;
}

.file-card__list {
	margin: 0.35rem 0 0;
	padding: 0;
	list-style: none;
}

.file-card__list li {
	padding-block: 0.65rem;
	border-top: 1px solid var(--rule);
}

.file-card__list a {
	font-family: var(--font-serif);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.45;
}

/* Section picks: a column per section
   -------------------------------------------------------------------------- */
.picks__grid {
	display: grid;
	grid-template-columns: repeat(var(--pick-cols, 4), minmax(0, 1fr));
	gap: 2.75rem 2rem;
}

/* Each column shares three rows with its neighbours (heading, card, list), so the
   writers, dates and read links line up across the row whatever the title length. */
.pick {
	display: grid;
	grid-row: span 3;
	grid-template-rows: subgrid;
	row-gap: 1.1rem;
	min-width: 0;
}

.pick__title {
	margin: 0;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--rule-strong);
	font-size: var(--fs-lg);
	font-weight: 700;
	line-height: 1.4;
}

.pick__title a {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.pick__title a:hover {
	color: var(--sea);
}

.pick__title .icon {
	color: var(--sea);
}

.pick .card__title {
	font-size: 1.3rem;
}

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

.pick__more li {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding-block: 0.8rem;
	border-top: 1px solid var(--rule);
}

.pick__more a {
	font-family: var(--font-serif);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.45;
}

.pick__more time {
	color: var(--muted);
	font-size: var(--fs-xs);
}

/* Authors
   -------------------------------------------------------------------------- */

/* Writers' portraits: one round crop and one grey treatment everywhere, since the
   photos arrive in every size, light and background. */
img.avatar {
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 25%;
	background: var(--mist);
	filter: grayscale(1);
}

.authors__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* A writer as on Sanaa Center's team page: a white card, the portrait above the
   name and role. The whole card is clickable through the name link. */
.author-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	padding: 1.5rem 1.25rem 1.35rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	box-shadow: var(--card-shadow);
	text-align: center;
}

.author-card[hidden] {
	display: none;
}

.author-card__avatar {
	width: 104px;
	height: 104px;
	margin-bottom: 0.6rem;
	border: 3px solid var(--paper);
	box-shadow: 0 0 0 1px var(--rule);
}

.author-card__name {
	font-family: var(--font-serif);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
}

.author-card__name::after {
	content: "";
	position: absolute;
	inset: 0;
}

.author-card:hover .author-card__name {
	color: var(--sea);
}

/* The role line is the biography's first phrase; two lines at most keep the cards even. */
.author-card__role {
	display: -webkit-box;
	overflow: hidden;
	color: var(--muted);
	font-size: var(--fs-xs);
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.author-card__count {
	margin-top: auto;
	padding-top: 0.35rem;
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.writers .authors__list {
	margin-bottom: var(--space-section);
}

html:not(.js) [data-writers-filter] {
	display: none;
}

/* Issues shelf
   -------------------------------------------------------------------------- */
.shelf__list {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shelf__item {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.shelf__label {
	margin-top: 0.85rem;
	font-size: var(--fs-sm);
	font-weight: 700;
}

.shelf__month {
	color: var(--muted);
	font-size: var(--fs-xs);
}

/* Social media band
   -------------------------------------------------------------------------- */
.follow-cards {
	display: grid;
	/* --follow-cols columns when they fit (set per account count), fewer on narrow screens. */
	grid-template-columns: repeat(auto-fill, minmax(max(180px, 100% / var(--follow-cols, 4) - 1rem), 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.follow-card {
	--brand: var(--sea);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	height: 100%;
	padding: 1.4rem 1.5rem 1.25rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.follow-card:hover {
	border-color: var(--brand);
	box-shadow: 0 16px 34px -24px rgb(4 30 38 / 0.55);
}

.follow-card--facebook {
	--brand: #1877f2;
}

.follow-card--x,
.follow-card--tiktok {
	--brand: var(--ink);
}

.follow-card--instagram {
	--brand: #d62976;
}

.follow-card--youtube {
	--brand: #e62117;
}

.follow-card--telegram {
	--brand: #229ed9;
}

.follow-card--whatsapp {
	--brand: #1fa855;
}

.follow-card--linkedin {
	--brand: #0a66c2;
}

.follow-card__icon {
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	margin-bottom: 0.7rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--brand, var(--sea)) 12%, var(--paper));
	color: var(--brand, var(--sea));
}

.follow-card__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
}

.follow-card__name {
	font-size: var(--fs-md);
	font-weight: 700;
}

.follow-card__handle {
	color: var(--muted);
	font-size: var(--fs-sm);
}

.follow-card__cta {
	margin-top: auto;
	padding-top: 0.9rem;
	/* Toned with ink so small brand-coloured text keeps AA contrast in both themes. */
	color: color-mix(in srgb, var(--brand) 70%, var(--ink));
	font-size: var(--fs-sm);
	font-weight: 700;
}

.social-posts {
	margin-top: 2.75rem;
}

.social-posts__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-bottom: 1.1rem;
}

.social-posts__title {
	margin: 0;
	font-size: var(--fs-lg);
	font-weight: 700;
}

.social-posts__tabs {
	display: flex;
	gap: 0.25rem;
	padding: 0.25rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-pill);
}

.social-posts__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.45rem 1rem;
	border: 0;
	border-radius: var(--radius-pill);
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.social-posts__tab:hover {
	color: var(--ink);
}

.social-posts__tab[aria-selected="true"] {
	background: var(--ink);
	color: var(--paper);
}

.post-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-post {
	--brand: var(--sea);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.social-post--facebook {
	--brand: #1877f2;
}

.social-post--x {
	--brand: var(--ink);
}

.social-post:hover {
	border-color: var(--brand);
	box-shadow: 0 16px 34px -24px rgb(4 30 38 / 0.55);
}

.social-post__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1.91 / 1;
	object-fit: cover;
	background: var(--mist);
}

.social-post__text {
	display: -webkit-box;
	margin: 1.1rem 1.25rem 0;
	overflow: hidden;
	font-size: var(--fs-sm);
	line-height: 1.8;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

/* Without an image the words get the room. */
.social-post--text {
	background: var(--mist);
}

.social-post--text .social-post__text {
	margin-top: 1.5rem;
	font-size: var(--fs-md);
	line-height: 1.9;
	-webkit-line-clamp: 8;
}

.social-post__meta {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: auto;
	padding: 1rem 1.25rem 1.1rem;
	color: var(--muted);
	font-size: var(--fs-xs);
}

.social-post__meta .icon {
	color: var(--brand);
}

/* Instagram is read by its pictures: a row of squares, as on the profile. */
.ig-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ig-tile {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1;
	border-radius: calc(var(--radius-box) / 2);
	background: var(--mist);
}

.ig-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.ig-tile:hover img {
	transform: scale(1.04);
}

.ig-tile .icon {
	position: absolute;
	inset-block-start: 0.55rem;
	inset-inline-end: 0.55rem;
	color: #fff;
	filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.55));
}

/* Newsletter
   -------------------------------------------------------------------------- */
.newsletter {
	border-top: 1px solid var(--rule);
	background: var(--mist);
}

.newsletter__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
	align-items: center;
	gap: 2rem 4rem;
	padding-block: clamp(2.5rem, 2rem + 2vw, 3.75rem);
}

.newsletter__title {
	margin: 0 0 0.4rem;
	font-family: var(--font-serif);
	font-size: var(--fs-2xl);
	line-height: 1.25;
}

.newsletter__text p {
	margin: 0;
	color: var(--ink-2);
}

.newsletter__form {
	display: flex;
	gap: 0.5rem;
}

.newsletter__form input {
	flex: 1;
	min-width: 0;
	padding: 0.8rem 1.2rem;
	border: 1px solid var(--field-edge);
	border-radius: var(--radius-pill);
	background: var(--paper);
}

.newsletter__form input:placeholder-shown {
	direction: rtl;
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--abyss);
	color: var(--on-abyss-muted);
	font-size: var(--fs-sm);
}

.site-footer__motif {
	position: absolute;
	inset: 0;
	z-index: -1;
	color: var(--sea-bright);
	opacity: 0.06;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
	gap: 3rem;
	padding-block: 4rem 3rem;
}

.site-footer a {
	color: var(--on-abyss);
	transition: color 0.2s;
}

.site-footer a:hover {
	color: var(--sea-bright);
}

.site-footer__about p {
	max-width: 46ch;
	line-height: 1.9;
}

.site-footer__license {
	font-size: var(--fs-xs);
	opacity: 0.85;
}

.logo--footer .logo__img {
	height: 76px;
}

.logo--footer .logo__text {
	color: var(--sea-bright);
}

.site-footer__heading {
	margin: 0 0 1.1rem;
	color: #fff;
	font-size: var(--fs-sm);
	font-weight: 700;
}

.site-footer ul:not(.social) {
	display: grid;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__issue {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.site-footer__issue p {
	margin: 0;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding-block: 1.25rem;
	border-top: 1px solid rgb(255 255 255 / 0.12);
	font-size: var(--fs-xs);
}

.site-footer__bottom p {
	margin: 0;
}

/* Dialogs: search and menu drawer
   -------------------------------------------------------------------------- */
dialog {
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
}

dialog::backdrop {
	background: rgb(2 16 21 / 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.search-dialog {
	width: 100%;
	height: 100%;
	margin: 0;
}

.search-dialog__panel {
	max-width: 760px;
	margin: 9vh auto 0;
	margin-inline: max(1rem, calc((100% - 760px) / 2));
	overflow: hidden;
	border-radius: 18px;
	background: var(--paper);
	box-shadow: 0 30px 80px -25px rgb(0 0 0 / 0.55);
}

.search-dialog[open] .search-dialog__panel {
	animation: rise 0.22s ease-out;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

.search-dialog__form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 1.1rem 0.6rem 0.6rem;
	border-bottom: 1px solid var(--rule);
	color: var(--muted);
}

.search-dialog__form input {
	flex: 1;
	min-width: 0;
	padding: 0.85rem 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ink);
	font-size: var(--fs-lg);
}

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

.search-dialog__results {
	max-height: 62vh;
	overflow-y: auto;
}

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

.search-result {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.95rem 1.4rem;
	border-bottom: 1px solid var(--rule);
}

.search-result:hover,
.search-result:focus-visible {
	background: var(--mist);
}

/* Drawn inside, where the scrolling results list can't clip it. */
.search-result:focus-visible {
	outline-offset: -2px;
}

.search-result__title {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.45;
}

.search-result__meta {
	color: var(--muted);
	font-size: var(--fs-xs);
}

.search-dialog__all {
	display: block;
	padding: 0.95rem 1.4rem;
	color: var(--sea);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.search-dialog__empty {
	margin: 0;
	padding: 1.4rem;
	color: var(--muted);
}

.drawer {
	inset-inline-end: auto;
	width: min(88vw, 390px);
	height: 100dvh;
	margin: 0;
	padding: 1rem 1.25rem 1.5rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--paper);
}

.drawer[open] {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	animation: drawer-in 0.25s ease-out;
}

@keyframes drawer-in {
	from {
		transform: translateX(100%);
	}
}

.drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.drawer .logo__img {
	height: 52px;
}

.drawer__search {
	display: flex;
	align-items: center;
	padding-inline: 1.1rem 0.25rem;
	border: 1px solid var(--field-edge);
	border-radius: var(--radius-pill);
}

.drawer__search input {
	flex: 1;
	min-width: 0;
	padding: 0.7rem 0;
	border: 0;
	outline: 0;
	background: transparent;
}

/* On short screens the whole drawer scrolls: the list runs past the screen edge
   instead of stopping above the footer, where it looked like the end of the menu. */
.drawer__nav {
	flex: none;
}

.drawer__list,
.drawer__list .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.drawer__list > li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid var(--rule);
}

.drawer__list > li > a,
.drawer__list > li > .submenu-toggle {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0;
	border: 0;
	background: none;
	font-size: var(--fs-md);
	font-weight: 600;
	text-align: start;
	cursor: pointer;
}

.drawer__list > li > .submenu-toggle--icon {
	flex: none;
	width: 44px;
	justify-content: center;
}

.drawer__list .sub-menu {
	display: none;
	flex-basis: 100%;
	padding-bottom: 0.6rem;
}

.drawer__list [aria-expanded="true"] ~ .sub-menu,
html:not(.js) .drawer__list .sub-menu {
	display: block;
}

.drawer__list .sub-menu a {
	display: block;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	color: var(--ink-2);
	font-size: var(--fs-base);
}

.drawer__list .sub-menu a:hover {
	background: var(--mist);
}

.drawer__list .current-menu-item > a {
	color: var(--sea);
}

.drawer__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 300;
	padding: 0.65rem 1.25rem;
	border-radius: var(--radius-pill);
	background: var(--ink);
	color: var(--paper);
	font-size: var(--fs-sm);
	font-weight: 600;
	box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.5);
	transform: translate(-50%, 200%);
	transition: transform 0.25s;
}

.toast:empty {
	display: none;
}

.toast.is-visible {
	transform: translate(-50%, 0);
}

/* Article
   -------------------------------------------------------------------------- */
.reading-progress {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	inset-inline: 0;
	z-index: 60;
	height: 3px;
	pointer-events: none;
}

.reading-progress span {
	display: block;
	height: 100%;
	background: var(--sea-bright);
	transform: scaleX(0);
	transform-origin: right;
}

/* As on Sanaa Center's article page: the picture first, then the section, title,
   writers, date and tools centred on a light band, and the path last. */
.article-head {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: clamp(1.25rem, 1rem + 1vw, 2rem);
	padding-block: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
	background: var(--tint);
	text-align: center;
}

.article-header .article-title,
.article-header .article-dek {
	max-width: 980px;
	margin-inline: auto;
}

.article-head .article-header__labels,
.article-head .breadcrumbs ol {
	justify-content: center;
}

.article-head .breadcrumbs ol {
	margin: 1.5rem 0 0;
}

.article-head .article-meta {
	flex-direction: column;
	justify-content: center;
	gap: 0.9rem;
	padding-block: 0;
	border: 0;
}

.article-head .article-tools {
	justify-content: center;
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0;
	color: var(--muted);
	font-size: var(--fs-xs);
	list-style: none;
}

.breadcrumbs li + li::before {
	content: "/";
	margin-inline-end: 0.5rem;
	color: var(--rule-strong);
}

.breadcrumbs a:hover {
	color: var(--sea);
}

.article-header__labels {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

/* The section as a filled pill, the issue beside it as an outlined one. */
.article-header__labels .kicker {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 1.05rem 0.38rem;
	border-radius: var(--radius-pill);
	background: var(--pill);
	color: var(--on-pill);
	font-size: var(--fs-sm);
	font-weight: 700;
	transition: background-color 0.2s, color 0.2s;
}

.article-header__labels .kicker:hover {
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
}

.issue-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	background: var(--paper);
	color: var(--ink-2);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.issue-badge:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.article-title {
	margin: 0.85rem 0 1rem;
	font-family: var(--font-serif);
	font-size: clamp(2rem, 1.45rem + 2.2vw, 3.25rem);
	font-weight: 700;
	line-height: 1.25;
}

.article-dek {
	max-width: 64ch;
	margin: 0 0 1.5rem;
	color: var(--ink-2);
	font-size: var(--fs-lg);
	line-height: 1.75;
}

.article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 1rem;
	border-block: 1px solid var(--rule);
}

.article-author {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.article-author img {
	width: 52px;
	height: 52px;
}

.article-author--group img {
	width: 46px;
	height: 46px;
}

.article-author__names {
	display: block;
	font-weight: 700;
}

.article-author__names .sep {
	color: var(--muted);
	font-weight: 400;
}

/* A name never breaks across lines; a list of names breaks between them. */
.article-author__name {
	white-space: nowrap;
}

.article-author__name:hover {
	color: var(--sea);
}

/* With several writers, the underline shows where each name links. */
.article-author--group .article-author__name {
	text-decoration: underline dotted var(--rule-strong);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.45em;
}

.article-author__role {
	display: block;
	color: var(--muted);
	font-size: var(--fs-xs);
}

.article-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	margin: 0;
	padding: 0;
	color: var(--muted);
	font-size: var(--fs-sm);
	list-style: none;
}

.article-facts li {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.article-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem;
}

/* Text size, print and citation wrap to a new line together, never one button at a time. */
.reading-tools {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.text-size {
	font-family: var(--font-serif);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
}

.text-size--up {
	font-size: 1.55rem;
}

.article-tools .divider {
	width: 1px;
	height: 22px;
	margin-inline: 0.4rem;
	background: var(--rule);
}

.share {
	display: flex;
	gap: 0.15rem;
}

.article-figure {
	margin-top: clamp(1rem, 0.75rem + 1vw, 1.75rem);
	margin-bottom: 0;
}

.article-figure img {
	width: 100%;
	max-height: 620px;
	border-radius: var(--radius-box);
	object-fit: cover;
}

.article-figure figcaption {
	margin-top: 0.65rem;
	color: var(--muted);
	font-size: var(--fs-xs);
}

.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 46rem) minmax(0, 18rem);
	justify-content: space-between;
	gap: clamp(2.5rem, 0.5rem + 4vw, 4.5rem);
	padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem) 1rem;
}

.article-body {
	grid-column: 1;
	min-width: 0;
}

.article-aside {
	grid-column: 2;
	grid-row: 1;
}

/* Contents: the main sections, each opening onto its subsections. A long list
   scrolls inside the box instead of running past the screen. */
.article-toc {
	position: sticky;
	top: calc(var(--sticky-offset) + 0.25rem);
	max-height: calc(100vh - var(--sticky-offset) - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1rem 0.85rem 1.1rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	font-size: var(--fs-sm);
	scrollbar-width: thin;
}

.article-toc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0 0.4rem 0.6rem;
	font-size: var(--fs-base);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

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

.article-toc summary .icon {
	display: none;
}

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

.toc__row {
	display: flex;
	align-items: flex-start;
	gap: 0.2rem;
}

.toc__row > a {
	flex: 1;
	min-width: 0;
}

.toc a {
	display: block;
	padding: 0.42rem 0.55rem;
	border-radius: 8px;
	color: var(--ink-2);
	line-height: 1.55;
	transition: background-color 0.2s, color 0.2s;
}

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

.toc a.is-active {
	background: color-mix(in srgb, var(--sea-bright) 14%, transparent);
	color: var(--ink);
	font-weight: 700;
}

.toc__toggle {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 0.1rem;
	margin-top: 0.35rem;
	padding: 0.1rem 0.3rem 0.1rem 0.45rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

.toc__toggle:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.toc__toggle .icon {
	transition: transform 0.2s;
}

.toc__toggle[aria-expanded="true"] .icon {
	transform: rotate(180deg);
}

.toc__sub {
	margin-block: 0.1rem 0.35rem;
	margin-inline-start: 0.55rem;
	padding-inline-start: 0.6rem;
	border-inline-start: 2px solid var(--rule);
}

.toc__sub a {
	padding-block: 0.32rem;
	font-size: var(--fs-xs);
}

html.js .toc__item:not(.is-open) > .toc__sub {
	display: none;
}

/* Long-form reading */
.prose {
	position: relative; /* Keeps hidden post-embed iframes within the column. */
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: calc(1.375rem * var(--prose-scale, 1));
	line-height: 1.95;
	overflow-wrap: break-word;
}

/* Editors use the "Preformatted" block for ordinary text: let it wrap like a paragraph. */
.prose pre {
	max-width: 100%;
	overflow-x: auto;
	font: inherit;
	white-space: pre-wrap;
}

.prose > * {
	margin-block: 0 1.15em;
}

/* English references and quotes keep their own direction inside Arabic text. */
.prose p,
.prose li,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
	unicode-bidi: plaintext;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
	color: var(--ink);
	font-family: var(--font-sans);
	font-weight: 700;
	line-height: 1.55;
	scroll-margin-top: var(--sticky-offset);
}

.prose h1,
.prose h2 {
	margin-block: 2.1em 0.7em;
	font-size: 1.1em;
}

/* Main sections open with a short bar, so the outline reads at a glance. */
.prose > h2:not(.is-reference)::before {
	content: "";
	display: block;
	width: 2.25rem;
	height: 3px;
	margin-bottom: 0.75em;
	border-radius: 2px;
	background: var(--sea-bright);
}

.prose h3 {
	margin-block: 1.8em 0.6em;
	font-size: 0.93em;
}

.prose h4 {
	margin-block: 1.5em 0.5em;
	font-size: 0.8em;
}

.prose h2 strong,
.prose h3 strong {
	font-weight: inherit;
}

.prose a {
	color: var(--sea);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.28em;
}

/* Bookmarks pasted from Word (<a> without href) are not links. */
.prose a:not([href]) {
	color: inherit;
	text-decoration: none;
}

.prose strong,
.prose b {
	font-weight: 700;
}

.prose em,
.prose i {
	font-weight: 500;
}

.prose blockquote {
	margin: 2em 0;
	padding-inline-start: 1.5rem;
	border-inline-start: 3px solid var(--sea-bright);
	color: var(--ink-2);
	font-size: 1.08em;
}

.prose blockquote p:last-child {
	margin-bottom: 0;
}

.prose ul,
.prose ol {
	padding-inline-start: 1.4em;
}

.prose li {
	margin-bottom: 0.45em;
}

.prose li::marker {
	color: var(--sea);
}

.prose img {
	border-radius: var(--radius-img);
}

.prose figure {
	margin: 2.2em 0;
}

/* Captioned images from the classic editor carry a fixed inline width. */
.prose figure,
.prose .wp-caption {
	max-width: 100% !important;
}

.prose figcaption,
.prose .wp-caption-text {
	margin-top: 0.6rem;
	color: var(--muted);
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	line-height: 1.6;
}

.prose hr {
	width: 30%;
	margin: 2.5em auto;
	border: 0;
	border-top: 1px solid var(--rule-strong);
}

/* Wide tables scroll inside their own box instead of widening the page. */
.prose .table-scroll,
.prose .wp-block-table {
	max-width: 100%;
	margin-block: 0.75em 1.5em;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	border: 1px solid var(--rule);
	border-radius: 8px;
}

.prose table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-variant-numeric: tabular-nums;
	line-height: 1.65;
}

/* Fixed layout squeezes long Arabic labels into equal columns; let columns size to their content. */
.prose table.has-fixed-layout {
	table-layout: auto;
}

.prose th,
.prose td {
	padding: 0.65rem 0.9rem;
	border: 0;
	border-bottom: 1px solid var(--rule);
	text-align: start;
	vertical-align: top;
}

.prose tr:last-child > td {
	border-bottom: 0;
}

.prose td + td,
.prose th + th,
.prose [rowspan] {
	border-inline-start: 1px solid var(--rule);
}

.prose [rowspan] {
	border-inline-end: 1px solid var(--rule);
}

/* Pasted tables rarely use <th>: their first row is the header. */
.prose th,
.prose table:not(:has(th)) tr:first-child > td {
	background: var(--mist);
	color: var(--ink);
	font-weight: 700;
}

.prose .table-caption {
	margin-block: 1.8em 0;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 700;
	line-height: 1.7;
}

.prose .table-caption strong {
	font-weight: inherit;
}

.prose .table-source {
	margin-top: -0.5em;
	color: var(--muted);
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	line-height: 1.7;
}

.prose iframe,
.prose .wp-block-embed {
	width: 100%;
	border: 0;
}

.prose .wp-block-pullquote {
	padding: 1.5em 0;
	border-block: 2px solid var(--ink);
	font-size: 1.25em;
	text-align: center;
}

.prose .article-credits {
	padding: 1.1rem 1.4rem;
	border-radius: var(--radius-box);
	background: var(--mist);
	color: var(--ink-2);
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	line-height: 1.9;
}

.prose .article-credits em {
	font-weight: 500;
}

.prose .article-credits br:last-child {
	display: none;
}

.prose .is-reference {
	margin-bottom: 0.6em;
	color: var(--ink-2);
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	line-height: 1.85;
	overflow-wrap: anywhere;
}

.prose h2.is-reference,
.prose h3.is-reference {
	margin-top: 1.5em;
	color: var(--ink);
	font-size: var(--fs-md);
}

/* Note numbers pasted from Word ("[1]") sit above the line, as in print. */
.prose a[href^="#_ftn"]:not([href^="#_ftnref"]),
.prose a[href^="#_edn"]:not([href^="#_ednref"]) {
	padding-inline: 0.1em;
	font-family: var(--font-sans);
	font-size: max(0.6em, 0.75rem);
	font-weight: 700;
	line-height: 0;
	text-decoration: none;
	vertical-align: super;
}

.prose a[href^="#_ftnref"],
.prose a[href^="#_ednref"] {
	font-weight: 700;
	text-decoration: none;
}

/* Notes and references: one box at the end, closed until opened or until a note
   number in the text leads to it. */
.prose .article-notes {
	margin-top: 3em;
}

.article-notes__box {
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
}

.article-notes__box > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.85rem;
	padding: 1rem 1.25rem;
	cursor: pointer;
	list-style: none;
}

.article-notes__box > summary::-webkit-details-marker {
	display: none;
}

.article-notes__box > summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	margin-inline-start: auto;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: translateY(-25%) rotate(45deg);
	transition: transform 0.2s;
}

.article-notes__box[open] > summary {
	border-bottom: 1px solid var(--rule);
}

.article-notes__box[open] > summary::after {
	transform: translateY(25%) rotate(-135deg);
}

.prose .article-notes__title {
	margin: 0;
	font-size: var(--fs-md);
}

.article-notes__count {
	color: var(--muted);
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.article-notes__box > :not(summary) {
	max-width: calc(100% - 2.5rem);
	margin-inline: 1.25rem;
}

.article-notes__box > summary + * {
	margin-top: 1.1rem;
}

.article-notes__box > :last-child {
	margin-bottom: 1.25rem;
}

/* Article footer */
.article-end {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	margin-top: 3rem;
}

.article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.article-tags a {
	padding: 0.3rem 0.85rem;
	border-radius: var(--radius-pill);
	background: var(--mist);
	color: var(--ink-2);
	font-size: var(--fs-xs);
}

.article-tags a:hover {
	color: var(--sea);
}

.article-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
	border-block: 1px solid var(--rule);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.author-box {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 1.4rem;
	padding: 1.75rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
}

.author-box img {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
}

.author-box__label {
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-xs);
}

.author-box__name {
	margin: 0.1rem 0 0;
	font-family: var(--font-serif);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.3;
}

.author-box__bio {
	margin: 0.6rem 0 0.9rem;
	color: var(--ink-2);
	font-size: var(--fs-sm);
	line-height: 1.9;
}

.author-box__link {
	color: var(--sea);
	font-size: var(--fs-sm);
	font-weight: 600;
}

/* Several writers: a grid of shorter boxes, so the page doesn't end in a long stack. */
.author-boxes--group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.author-boxes--group .author-box {
	grid-template-columns: 60px minmax(0, 1fr);
	gap: 1rem;
	padding: 1.25rem;
}

.author-boxes--group .author-box img {
	width: 60px;
	height: 60px;
}

.author-boxes--group .author-box__name {
	font-size: 1.25rem;
}

.author-boxes--group .author-box__bio {
	display: -webkit-box;
	margin-block: 0.4rem 0.6rem;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.cite-box {
	padding: 1.5rem 1.75rem;
	border-radius: var(--radius-box);
	background: var(--mist);
}

.cite-box__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.cite-box__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: var(--fs-sm);
	font-weight: 700;
}

.cite-box__text {
	margin: 0;
	color: var(--ink-2);
	font-size: var(--fs-sm);
	line-height: 1.95;
	overflow-wrap: anywhere;
}

.related {
	margin-top: var(--space-section);
	padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
	background: var(--mist);
}

/* Legacy issue posts (the "المجلة" PDF posts) */
.issue-file {
	display: grid;
	grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2rem, 1rem + 3vw, 4rem);
	padding-block: clamp(2rem, 1rem + 3vw, 4rem);
}

.issue-file__viewer {
	grid-column: 1 / -1;
	width: 100%;
	height: min(85vh, 1000px);
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--mist);
}

/* Archives
   -------------------------------------------------------------------------- */
/* The page head stays short (where the page sits, title, a line or two, the count)
   so the list starts high on the screen. */
.archive-head {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-bottom: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);
	padding-block: clamp(1.5rem, 1.2rem + 1.25vw, 2.5rem);
	border-bottom: 1px solid var(--rule);
	background: var(--paper);
	text-align: center;
}

/* Lists sit on a tint, so their white cards stand out as on Sanaa Center's pages. */
.site-main--list {
	background: var(--tint);
}

.archive-head__motif {
	position: absolute;
	inset: 0;
	z-index: -1;
	color: var(--sea);
	opacity: 0.05;
}

.archive-head .breadcrumbs ol {
	justify-content: center;
	margin-bottom: 0.65rem;
}

.archive-head__title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: var(--fs-3xl);
	font-weight: 700;
	line-height: 1.2;
}

.archive-head__desc {
	max-width: 70ch;
	margin: 0.6rem auto 0;
	color: var(--ink-2);
	font-size: var(--fs-base);
	line-height: 1.8;
}

.archive-head__desc p {
	margin: 0;
}

.archive-head__count {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: var(--fs-sm);
}

.archive-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 1.5rem;
}

.archive-grid > .card--feature {
	grid-column: 1 / -1;
	margin-bottom: 0.5rem;
}

.archive-list {
	display: flex;
	flex-direction: column;
}

.archive-list > .card {
	padding-block: 2rem;
	border-bottom: 1px solid var(--rule);
}

.archive-list > .card:first-child {
	padding-top: 0;
}

.archive-empty {
	padding-block: 2rem 4rem;
	color: var(--muted);
	font-size: var(--fs-md);
}

.pagination {
	margin-block: 3.5rem var(--space-section);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-width: 44px;
	height: 44px;
	padding-inline: 0.8rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-pill);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.page-numbers.dots {
	border: 0;
}

a.page-numbers:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.page-numbers.current {
	border-color: var(--action);
	background: var(--action);
	color: var(--on-action);
}

/* Writer page: portrait, name, biography and the sections they write in. */
.profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.profile__text {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.profile img {
	width: 120px;
	height: 120px;
	border: 3px solid var(--paper);
	box-shadow: 0 12px 28px -16px rgb(0 0 0 / 0.45);
}

.profile__bio {
	max-width: 70ch;
	margin: 0.6rem auto 0;
	color: var(--ink-2);
	font-size: var(--fs-md);
	line-height: 1.8;
}

.profile__sections {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.profile__sections a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0.25rem 0.85rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	background: var(--paper);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.profile__sections a:hover,
.profile__sections a[aria-current] {
	border-color: var(--sea);
	color: var(--sea);
}

/* Issues archive: a block per year, with the years to jump between at the top. */
.year-jump {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.year-jump a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 0.3rem 1.1rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	font-size: var(--fs-sm);
	font-weight: 700;
}

.year-jump a:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.issues-year {
	margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
	scroll-margin-top: var(--sticky-offset);
}

.issues-year__title {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin: 0 0 1.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rule-strong);
	font-family: var(--font-serif);
	font-size: var(--fs-2xl);
	font-weight: 700;
	line-height: 1.2;
}

.issues-year__count {
	color: var(--muted);
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: 500;
}

.issues-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 2.75rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Every issue offers the same ways in, at the same place under its cover. */
.issue-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1rem 1rem 1.1rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--paper);
	box-shadow: var(--card-shadow);
}

.issue-card__title {
	margin: 1rem 0 0;
	font-family: var(--font-serif);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
}

.issue-card__title a:hover {
	color: var(--sea);
}

.issue-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	margin: 0.3rem 0 0;
	color: var(--muted);
	font-size: var(--fs-xs);
}

.issue-card__count {
	color: var(--ink-2);
}

.issue-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: auto 0 0;
	padding: 0.85rem 0 0;
	list-style: none;
}

.issue-card__actions a {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	min-height: 34px;
	padding: 0.25rem 0.8rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-pill);
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.issue-card__actions a:hover {
	border-color: var(--sea);
	background: var(--mist);
}

/* Issue page */
.issue-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
	padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.75rem);
	background: radial-gradient(120% 140% at 85% 20%, #0d4655 0%, #072b36 55%, #04202a 100%);
	color: var(--on-abyss);
}

.issue-hero .issue-band__motif {
	opacity: 0.06;
}

.issue-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 1rem + 4vw, 4.5rem);
}

.issue-hero .breadcrumbs ol {
	margin-bottom: 0.9rem;
	color: var(--on-abyss-muted);
}

.issue-hero .breadcrumbs li + li::before {
	color: rgb(255 255 255 / 0.3);
}

.issue-hero .breadcrumbs a:hover {
	color: #fff;
}

.issue-hero .issue-band__actions {
	flex-flow: row wrap;
	margin-top: 1.5rem;
}

.issue-contents-wrap {
	max-width: 900px;
	margin-inline: auto;
	scroll-margin-top: var(--sticky-offset);
}

.issue-contents {
	margin: 0 0 var(--space-section);
	padding: 0;
	list-style: none;
	counter-reset: contents;
}

.issue-contents > li {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	padding-block: 2rem;
	border-bottom: 1px solid var(--rule);
	counter-increment: contents;
}

.issue-contents > li::before {
	content: counter(contents);
	color: var(--sea-bright);
	font-family: var(--font-serif);
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1;
}

.page-content {
	max-width: 46rem;
	margin: 0 auto var(--space-section);
}

.not-found {
	max-width: 640px;
	margin: 0 auto;
	padding-block: var(--space-section);
	text-align: center;
}

.not-found__title {
	margin: 0 0 1rem;
	font-family: var(--font-serif);
	font-size: var(--fs-4xl);
	line-height: 1.2;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 560px;
}

.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 0.8rem 1.2rem;
	border: 1px solid var(--field-edge);
	border-radius: var(--radius-pill);
	background: var(--paper);
}

.not-found .search-form {
	margin: 2rem auto 0;
}

/* Comments */
.comments {
	margin-top: 3rem;
}

.comment-list {
	padding: 0;
	list-style: none;
}

.comment-body {
	padding-block: 1.25rem;
	border-bottom: 1px solid var(--rule);
}

.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: 0.7rem 1rem;
	border: 1px solid var(--field-edge);
	border-radius: 10px;
	background: var(--paper);
}

.comment-form .submit {
	padding: 0.7rem 1.4rem;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--action);
	color: var(--on-action);
	font-weight: 600;
	cursor: pointer;
}

/* About page
   -------------------------------------------------------------------------- */
.about-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(3rem, 2rem + 4vw, 6rem);
	background: radial-gradient(120% 140% at 85% 20%, #0d4655 0%, #072b36 55%, #04202a 100%);
	color: var(--on-abyss);
}

.about-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
	align-items: center;
	gap: clamp(2rem, 1rem + 5vw, 6rem);
}

.about-hero__title {
	margin: 0 0 1.25rem;
	font-family: var(--font-serif);
	font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem);
	font-weight: 700;
	line-height: 1.1;
}

.about-hero__lead {
	max-width: 32em;
	margin: 0;
	color: rgb(232 243 244 / 0.92);
	font-family: var(--font-serif);
	font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem);
	line-height: 1.7;
}

.about-hero__place {
	margin: 1.5rem 0 0;
	color: var(--on-abyss-muted);
	font-size: var(--fs-sm);
}

/* The journal in numbers, along the bottom of the hero. Dividers stop short of the top rule. */
.about-stats {
	--stats-pad: 1.9rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: clamp(2.5rem, 2rem + 2.5vw, 4rem) 0 0;
	padding: 0;
	border-top: 1px solid rgb(255 255 255 / 0.16);
	list-style: none;
}

.about-stats__item {
	position: relative;
	padding: var(--stats-pad) 1.75rem 0.25rem;
}

.about-stats__item:first-child {
	padding-inline-start: 0;
}

.about-stats__item + .about-stats__item::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: var(--stats-pad);
	bottom: 0.25rem;
	width: 1px;
	background: rgb(255 255 255 / 0.16);
}

.about-stats__value {
	display: block;
	color: #8ae9f2;
	font-family: var(--font-serif);
	font-size: clamp(2.4rem, 1.9rem + 1.8vw, 3.4rem);
	font-weight: 700;
	line-height: 1;
}

.about-stats__label {
	display: block;
	margin-top: 0.6rem;
	color: var(--on-abyss-muted);
	font-size: var(--fs-sm);
}

.about-body {
	display: grid;
	grid-template-columns: minmax(0, 48rem) minmax(0, 20rem);
	justify-content: space-between;
	align-items: start;
	gap: clamp(2.5rem, 0.5rem + 4vw, 4.5rem);
	padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 0;
}

.about-facts {
	padding: 1.75rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
}

.about-facts__title {
	margin: 0 0 1.25rem;
	font-size: var(--fs-md);
	font-weight: 700;
}

.about-facts dl {
	display: grid;
	gap: 1rem;
	margin: 0;
}

.about-facts dl > div + div {
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
}

.about-facts dt {
	color: var(--muted);
	font-size: var(--fs-xs);
}

.about-facts dd {
	margin: 0.2rem 0 0;
	font-weight: 600;
	line-height: 1.65;
}

.about-facts dd a {
	color: var(--sea);
}

.about-facts dd a:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* Sections: one grid, hairlines drawn by the gap over a ruled background. */
.about-sections {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--rule);
	list-style: none;
}

.about-section {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.9rem 1.75rem;
	background: var(--paper);
	transition: background-color 0.2s;
}

.about-section:hover {
	background: var(--mist);
}

.about-section__name {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.3;
}

.about-section__name a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.about-section:hover .about-section__name {
	color: var(--sea);
}

.about-section__note {
	margin: 0;
	color: var(--ink-2);
	font-size: var(--fs-sm);
	line-height: 1.85;
}

.about-section__count {
	margin-top: auto;
	padding-top: 0.6rem;
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 600;
}

/* The last row is filled: an empty cell would show the ruled background as a grey block. */
.about-section:last-child:nth-child(3n + 1) {
	grid-column: 1 / -1;
}

.about-section:last-child:nth-child(3n + 2) {
	grid-column: span 2;
}

.about-board {
	margin-block: var(--space-section);
	padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
	background: var(--mist);
}

/* Rows are centred, so a short last row sits in the middle instead of at one edge. */
.board {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2.75rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.board-member {
	position: relative;
	display: flex;
	flex: 0 1 190px;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-align: center;
}

.board-member__avatar {
	width: 128px;
	height: 128px;
	margin-bottom: 0.9rem;
	border: 4px solid var(--paper);
	border-radius: 50%;
	object-fit: cover;
	background: var(--paper);
	box-shadow: 0 14px 30px -18px rgb(4 30 38 / 0.5);
}

.board-member__role {
	color: var(--sea);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.board-member__name {
	font-family: var(--font-serif);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.35;
}

.board-member__name::after {
	content: "";
	position: absolute;
	inset: 0;
}

.board-member:hover .board-member__name {
	color: var(--sea);
}

.about-contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.5rem 3rem;
	padding: clamp(1.75rem, 1rem + 2vw, 2.5rem);
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
}

.about-contact__title {
	margin: 0 0 0.4rem;
	font-family: var(--font-serif);
	font-size: var(--fs-xl);
	font-weight: 700;
}

.about-contact__text {
	margin: 0;
	color: var(--ink-2);
}

.about-contact__email {
	display: inline-block;
	margin-top: 0.5rem;
	color: var(--sea);
	font-weight: 600;
}

.about-contact__cta {
	margin: 1.1rem 0 0;
}

/* Forms: contact page and advanced search
   -------------------------------------------------------------------------- */
.field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin: 0;
}

.field label {
	color: var(--ink);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	padding: 0.78rem 1rem;
	border: 1px solid var(--field-edge);
	border-radius: 10px;
	background: var(--paper);
	color: var(--ink);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.field select {
	appearance: none;
	padding-inline-end: 2.5rem;
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23587179' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat left 1rem center;
}

.field textarea {
	min-height: 11rem;
	line-height: 1.8;
	resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--sea);
	outline: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea-bright) 25%, transparent);
}

.field input[dir="ltr"]:placeholder-shown {
	direction: rtl;
}

.form-status {
	margin: 0;
	padding: 0.8rem 1rem;
	border-radius: 10px;
	font-size: var(--fs-sm);
	font-weight: 600;
}

.form-status--success {
	background: color-mix(in srgb, #2f9e6b 13%, var(--paper));
	color: color-mix(in srgb, #1d6b47 80%, var(--ink));
}

.form-status--error {
	background: color-mix(in srgb, #d0453a 12%, var(--paper));
	color: color-mix(in srgb, #a62a1f 80%, var(--ink));
}

.contact {
	display: grid;
	grid-template-columns: minmax(0, 46rem) minmax(0, 19rem);
	justify-content: space-between;
	align-items: start;
	gap: clamp(2.5rem, 0.5rem + 4vw, 4.5rem);
	margin-bottom: var(--space-section);
}

.contact-form {
	display: grid;
	gap: 1.3rem;
}

.field-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.3rem;
}

/* Honeypot: invisible to people, tempting to bots. */
.contact-form__trap {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.contact-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.contact-aside {
	display: grid;
	gap: 1.5rem;
	padding: 1.75rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
}

.contact-aside__block + .contact-aside__block {
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule);
}

.contact-aside__title {
	margin: 0 0 0.6rem;
	color: var(--muted);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.contact-aside__block p {
	margin: 0 0 0.75rem;
	font-weight: 600;
	line-height: 1.7;
}

.contact-aside__email {
	color: var(--sea);
	font-weight: 600;
}

.about-contact__social a,
.contact-aside__social a {
	width: 46px;
	height: 46px;
	border: 1px solid var(--rule-strong);
	color: var(--ink-2);
}

.about-contact__social a:hover,
.contact-aside__social a:hover {
	border-color: var(--sea);
	background: transparent;
	color: var(--sea);
}

.filters {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.1rem 1.25rem;
	margin-bottom: 2.5rem;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	border: 1px solid var(--rule);
	border-radius: var(--radius-box);
	background: var(--mist);
}

.filters__words {
	grid-column: 1 / -1;
}

.filters__words input {
	padding-block: 0.95rem;
	font-size: var(--fs-md);
}

.filters__actions {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	gap: 1.25rem;
}

.filters__reset {
	color: var(--sea);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.filters__reset:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* Search and filters over a section's, a writer's or the writers' list: one row
   under the page head on wide screens. */
.archive-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--rule);
}

.archive-filters p {
	margin: 0;
}

.archive-filters__words {
	position: relative;
	flex: 1 1 18rem;
}

.archive-filters__words .icon {
	position: absolute;
	top: 50%;
	inset-inline-start: 1rem;
	color: var(--muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.archive-filters__field {
	flex: 0 1 14rem;
}

.archive-filters input,
.archive-filters select {
	width: 100%;
	min-height: 46px;
	padding: 0.55rem 1rem;
	border: 1px solid var(--field-edge);
	border-radius: var(--radius-pill);
	background: var(--paper);
	color: var(--ink);
	font-size: var(--fs-sm);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.archive-filters input {
	padding-inline-start: 2.75rem;
}

.archive-filters select {
	appearance: none;
	padding-inline-end: 2.5rem;
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23587179' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat left 1rem center;
}

.archive-filters input:focus,
.archive-filters select:focus {
	border-color: var(--sea);
	outline: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea-bright) 25%, transparent);
}

.archive-filters__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.archive-filters + .results-count {
	margin-top: -0.75rem;
}

.results-count {
	margin: 0 0 1.5rem;
	color: var(--muted);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.search-dialog__advanced {
	display: block;
	padding: 0.85rem 1.4rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: var(--fs-xs);
	font-weight: 600;
}

.search-dialog__advanced:hover {
	color: var(--sea);
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.masthead__issue {
		display: none;
	}

	.carousel {
		--pv: min(var(--per-view, 3), 3);
	}

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

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

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

	.shelf__item:nth-child(n + 7) {
		display: none;
	}

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

	.article-layout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
		gap: 3rem;
	}

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

/* Below this width the menu moves into the drawer. */
@media (max-width: 1000px) {
	:root {
		--header-h: 64px;
	}

	.primary-nav,
	.masthead__subscribe {
		display: none;
	}

	.masthead__menu {
		display: inline-grid;
	}

	.logo__img {
		height: 40px;
	}
}

@media (max-width: 960px) {
	.carousel {
		--pv: min(var(--per-view, 3), 2);
	}

	.issue-band__feature {
		grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
	}

	.files__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	/* One file per row, its picture beside the text. */
	.file-card {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	}

	.file-card__media {
		aspect-ratio: auto;
		min-height: 100%;
	}

	.card--feature {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.card--feature .card__media {
		grid-column: 1;
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.card--feature .card__body {
		grid-row: 2;
	}

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

	/* An odd card left alone on the last row takes the whole row, image beside text. */
	.grid--3 > .card:last-child:nth-child(odd) {
		display: grid;
		grid-column: 1 / -1;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
		gap: 2rem;
	}

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

	.shelf__list {
		display: grid;
		grid-auto-columns: 150px;
		grid-auto-flow: column;
		grid-template-columns: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.shelf__item,
	.shelf__item:nth-child(n + 7) {
		display: flex;
		scroll-snap-align: start;
	}

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

	.article-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.article-body,
	.article-aside {
		grid-column: 1;
	}

	.article-aside {
		grid-row: auto;
		margin-bottom: 2rem;
	}

	/* The contents fold into a box above the text. */
	.article-toc {
		position: static;
		max-height: none;
		padding: 0.85rem;
	}

	.article-toc summary {
		margin-bottom: 0;
		padding-block: 0.15rem;
	}

	.article-toc[open] summary {
		margin-bottom: 0.6rem;
	}

	.article-toc summary .icon {
		display: inline-block;
		transition: transform 0.2s;
	}

	.article-toc[open] summary .icon {
		transform: rotate(180deg);
	}

	.issue-file,
	.issue-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.issue-hero__inner .issue-cover {
		max-width: 200px;
	}

	.about-hero__inner,
	.about-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.about-hero__cover {
		display: none;
	}

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

	.about-stats__item:nth-child(odd) {
		padding-inline-start: 0;
	}

	.about-stats__item:nth-child(odd)::before {
		display: none;
	}

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

	.about-section:last-child:nth-child(n) {
		grid-column: auto;
	}

	.about-section:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

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

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

@media (max-width: 720px) {
	:root {
		--header-h: 60px;
	}

	.logo__img {
		height: 40px;
	}

	.masthead__actions {
		gap: 0.15rem;
	}

	/* Search stays in the header as an icon; night mode moves into the menu drawer. */
	.masthead__search {
		width: 42px;
		height: 42px;
		justify-content: center;
		padding: 0;
		background: transparent;
	}

	.masthead__search-label,
	.masthead__actions .theme-toggle {
		display: none;
	}

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

	.grid--3 > .card:last-child:nth-child(odd) {
		display: flex;
	}

	/* Cards in a row show one at a time with the next one peeking; swipe to move. */
	.carousel {
		--pv: 1.15;
		--carousel-gap: 0.9rem;
	}

	.carousel .carousel-arrow {
		display: none;
	}

	.hero__media {
		aspect-ratio: 16 / 9;
	}

	.hero .carousel-arrow {
		top: calc(100cqi * 9 / 32);
		width: 38px;
		height: 38px;
	}

	.carousel-arrow--prev {
		inset-inline-start: calc(var(--gutter) + 0.5rem);
	}

	.carousel-arrow--next {
		inset-inline-end: calc(var(--gutter) + 0.5rem);
	}

	/* A section's first card becomes a row, its picture beside the title. */
	.pick > .card {
		display: grid;
		grid-template-columns: 116px minmax(0, 1fr);
	}

	.pick > .card .card__media {
		aspect-ratio: auto;
		height: 100%;
	}

	.pick > .card .card__body {
		gap: 0.35rem;
		padding: 0.8rem 0.9rem;
	}

	.pick > .card .card__title {
		font-size: 1.15rem;
		line-height: 1.45;
	}

	.issue-band__feature {
		grid-template-columns: 104px minmax(0, 1fr);
		align-items: start;
	}

	.issue-band__editorial {
		display: -webkit-box;
		overflow: hidden;
		font-size: var(--fs-base);
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 5;
	}

	.issue-band__actions {
		grid-column: 1 / -1;
	}

	.file-card {
		display: flex;
	}

	.file-card__media {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

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

	.issues-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.25rem 1.25rem;
	}

	.section-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.authors__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.9rem;
	}

	.author-card {
		padding: 1.1rem 0.75rem 1rem;
	}

	.author-card__avatar {
		width: 84px;
		height: 84px;
	}

	.card--row {
		grid-template-columns: 112px minmax(0, 1fr);
		gap: 1rem;
	}

	.card--row .card__title {
		font-size: 1.3rem;
	}

	.card--row .card__summary {
		display: none;
	}

	/* The two link lists sit side by side, so the footer isn't one long column. */
	.site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.25rem 1.5rem;
	}

	.site-footer__about,
	.site-footer__issue {
		grid-column: 1 / -1;
	}

	/* The reading tools may drop to their own line here, where a leading divider would look stray. */
	.article-tools {
		column-gap: 0.9rem;
	}

	.reading-tools .divider {
		display: none;
	}

	.article-meta {
		align-items: flex-start;
		flex-direction: column;
	}

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

	.author-boxes--group {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Several writers: portraits above, so the names get the full width. */
	.article-author--group {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.6rem;
	}

	.profile {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.profile img {
		width: 96px;
		height: 96px;
	}

	/* Issue page: a small cover beside the title, the three ways in on a row below. */
	.issue-hero__inner {
		grid-template-columns: 96px minmax(0, 1fr);
		align-items: start;
		gap: 0 1.25rem;
	}

	.issue-hero__text {
		display: contents;
	}

	.issue-hero__inner .issue-cover {
		grid-row: 1 / span 3;
		max-width: none;
	}

	.issue-hero .breadcrumbs,
	.issue-hero .issue-band__title,
	.issue-hero .issue-band__month {
		grid-column: 2;
	}

	.issue-hero .breadcrumbs ol {
		margin-bottom: 0.5rem;
	}

	.issue-hero .issue-band__title {
		font-size: 2.25rem;
	}

	.issue-hero .issue-band__month {
		margin-top: 0.5rem;
		font-size: var(--fs-sm);
	}

	.issue-hero .issue-band__actions {
		grid-column: 1 / -1;
		gap: 0.6rem;
	}

	/* Search on its own row, the two lists side by side, then a full-width button. */
	.archive-filters__field {
		flex: 1 1 calc(50% - 0.375rem);
	}

	.archive-filters__actions {
		flex: 1 1 100%;
	}

	.archive-filters__actions .button {
		flex: 1;
	}

	.issue-card__title {
		font-size: 1.2rem;
	}

	.issue-contents > li {
		grid-template-columns: 2.5rem minmax(0, 1fr);
	}

	.newsletter__form {
		flex-direction: column;
	}

	.follow-cards {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.6rem;
	}

	.follow-card {
		flex-direction: row;
		align-items: center;
		gap: 0.9rem;
		padding: 0.8rem 1rem;
	}

	.follow-card__icon {
		flex: none;
		width: 44px;
		height: 44px;
		margin: 0;
	}

	.follow-card__text {
		flex: 1;
		min-width: 0;
		gap: 0.1rem;
	}

	.follow-card__name {
		font-size: var(--fs-base);
	}

	.follow-card__cta {
		margin: 0;
		padding: 0;
	}

	.social-posts__tabs {
		width: 100%;
	}

	.social-posts__tab {
		flex: 1;
		padding-inline: 0.5rem;
	}

	/* Post cards become a swipeable row, with the next one peeking in. */
	.post-cards {
		grid-template-columns: none;
		grid-auto-columns: 84%;
		grid-auto-flow: column;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.post-cards::-webkit-scrollbar {
		display: none;
	}

	.post-cards > li {
		scroll-snap-align: start;
	}

	.ig-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.35rem;
	}

	.about-stats {
		--stats-pad: 1.5rem;
	}

	.about-stats__item {
		padding-inline: 1rem;
	}

	.about-sections,
	.about-contact,
	.field-row {
		grid-template-columns: minmax(0, 1fr);
	}

	.filters {
		gap: 0.9rem;
	}

	.filters .field select {
		padding-inline-start: 0.8rem;
		font-size: var(--fs-sm);
	}

	.board {
		gap: 2rem 1rem;
	}

	.board-member {
		flex-basis: calc(50% - 0.5rem);
	}

	.board-member__avatar {
		width: 96px;
		height: 96px;
	}

	.board-member__name {
		font-size: 1.2rem;
	}

	.search-dialog__panel {
		margin-top: 0.75rem;
	}
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	.masthead,
	.site-footer,
	.newsletter,
	.article-aside,
	.article-tools,
	.article-share,
	.cite-box button,
	.related,
	.reading-progress,
	.toast,
	dialog {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.article-layout {
		display: block;
		padding: 0;
	}

	.article-notes__box > summary::after {
		display: none;
	}

	.prose {
		font-size: 13pt;
		line-height: 1.8;
	}

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