/* Design 3, Edition: one screen per page, turned sideways. Then a quiet reading view. */

:root {
	--red: #C13E2D;
	--indigo: #34299B;
	--butter: #F4EEA2;
	--ink: #1E1E1E;
	--paper: #FFFFF8;
	--display: "Anybody", "Arial Narrow", Arial, sans-serif;
	--serif: "Newsreader", Georgia, serif;
	--bar: 52px;
	--pad: clamp(18px, 4.5vw, 72px);
}
*,
*::before,
*::after {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}
img {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
}
:focus-visible {
	outline: 3px solid var(--red);
	outline-offset: 3px;
}
kbd {
	padding: 1px 6px;
	border: 1px solid currentColor;
	font: inherit;
}
.defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}
.tiles {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom left, #000, rgb(0 0 0 / 0.4) 30%, transparent 60%);
	mask-image: linear-gradient(to bottom left, #000, rgb(0 0 0 / 0.4) 30%, transparent 60%);
}
.art {
	position: relative;
	isolation: isolate;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	container-type: size;
	background: var(--art-bg);
}
.art .tiles {
	-webkit-mask-image: none;
	mask-image: none;
	opacity: 0.8;
}
.art__label {
	position: absolute;
	bottom: max(12px, 10cqh);
	left: max(12px, 8cqw);
	color: var(--art-text);
	font-family: var(--display);
	font-size: clamp(16px, min(13cqw, 18cqh), 110px);
	font-weight: 900;
	font-stretch: 78%;
	line-height: 0.9;
}
.art__marker {
	display: block;
	width: 0.6em;
	height: 0.55em;
	margin-bottom: 0.22em;
	background: var(--art-marker);
	clip-path: polygon(33% 0, 100% 0, 67% 100%, 0 100%);
}

/* The bar: issue, page count and a progress rule */
.ed-bar,
.rd-bar {
	position: fixed;
	inset: 0 0 auto;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 18px;
	height: var(--bar);
	padding: 0 var(--pad);
	background: var(--ink);
	color: var(--paper);
	font-family: var(--display);
	font-size: 0.78rem;
	font-weight: 600;
	font-stretch: 110%;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.ed-bar p {
	margin: 0;
}
.ed-bar__mark,
.rd-mark {
	display: block;
	width: 140px;
	line-height: 0;
}
.ed-bar__mark svg,
.rd-mark svg {
	width: 100%;
	height: auto;
}
.ed-bar .wm-polity,
.rd-bar .wm-polity {
	fill: var(--paper);
}
.ed-bar .wm-weekly,
.rd-bar .wm-weekly {
	fill: var(--butter);
}
.ed-bar__issue {
	flex: 1;
	text-align: center;
}
.ed-bar__count {
	min-width: 4.5em;
	text-align: right;
}
.ed-progress,
.rd-progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 4px;
	background: rgb(255 255 248 / 0.15);
}
.ed-progress span,
.rd-progress {
	display: block;
	height: 100%;
	background: var(--butter);
	transform: scaleX(0.1);
	transform-origin: left;
	transition: transform 300ms;
}

/* The pages: a sideways strip that snaps a screen at a time */
.ed-home {
	overflow: hidden;
}
.ed-pages {
	display: flex;
	height: 100dvh;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
.ed-pages::-webkit-scrollbar {
	display: none;
}
.ed-pages:focus-visible {
	outline-offset: -6px;
}
.ed-page {
	position: relative;
	isolation: isolate;
	flex: 0 0 100%;
	height: 100dvh;
	padding: calc(var(--bar) + 28px) var(--pad) 96px;
	overflow-x: hidden;
	overflow-y: auto;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: var(--bg, var(--paper));
	color: var(--fg, var(--ink));
}

/* Cover */
.ed-cover {
	--bg: var(--indigo);
	--fg: var(--paper);
}
.ed-cover__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 22px 40px;
	height: 100%;
}
.ed-cover__top {
	display: flex;
	grid-column: 1 / -1;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
}
.ed-cover__mark {
	display: block;
	width: min(62%, 760px);
	line-height: 0;
}
.ed-cover__mark svg {
	width: 100%;
	height: auto;
}
.ed-cover .wm-polity {
	fill: var(--paper);
}
.ed-cover .wm-weekly {
	fill: var(--butter);
}
.ed-cover__issue {
	display: grid;
	justify-items: end;
	margin: 0;
	font-family: var(--display);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ed-cover__issue strong {
	color: var(--butter);
	font-size: clamp(4rem, 2rem + 6vw, 8.5rem);
	font-weight: 900;
	font-stretch: 72%;
	letter-spacing: -0.02em;
	line-height: 0.82;
}
/* The slide holds the art's place in the grid and drifts while the page turns; the art rises inside it. */
.ed-cover__slide {
	display: grid;
	grid-column: 2;
	grid-row: 2 / 4;
	min-height: 0;
}
.ed-cover__art {
	min-height: 0;
	overflow: hidden;
	box-shadow: 14px 14px 0 var(--red);
}
.ed-cover__art img,
.ed-cover__art .art {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ed-cover__lines {
	grid-column: 1;
	grid-row: 2;
	align-self: end;
}
.ed-cover__kicker {
	display: inline-block;
	margin: 0 0 12px;
	padding: 5px 16px;
	background: var(--butter);
	color: var(--ink);
	clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
	font-family: var(--display);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.ed-cover__hl {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2rem, 1rem + 2.6vw, 3.6rem);
	font-weight: 900;
	font-stretch: 78%;
	line-height: 0.95;
	text-wrap: balance;
}
.ed-cover__hl a,
.ed-cover__also a {
	text-decoration: none;
}
.ed-cover__hl a:hover,
.ed-cover__also a:hover {
	text-decoration: underline;
}
.ed-cover__also {
	display: grid;
	gap: 8px;
	margin: 22px 0 0;
	padding: 16px 0 0;
	border-top: 2px solid var(--butter);
	list-style: none;
	font-size: 1.08rem;
	line-height: 1.25;
}
.ed-hint--narrow {
	display: none;
}
.ed-hint {
	grid-column: 1;
	grid-row: 3;
	align-self: end;
	margin: 0;
	font-family: var(--display);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.85;
}

/* Contents */
.ed-contents__inner {
	max-width: 1080px;
	margin: 0 auto;
}
.ed-contents__title {
	margin: 0 0 20px;
	font-family: var(--display);
	font-size: clamp(2.6rem, 1.4rem + 4vw, 5.4rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.9;
	text-transform: uppercase;
}
.ed-contents__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 3px solid var(--ink);
}
.ed-contents__list a {
	display: grid;
	grid-template-columns: 4.2rem minmax(0, 1fr) auto;
	column-gap: 18px;
	padding: 14px 0;
	border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
	text-decoration: none;
}
.ed-contents__n {
	grid-row: 1 / 3;
	color: var(--red);
	font-family: var(--display);
	font-size: 2.4rem;
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.9;
}
.ed-contents__k {
	font-family: var(--display);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ed-contents__t {
	grid-column: 2;
	font-size: clamp(1.1rem, 1rem + 0.4vw, 1.4rem);
	line-height: 1.2;
}
.ed-contents__m {
	grid-column: 3;
	grid-row: 1 / 3;
	align-self: center;
	font-style: italic;
}
.ed-contents__list a:hover .ed-contents__t {
	text-decoration: underline;
}

/* A story page: the art on one half, the text on the other */
.ed-story {
	padding: var(--bar) 0 0;
}
.ed-story__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	height: 100%;
}
.ed-story__art {
	min-height: 0;
	overflow: hidden;
}
.ed-story__art img,
.ed-story__art .art {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ed-story--right .ed-story__art {
	order: 2;
}
.ed-story__text {
	align-self: center;
	padding: 24px var(--pad) 96px;
}
.ed-story__n {
	margin: 0 0 6px;
	color: var(--accent);
	font-family: var(--display);
	font-size: clamp(3rem, 2rem + 3vw, 5.5rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.85;
}
.ed-story__k {
	margin: 0 0 10px;
	font-family: var(--display);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ed-story__hl {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2rem, 1rem + 2.8vw, 4rem);
	font-weight: 900;
	font-stretch: 78%;
	line-height: 0.95;
	text-wrap: balance;
}
.ed-story__hl a {
	text-decoration: none;
}
.ed-story__stand {
	max-width: 30em;
	margin: 18px 0 0;
	font-size: clamp(1.08rem, 1rem + 0.3vw, 1.3rem);
	line-height: 1.4;
}
.ed-story__by {
	margin: 12px 0 0;
	font-family: var(--display);
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ed-story__read {
	display: inline-block;
	margin-top: 24px;
	padding: 12px 26px;
	background: var(--accent);
	color: var(--bg);
	clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
	font-family: var(--display);
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}
.ed-story__read:hover {
	filter: brightness(1.08);
}

/* Quote page */
.ed-quote {
	--bg: var(--indigo);
	--fg: var(--paper);
	padding-bottom: 0;
}
.ed-quote__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	grid-template-rows: minmax(0, 1fr) auto;
	column-gap: 40px;
	height: 100%;
	margin: 0;
}
.ed-quote__photo {
	grid-row: 1 / 3;
	align-self: end;
	max-height: 100%;
	object-fit: contain;
	object-position: bottom;
}
.ed-quote__q {
	align-self: center;
	margin: 0;
	font-size: clamp(1.8rem, 1rem + 2.8vw, 4rem);
	font-style: italic;
	line-height: 1.1;
}
.ed-quote__q p {
	margin: 0;
}
.ed-quote__q p::before {
	content: "“";
	color: var(--butter);
}
.ed-quote__q p::after {
	content: "”";
	color: var(--butter);
}
.ed-quote__who {
	grid-column: 2;
	padding-bottom: 110px;
	font-family: var(--display);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ed-quote__who strong {
	display: block;
	color: var(--butter);
	font-size: 2.2rem;
	font-weight: 900;
	font-stretch: 78%;
	letter-spacing: 0;
}

/* End page */
.ed-end {
	--bg: var(--butter);
	display: grid;
	place-items: center;
	text-align: center;
}
.ed-end__k {
	margin: 0;
	color: var(--red);
	font-family: var(--display);
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ed-end__big {
	margin: 10px 0;
	font-family: var(--display);
	font-size: clamp(2.6rem, 1rem + 5vw, 6rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.9;
	text-transform: uppercase;
}
.ed-end__s {
	margin: 0;
	font-size: 1.3rem;
	font-style: italic;
}
.ed-end__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 28px 0 0;
}
.ed-end__actions a {
	padding: 12px 24px;
	background: var(--ink);
	color: var(--paper);
	clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
	font-family: var(--display);
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

/* Page-turning controls, shown once the script runs */
.ed-arrow {
	position: fixed;
	top: 50%;
	z-index: 15;
	display: none;
	width: 54px;
	height: 54px;
	border: 0;
	background: var(--ink);
	color: var(--paper);
	clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
	font-size: 1.4rem;
	cursor: pointer;
	transform: translateY(-50%);
}
.js .ed-arrow {
	display: block;
}
.ed-arrow--prev {
	left: 10px;
}
.ed-arrow--next {
	right: 10px;
}
.ed-arrow:disabled {
	opacity: 0;
	pointer-events: none;
}
.ed-dots {
	position: fixed;
	bottom: 22px;
	left: 50%;
	z-index: 15;
	display: flex;
	gap: 6px;
	padding: 8px 10px;
	background: rgb(30 30 30 / 0.85);
	transform: translateX(-50%);
}
.ed-dots a {
	display: block;
	width: 14px;
	height: 14px;
	background: rgb(255 255 248 / 0.4);
	clip-path: polygon(33% 0, 100% 0, 67% 100%, 0 100%);
}
.ed-dots a[aria-current="page"] {
	background: var(--butter);
}
.ed-dots a:hover {
	background: var(--paper);
}

/* Reading view */
.rd-page-body {
	padding-top: var(--bar);
}
.rd-back {
	white-space: nowrap;
	text-decoration: none;
}
.rd-back:hover {
	text-decoration: underline;
}
.rd-mark {
	margin: 0 auto;
}
.rd-page {
	white-space: nowrap;
}
.rd-progress {
	/* Both the track and the bar in the reading view: keep the track's height, not the bar's 100%. */
	height: 4px;
	transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
	.rd-progress {
		animation: rd-grow linear both;
		animation-timeline: scroll(root);
	}
}
@keyframes rd-grow {
	from {
		transform: scaleX(0);
	}
	to {
		transform: scaleX(1);
	}
}
.rd {
	padding-bottom: 80px;
}
.rd-head {
	width: min(100% - 32px, 820px);
	margin: 56px auto 32px;
}
.rd-k {
	margin: 0 0 12px;
	color: var(--red);
	font-family: var(--display);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.rd-hl {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.4rem);
	font-weight: 900;
	font-stretch: 78%;
	line-height: 0.96;
	text-wrap: balance;
}
.rd-stand {
	margin: 18px 0 0;
	font-size: 1.35rem;
	line-height: 1.4;
}
.rd-by {
	margin: 14px 0 0;
	font-family: var(--display);
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.rd-fig {
	width: min(100%, 1280px);
	margin: 0 auto;
	aspect-ratio: 21 / 9;
	overflow: hidden;
}
.rd-fig img,
.rd-fig .art {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rd-fig {
	position: relative;
}
.rd-drift {
	height: 100%;
}
/* The picture is a little taller than its frame while it drifts, so no edge ever shows. */
.motion .rd-drift {
	position: absolute;
	inset: calc(-1 * var(--drift-room, 0px)) 0;
	height: auto;
}
.rd-body {
	width: min(100% - 32px, 680px);
	margin: 44px auto 0;
	font-size: 1.3rem;
	line-height: 1.6;
}
.rd-body p {
	margin: 0 0 1.1em;
}
.rd-body .pull-quote {
	margin: 1.6em 0;
	padding: 30px 36px;
	background: var(--butter);
	font-family: "Literata", Georgia, serif;
	font-size: 1.3rem;
	line-height: 1.45;
}
.rd-body .pull-quote blockquote,
.rd-body .pull-quote p {
	margin: 0;
}
.rd-next {
	width: min(100% - 32px, 820px);
	margin: 56px auto 0;
}
.rd-next a {
	display: grid;
	gap: 8px;
	padding: 28px 32px;
	background: var(--indigo);
	color: var(--paper);
	text-decoration: none;
}
.rd-next span {
	color: var(--butter);
	font-family: var(--display);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.rd-next strong {
	font-family: var(--display);
	font-size: clamp(1.6rem, 1rem + 1.6vw, 2.6rem);
	font-weight: 900;
	font-stretch: 78%;
	line-height: 1;
}
.rd-next a:hover strong {
	text-decoration: underline;
}

/* Phone */
@media (max-width: 799px) {
	.ed-bar__issue,
	.rd-page {
		display: none;
	}
	.ed-bar {
		justify-content: space-between;
	}
	.ed-page {
		padding: calc(var(--bar) + 18px) 18px 120px;
	}
	.ed-cover__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto auto auto;
		gap: 16px;
		height: auto;
	}
	.ed-cover__mark {
		width: 64%;
	}
	.ed-cover__issue strong {
		font-size: 3.6rem;
	}
	.ed-cover__slide {
		grid-column: 1;
		grid-row: 2;
	}
	.ed-cover__art {
		aspect-ratio: 16 / 10;
		box-shadow: 8px 8px 0 var(--red);
	}
	.ed-cover__lines {
		grid-column: 1;
		grid-row: 3;
	}
	.ed-cover__also li:nth-child(n + 2) {
		display: none;
	}
	.ed-hint--wide {
		display: none;
	}
	.ed-hint--narrow {
		display: inline;
	}
	.ed-hint {
		grid-row: 4;
	}
	.ed-story {
		padding: var(--bar) 0 0;
	}
	.ed-story__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: 36dvh auto;
		height: auto;
	}
	.ed-story--right .ed-story__art {
		order: 0;
	}
	.ed-story__text {
		align-self: start;
		padding: 18px 18px 130px;
	}
	.ed-story__n {
		font-size: 2.6rem;
	}
	.ed-story__hl {
		font-size: clamp(1.8rem, 8.4vw, 2.4rem);
	}
	.ed-contents__list a {
		grid-template-columns: 3rem minmax(0, 1fr);
	}
	.ed-contents__n {
		font-size: 1.8rem;
	}
	.ed-contents__m {
		display: none;
	}
	.ed-quote {
		padding-bottom: 0;
	}
	.ed-quote__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto minmax(0, 1fr);
		height: 100%;
	}
	.ed-quote__q {
		grid-row: 1;
		align-self: start;
	}
	.ed-quote__who {
		grid-column: 1;
		grid-row: 2;
		padding: 16px 0 0;
	}
	.ed-quote__photo {
		grid-row: 3;
		justify-self: center;
		width: 72%;
		max-height: 100%;
		min-height: 0;
	}
	.js .ed-arrow {
		display: none;
	}
	.ed-dots {
		bottom: 64px;
	}
	.rd-bar {
		gap: 12px;
	}
	.rd-mark {
		width: 110px;
		margin: 0 0 0 auto;
	}
	.rd-body {
		font-size: 1.125rem;
	}
	.rd-fig {
		aspect-ratio: 16 / 10;
	}
}
