/*
Theme Name: Jeux Dora Child
Theme URI: https://jeuxdora.fr/
Description: Thème enfant éditorial de Jeux Dora, inspiré du carnet d'aventure de la homepage.
Author: Jeux Dora
Template: mh-magazine-lite
Version: 1.0.1
Text Domain: jeuxdora-child
*/

/* Remove the browser's default outer gutter without changing parent layouts. */
body.jeuxdora-child-theme {
	margin: 0;
}

/* The entire visual system is scoped to the child templates. */
.jd-theme-main {
	--jd-theme-red: #e64946;
	--jd-theme-red-dark: #c93432;
	--jd-theme-ink: #202027;
	--jd-theme-night: #2a2a2a;
	--jd-theme-paper: #fffaf0;
	--jd-theme-paper-light: #fffdf8;
	--jd-theme-yellow: #ffd966;
	--jd-theme-blue: #8bd2f6;
	--jd-theme-green: #afe37f;
	--jd-theme-pink: #ffc8d2;
	--jd-theme-muted: #626268;
	--jd-theme-line: rgba(32, 32, 39, 0.12);
	--jd-theme-shadow: 7px 7px 0 rgba(32, 32, 39, 0.13);
	position: relative;
	width: 100%;
	max-width: none;
	min-width: 0;
	overflow-x: clip;
	color: var(--jd-theme-ink);
	background:
		linear-gradient(90deg, var(--jd-theme-red) 0 8px, transparent 8px),
		repeating-linear-gradient(90deg, transparent 0 62px, rgba(32, 32, 39, 0.045) 62px 63px),
		repeating-linear-gradient(0deg, transparent 0 62px, rgba(32, 32, 39, 0.04) 62px 63px),
		linear-gradient(135deg, #fff8e7 0%, #fffdf7 52%, #ffefef 100%);
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.72;
}

.jd-theme-main,
.jd-theme-main * {
	box-sizing: border-box;
}

.jd-theme-main img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jd-theme-main a {
	color: inherit;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.jd-theme-main a:focus-visible,
.jd-theme-main button:focus-visible,
.jd-theme-main input:focus-visible,
.jd-theme-main textarea:focus-visible,
.jd-theme-main select:focus-visible {
	outline: 4px solid var(--jd-theme-blue);
	outline-offset: 4px;
}

.jd-theme-shell {
	width: min(1420px, calc(100% - 40px));
	margin-inline: auto;
}

.jd-theme-kicker {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin: 0 0 16px;
	padding: 5px 12px;
	border: 2px solid currentColor;
	border-radius: 999px;
	color: var(--jd-theme-ink);
	background: #fff;
	box-shadow: 3px 3px 0 rgba(32, 32, 39, 0.12);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

.jd-theme-title {
	margin: 0;
	max-width: 18ch;
	color: var(--jd-theme-ink);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: clamp(2.6rem, 7vw, 6.8rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 0.92;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.jd-theme-single-hero .jd-theme-title {
	max-width: 16ch;
	font-size: clamp(2.8rem, 5.4vw, 5.6rem);
	hyphens: auto;
	overflow-wrap: break-word;
	word-break: normal;
}

.jd-theme-lead {
	max-width: 72ch;
	margin: 22px 0 0;
	color: #45454b;
	font-size: clamp(1rem, 1.5vw, 1.2rem);
	line-height: 1.7;
}

.jd-theme-breadcrumb {
	margin: 0 0 22px;
	color: var(--jd-theme-muted);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jd-theme-breadcrumb a {
	text-decoration: none;
}

.jd-theme-breadcrumb a:hover {
	color: var(--jd-theme-red);
}

/* Shared hero treatment */
.jd-theme-intro {
	position: relative;
	padding: clamp(54px, 8vw, 110px) 0 clamp(48px, 7vw, 92px);
	isolation: isolate;
}

.jd-theme-intro::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 8%;
	right: clamp(20px, 6vw, 90px);
	width: clamp(140px, 22vw, 330px);
	aspect-ratio: 1;
	border: 3px dashed rgba(32, 32, 39, 0.23);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(139, 210, 246, 0.44), transparent 68%);
	transform: rotate(9deg);
}

.jd-theme-intro__card {
	position: relative;
	max-width: 1120px;
	padding: clamp(28px, 5vw, 66px);
	border: 3px solid var(--jd-theme-ink);
	border-radius: 42px 42px 42px 14px;
	background: rgba(255, 253, 248, 0.9);
	box-shadow: 10px 10px 0 rgba(32, 32, 39, 0.13);
}

.jd-theme-intro__card::after {
	content: "";
	position: absolute;
	top: 26px;
	right: 28px;
	width: 44px;
	height: 14px;
	border-radius: 999px;
	background: var(--jd-theme-red);
	box-shadow:
		0 22px 0 var(--jd-theme-yellow),
		0 44px 0 var(--jd-theme-blue);
	transform: rotate(5deg);
}

/* Metadata and chips */
.jd-theme-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	margin: 16px 0 0;
	color: var(--jd-theme-muted);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.45;
	text-transform: uppercase;
}

.jd-theme-meta a {
	color: var(--jd-theme-ink);
	text-decoration: none;
}

.jd-theme-meta a:hover {
	color: var(--jd-theme-red);
}

.jd-theme-chip {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 10px;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 999px;
	color: var(--jd-theme-ink);
	background: var(--jd-theme-yellow);
	text-decoration: none;
}

/* Neutral image fallback */
.jd-theme-placeholder {
	display: grid;
	min-height: 100%;
	place-content: center;
	gap: 14px;
	padding: 30px;
	color: var(--jd-theme-ink);
	background:
		repeating-linear-gradient(45deg, transparent 0 16px, rgba(32, 32, 39, 0.045) 16px 18px),
		linear-gradient(135deg, #fff3bd, #dff4ff);
	text-align: center;
}

.jd-theme-card__media > .jd-theme-placeholder,
.jd-theme-single-hero__media > .jd-theme-placeholder,
.jd-theme-related-card__media > .jd-theme-placeholder,
.jd-theme-page-hero__media > .jd-theme-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.jd-theme-placeholder strong {
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.74rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.jd-theme-placeholder__compass {
	position: relative;
	display: block;
	width: 68px;
	aspect-ratio: 1;
	margin-inline: auto;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 50%;
	background:
		linear-gradient(90deg, transparent 48%, var(--jd-theme-ink) 48% 52%, transparent 52%),
		linear-gradient(transparent 48%, var(--jd-theme-ink) 48% 52%, transparent 52%),
		#fff;
	box-shadow: 4px 4px 0 rgba(32, 32, 39, 0.14);
	transform: rotate(8deg);
}

.jd-theme-placeholder__compass i {
	position: absolute;
	inset: 18px;
	background: var(--jd-theme-red);
	clip-path: polygon(50% 0, 64% 44%, 100% 50%, 64% 56%, 50% 100%, 36% 56%, 0 50%, 36% 44%);
}

/* Archive: quest board */
.jd-theme-archive {
	padding-bottom: clamp(70px, 10vw, 140px);
}

.jd-theme-archive-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: clamp(22px, 3vw, 38px);
	align-items: stretch;
	padding-top: 20px;
}

.jd-theme-card {
	grid-column: span 4;
	min-width: 0;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 28px 28px 12px 28px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: var(--jd-theme-shadow);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.jd-theme-card:nth-child(3n + 2) {
	background: #fff8d5;
	transform: rotate(0.45deg);
}

.jd-theme-card:nth-child(3n) {
	background: #edf8ff;
	transform: rotate(-0.35deg);
}

.jd-theme-card:hover {
	box-shadow: 3px 3px 0 rgba(32, 32, 39, 0.18);
	transform: translate(3px, 3px) rotate(0deg);
}

.jd-theme-card--lead {
	grid-column: span 8;
	grid-row: span 2;
	background: var(--jd-theme-night);
	color: #fff;
	transform: rotate(-0.35deg);
}

.jd-theme-card__link {
	display: grid;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.jd-theme-card--lead .jd-theme-card__link {
	grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.jd-theme-card__media {
	position: relative;
	min-height: 250px;
	overflow: hidden;
	border-bottom: 3px solid var(--jd-theme-ink);
	border-radius: 24px 24px 0 0;
	background: var(--jd-theme-yellow);
}

.jd-theme-card--lead .jd-theme-card__media {
	min-height: 500px;
	border-right: 3px solid #fff;
	border-bottom: 0;
	border-radius: 24px 0 0 24px;
}

.jd-theme-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.jd-theme-card:hover .jd-theme-card__media img {
	transform: scale(1.025);
}

.jd-theme-card__number {
	position: absolute;
	top: 16px;
	left: 16px;
	display: grid;
	width: 48px;
	aspect-ratio: 1;
	place-items: center;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 50%;
	color: #fff;
	background: var(--jd-theme-red);
	box-shadow: 3px 3px 0 rgba(32, 32, 39, 0.16);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.75rem;
	font-weight: 700;
}

.jd-theme-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(22px, 3vw, 34px);
}

.jd-theme-card__title {
	margin: 16px 0 12px;
	color: inherit;
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: clamp(1.35rem, 2.2vw, 2rem);
	font-weight: 700;
	line-height: 1.08;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.jd-theme-card--lead .jd-theme-card__title {
	font-size: clamp(2rem, 3.5vw, 3.8rem);
}

.jd-theme-card__excerpt {
	margin: 0;
	color: #595960;
	line-height: 1.68;
}

.jd-theme-card--lead .jd-theme-card__excerpt,
.jd-theme-card--lead .jd-theme-meta {
	color: rgba(255, 255, 255, 0.75);
}

.jd-theme-card__cta {
	margin-top: auto;
	padding-top: 24px;
	color: var(--jd-theme-red);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jd-theme-card--lead .jd-theme-card__cta {
	color: var(--jd-theme-yellow);
}

.jd-theme-empty {
	margin: 20px auto 80px;
	padding: clamp(32px, 6vw, 70px);
	border: 3px dashed var(--jd-theme-ink);
	border-radius: 34px;
	background: rgba(255, 255, 255, 0.82);
	text-align: center;
}

.jd-theme-empty h2 {
	margin: 0 0 12px;
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: clamp(1.8rem, 4vw, 3.4rem);
	line-height: 1;
}

.jd-theme-empty p {
	margin: 0;
	color: var(--jd-theme-muted);
}

.jd-theme-pagination {
	margin-top: clamp(48px, 8vw, 90px);
}

.jd-theme-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.jd-theme-pagination .page-numbers {
	display: inline-grid;
	min-width: 48px;
	min-height: 48px;
	padding: 8px 14px;
	place-items: center;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 15px;
	color: var(--jd-theme-ink);
	background: #fff;
	box-shadow: 4px 4px 0 rgba(32, 32, 39, 0.13);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-weight: 700;
	text-decoration: none;
}

.jd-theme-pagination .page-numbers.current,
.jd-theme-pagination .page-numbers:hover {
	color: #fff;
	background: var(--jd-theme-red);
}

/* Single: mission dossier */
.jd-theme-single {
	padding-bottom: clamp(70px, 9vw, 130px);
}

.jd-theme-single-hero {
	position: relative;
	padding: clamp(54px, 8vw, 110px) 0 42px;
}

.jd-theme-single-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
	gap: clamp(30px, 5vw, 76px);
	align-items: center;
}

.jd-theme-single-hero__copy {
	min-width: 0;
	padding: clamp(26px, 4vw, 52px);
	border: 3px solid var(--jd-theme-ink);
	border-radius: 38px 38px 12px 38px;
	background: rgba(255, 253, 248, 0.92);
	box-shadow: 9px 9px 0 rgba(32, 32, 39, 0.13);
}

.jd-theme-single-hero__media {
	position: relative;
	min-height: clamp(420px, 55vw, 710px);
	overflow: hidden;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 28px 56px 28px 56px;
	background: var(--jd-theme-yellow);
	box-shadow: 12px 12px 0 var(--jd-theme-red);
	transform: rotate(0.65deg);
}

.jd-theme-single-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jd-theme-single-hero__media::after {
	content: "dossier de mission";
	position: absolute;
	right: 18px;
	bottom: 18px;
	padding: 8px 12px;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 999px;
	color: var(--jd-theme-ink);
	background: var(--jd-theme-yellow);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jd-theme-reading-layout {
	display: grid;
	grid-template-columns: minmax(160px, 0.28fr) minmax(0, 780px) minmax(100px, 0.18fr);
	gap: clamp(26px, 4vw, 58px);
	justify-content: center;
	align-items: start;
	padding: clamp(50px, 7vw, 100px) 0;
}

.jd-theme-reading-rail {
	position: sticky;
	top: 32px;
	padding: 22px;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 24px 24px 8px 24px;
	background: var(--jd-theme-yellow);
	box-shadow: 5px 5px 0 rgba(32, 32, 39, 0.13);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
	transform: rotate(-1.2deg);
}

.jd-theme-reading-rail::after {
	content: "";
	display: block;
	width: 3px;
	height: 84px;
	margin: 16px auto 0;
	background: repeating-linear-gradient(to bottom, var(--jd-theme-ink) 0 7px, transparent 7px 13px);
}

.jd-theme-content {
	min-width: 0;
	color: #303036;
	font-size: clamp(1.03rem, 1.25vw, 1.16rem);
	line-height: 1.82;
	overflow-wrap: anywhere;
}

.jd-theme-content > *:first-child {
	margin-top: 0;
}

.jd-theme-content > *:last-child {
	margin-bottom: 0;
}

.jd-theme-content h2,
.jd-theme-content h3,
.jd-theme-content h4 {
	color: var(--jd-theme-ink);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-weight: 700;
	line-height: 1.12;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.jd-theme-content h2 {
	margin: 2.3em 0 0.7em;
	font-size: clamp(2rem, 4vw, 3.35rem);
}

.jd-theme-content h3 {
	margin: 1.8em 0 0.65em;
	font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.jd-theme-content h4 {
	margin: 1.6em 0 0.55em;
	font-size: 1.3rem;
}

.jd-theme-content p,
.jd-theme-content ul,
.jd-theme-content ol {
	margin: 0 0 1.45em;
}

.jd-theme-content a {
	color: var(--jd-theme-red-dark);
	font-weight: 700;
}

.jd-theme-content blockquote {
	margin: 2em 0;
	padding: 24px 28px;
	border: 0;
	border-left: 7px solid var(--jd-theme-red);
	border-radius: 0 24px 24px 0;
	background: #fff2b9;
	color: var(--jd-theme-ink);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: 1.18em;
	line-height: 1.55;
}

.jd-theme-content img,
.jd-theme-content figure,
.jd-theme-content .wp-block-image {
	max-width: 100%;
}

.jd-theme-content figure {
	margin: 2.2em 0;
}

.jd-theme-content figure img,
.jd-theme-content > img {
	border: 3px solid var(--jd-theme-ink);
	border-radius: 24px;
	box-shadow: var(--jd-theme-shadow);
}

.jd-theme-content figcaption {
	margin-top: 10px;
	color: var(--jd-theme-muted);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.72rem;
	line-height: 1.5;
	text-align: center;
}

.jd-theme-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.jd-theme-content th,
.jd-theme-content td {
	min-width: 130px;
	padding: 12px 14px;
	border: 2px solid var(--jd-theme-ink);
	text-align: left;
}

.jd-theme-content th {
	background: var(--jd-theme-yellow);
	font-family: "Fredoka", "Open Sans", sans-serif;
}

.jd-theme-margin-doodle {
	position: sticky;
	top: 34px;
	display: grid;
	place-items: center;
	width: 84px;
	aspect-ratio: 1;
	margin-inline: auto;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 50%;
	background: var(--jd-theme-blue);
	box-shadow: 5px 5px 0 rgba(32, 32, 39, 0.13);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: 2rem;
	transform: rotate(8deg);
}

.jd-theme-post-nav {
	padding: 0 0 clamp(60px, 8vw, 100px);
}

.jd-theme-post-nav .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.jd-theme-post-nav a {
	display: block;
	height: 100%;
	padding: 24px;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 24px 24px 8px 24px;
	background: #fff;
	box-shadow: 5px 5px 0 rgba(32, 32, 39, 0.13);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.jd-theme-post-nav .nav-subtitle {
	display: block;
	margin-bottom: 8px;
	color: var(--jd-theme-red);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.68rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.jd-theme-related {
	padding: clamp(54px, 7vw, 88px) 0 clamp(72px, 9vw, 120px);
	background: var(--jd-theme-night);
	color: #fff;
}

.jd-theme-related__header {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 34px;
}

.jd-theme-related__header h2 {
	max-width: 16ch;
	margin: 0;
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: clamp(2rem, 5vw, 4.4rem);
	line-height: 0.95;
	text-wrap: balance;
}

.jd-theme-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.jd-theme-related-card {
	min-width: 0;
	overflow: hidden;
	border: 3px solid #fff;
	border-radius: 24px 24px 8px 24px;
	background: #fff;
	color: var(--jd-theme-ink);
	box-shadow: 6px 6px 0 var(--jd-theme-red);
}

.jd-theme-related-card:nth-child(2) {
	box-shadow: 6px 6px 0 var(--jd-theme-yellow);
	transform: rotate(0.5deg);
}

.jd-theme-related-card:nth-child(3) {
	box-shadow: 6px 6px 0 var(--jd-theme-blue);
	transform: rotate(-0.4deg);
}

.jd-theme-related-card a {
	display: block;
	height: 100%;
	text-decoration: none;
}

.jd-theme-related-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-bottom: 3px solid var(--jd-theme-ink);
}

.jd-theme-related-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jd-theme-related-card__body {
	padding: 22px;
}

.jd-theme-related-card h3 {
	margin: 12px 0 0;
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-size: clamp(1.25rem, 2vw, 1.7rem);
	line-height: 1.12;
	overflow-wrap: anywhere;
}

/* Page: route sheet */
.jd-theme-page {
	padding-bottom: clamp(80px, 10vw, 150px);
}

.jd-theme-page-hero {
	padding: clamp(58px, 8vw, 112px) 0 clamp(40px, 6vw, 76px);
}

.jd-theme-page-hero__card {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
	min-height: 410px;
	overflow: hidden;
	border: 3px solid var(--jd-theme-ink);
	border-radius: 46px 46px 14px 46px;
	background: rgba(255, 253, 248, 0.94);
	box-shadow: 11px 11px 0 rgba(32, 32, 39, 0.14);
}

.jd-theme-page-hero__copy {
	align-self: center;
	padding: clamp(30px, 6vw, 78px);
}

.jd-theme-page-hero__media {
	position: relative;
	min-height: 100%;
	border-left: 3px solid var(--jd-theme-ink);
	background: var(--jd-theme-pink);
}

.jd-theme-page-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jd-theme-page-hero__route {
	display: flex;
	gap: 12px;
	margin-top: 30px;
}

.jd-theme-page-hero__route span {
	width: 48px;
	height: 12px;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 999px;
	background: var(--jd-theme-yellow);
}

.jd-theme-page-hero__route span:nth-child(2) {
	background: var(--jd-theme-green);
	transform: rotate(3deg);
}

.jd-theme-page-hero__route span:nth-child(3) {
	background: var(--jd-theme-blue);
	transform: rotate(-2deg);
}

.jd-theme-page-body {
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
	padding: clamp(38px, 6vw, 74px);
	border: 3px solid var(--jd-theme-ink);
	border-radius: 34px 34px 12px 34px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 8px 8px 0 rgba(32, 32, 39, 0.13);
}

.jd-theme-page-body .jd-theme-content {
	max-width: none;
	font-size: clamp(1rem, 1.2vw, 1.13rem);
}

.jd-theme-page-links {
	margin-top: 36px;
	padding-top: 24px;
	border-top: 2px dashed rgba(32, 32, 39, 0.24);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
}

/* Native comments inherit a clean reading width. */
.jd-theme-comments {
	width: min(780px, calc(100% - 40px));
	margin: 0 auto clamp(70px, 9vw, 120px);
}

.jd-theme-comments .comment-respond,
.jd-theme-comments .comments-list {
	padding: clamp(24px, 4vw, 42px);
	border: 3px solid var(--jd-theme-ink);
	border-radius: 28px 28px 10px 28px;
	background: #fff;
	box-shadow: var(--jd-theme-shadow);
}

.jd-theme-comments input:not([type="submit"]),
.jd-theme-comments textarea {
	width: 100%;
	max-width: 100%;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 12px;
}

.jd-theme-comments input[type="submit"] {
	padding: 12px 20px;
	border: 2px solid var(--jd-theme-ink);
	border-radius: 14px;
	color: #fff;
	background: var(--jd-theme-red);
	font-family: "Fredoka", "Open Sans", sans-serif;
	font-weight: 700;
}

@media (max-width: 1100px) {
	.jd-theme-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jd-theme-card,
	.jd-theme-card--lead {
		grid-column: auto;
		grid-row: auto;
	}

	.jd-theme-card--lead .jd-theme-card__link {
		grid-template-columns: 1fr;
	}

	.jd-theme-card--lead .jd-theme-card__media {
		min-height: 360px;
		border-right: 0;
		border-bottom: 3px solid #fff;
		border-radius: 24px 24px 0 0;
	}

	.jd-theme-single-hero__grid {
		grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
	}

	.jd-theme-reading-layout {
		grid-template-columns: 130px minmax(0, 760px);
	}

	.jd-theme-margin-doodle {
		display: none;
	}
}

@media (max-width: 780px) {
	.jd-theme-main {
		background:
			linear-gradient(90deg, var(--jd-theme-red) 0 6px, transparent 6px),
			repeating-linear-gradient(90deg, transparent 0 44px, rgba(32, 32, 39, 0.04) 44px 45px),
			repeating-linear-gradient(0deg, transparent 0 44px, rgba(32, 32, 39, 0.035) 44px 45px),
			linear-gradient(135deg, #fff8e7, #fffdf7 55%, #ffefef);
	}

	.jd-theme-shell,
	.jd-theme-page-body,
	.jd-theme-comments {
		width: min(100% - 24px, 100%);
	}

	.jd-theme-title {
		font-size: clamp(2.45rem, 13vw, 4.4rem);
	}

	.jd-theme-intro {
		padding-block: 34px 48px;
	}

	.jd-theme-intro::before,
	.jd-theme-intro__card::after {
		display: none;
	}

	.jd-theme-intro__card {
		padding: 26px 20px 30px;
		border-radius: 28px 28px 28px 10px;
		box-shadow: 6px 6px 0 rgba(32, 32, 39, 0.13);
	}

	.jd-theme-archive-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.jd-theme-card,
	.jd-theme-card:nth-child(n) {
		transform: none;
	}

	.jd-theme-card__media,
	.jd-theme-card--lead .jd-theme-card__media {
		min-height: 240px;
		aspect-ratio: 4 / 3;
	}

	.jd-theme-card--lead .jd-theme-card__title {
		font-size: clamp(1.75rem, 8vw, 2.6rem);
	}

	.jd-theme-single-hero {
		padding-top: 34px;
	}

	.jd-theme-single-hero__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.jd-theme-single-hero__copy {
		padding: 26px 20px 30px;
	}

	.jd-theme-single-hero__media {
		min-height: 0;
		aspect-ratio: 4 / 3;
		box-shadow: 7px 7px 0 var(--jd-theme-red);
	}

	.jd-theme-reading-layout {
		grid-template-columns: 1fr;
		padding-block: 46px;
	}

	.jd-theme-reading-rail {
		position: static;
		display: flex;
		gap: 12px;
		align-items: center;
		justify-content: space-between;
		transform: none;
	}

	.jd-theme-reading-rail::after {
		width: 72px;
		height: 3px;
		margin: 0;
		background: repeating-linear-gradient(to right, var(--jd-theme-ink) 0 7px, transparent 7px 13px);
	}

	.jd-theme-content {
		font-size: 1rem;
		line-height: 1.75;
	}

	.jd-theme-content h2 {
		font-size: clamp(1.8rem, 9vw, 2.6rem);
	}

	.jd-theme-post-nav .nav-links,
	.jd-theme-related-grid {
		grid-template-columns: 1fr;
	}

	.jd-theme-related-card:nth-child(n) {
		transform: none;
	}

	.jd-theme-page-hero {
		padding-top: 34px;
	}

	.jd-theme-page-hero__card {
		grid-template-columns: 1fr;
		min-height: 0;
		border-radius: 28px 28px 10px 28px;
	}

	.jd-theme-page-hero__copy {
		padding: 28px 20px 32px;
	}

	.jd-theme-page-hero__media {
		min-height: 260px;
		border-top: 3px solid var(--jd-theme-ink);
		border-left: 0;
	}

	.jd-theme-page-body {
		padding: 28px 20px;
	}
}

@media (max-width: 420px) {
	.jd-theme-meta {
		gap: 7px 12px;
		font-size: 0.68rem;
	}

	.jd-theme-card__body,
	.jd-theme-related-card__body {
		padding: 20px 17px;
	}

	.jd-theme-card__media,
	.jd-theme-card--lead .jd-theme-card__media {
		min-height: 210px;
	}

	.jd-theme-content blockquote {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jd-theme-main *,
	.jd-theme-main *::before,
	.jd-theme-main *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
