/*
  Open Data Stories: theme styles
  Colours, fonts and sizes are set in theme.json. This file adds what
  theme.json cannot: the hand-drawn marks, the handwritten notes, and the
  layout of headers, cards, the story worlds and the author block.

  The idea: one left-aligned column of print on white paper.
  The lines between things and the notes in the margin belong to the pen.
  Chart data, table rules and form fields always stay straight.

  Contents
  1. Tokens            5. Story cards        9. Notes and marks
  2. Header and menu   6. Story worlds      10. Email sign-up
  3. Sections          7. Story pages       11. Footer
  4. Homepage          8. Author            12. Small things
                                            13. Homepage on phones
*/

/* 1. Tokens --------------------------------------------------------------- */

:root {
	--ods-paper: var(--wp--preset--color--paper, #FFFFFF);
	--ods-ink: var(--wp--preset--color--ink, #0E2A2E);
	--ods-muted: var(--wp--preset--color--muted, #4A5F62);
	--ods-rule: var(--wp--preset--color--rule, #D9D9D9);
	--ods-brand-grey: var(--wp--preset--color--logo-grey, #5F6B6D);
	--ods-teal: var(--wp--preset--color--teal, #0E7A72);
	--ods-teal-deep: #0A5A57;
	--ods-serif: var(--wp--preset--font-family--newsreader, Georgia, serif);
	--ods-sans: var(--wp--preset--font-family--sora, "Segoe UI", Arial, sans-serif);
	--ods-hand: var(--wp--preset--font-family--mynerve, cursive);
	--ods-measure: 34rem;
	--ods-section: clamp(2.75rem, 6vw, 4.5rem);
}

/* Padding and borders count inside a box's width in the theme's own parts */
[class*="ods-"],
[class*="ods-"] *,
[class*="ods-"] *::before,
[class*="ods-"] *::after,
.wp-block-search__input {
	box-sizing: border-box;
}

body {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-wrap: break-word;
}

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

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

/* 2. Header and menu ------------------------------------------------------ */

.ods-header__bar {
	gap: 0.5rem 1rem;
	padding-block: 1.25rem 0.9rem;
}

/* The logo: a 3 x 3 grid of grey dots (the data) with one teal dot (the story)
   in the middle row. The name sits on the teal dot's line, so the eye runs from
   the data point straight into "Stories". */
.ods-logo {
	margin: 0;
	line-height: 1;
}

.ods-logo__link {
	display: inline-flex;
	align-items: center;
	gap: 0.32em;
	color: var(--ods-brand-grey) !important;
	font-family: var(--ods-sans);
	font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.65rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none !important;
}

/* The smallest phones (320px): a slightly smaller logo, so it and the Menu
   button share one line */
@media (max-width: 22rem) {
	.ods-header .ods-logo__link {
		font-size: 1rem;
	}
}

.ods-logo__mark {
	flex: none;
	width: 2.25em;
	height: 2.25em;
}

/* Centring a line of Sora puts its middle 0.34em above the baseline; the teal dot
   should meet the letters a little lower (0.31em), between the x-height and the caps */
.ods-logo__name {
	position: relative;
	top: 0.03em;
}

.ods-logo__accent {
	color: var(--ods-teal);
}

.ods-logo--small .ods-logo__link {
	font-size: 1.3rem;
}

.ods-nav .wp-block-navigation__container {
	gap: 0.25rem 1.75rem;
}

.ods-nav .wp-block-navigation-item__content {
	display: inline-block;
	padding: 0.4rem 0 0.55rem;
	background: no-repeat left bottom 0.2rem / 100% 2px;
	color: var(--ods-ink);
	text-decoration: none;
}

/* A straight teal line under the page you are on, and under the one you point at */
.ods-nav .wp-block-navigation-item__content:hover {
	background-image: linear-gradient(var(--ods-teal), var(--ods-teal));
	text-decoration: none;
}

.ods-nav .current-menu-item > .wp-block-navigation-item__content {
	background-image: linear-gradient(var(--ods-teal), var(--ods-teal));
	color: var(--ods-teal);
}

/* The Menu and Close buttons on a phone */
.ods-nav .wp-block-navigation__responsive-container-open,
.ods-nav .wp-block-navigation__responsive-container-close {
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: none;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.3;
}

.ods-nav .wp-block-navigation__responsive-container-open:hover,
.ods-nav .wp-block-navigation__responsive-container-close:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

.ods-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
	background: var(--ods-paper);
}

.ods-nav .is-menu-open .wp-block-navigation__responsive-container-content,
.ods-nav .is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	gap: 0.25rem;
}

.ods-nav .wp-block-navigation-item__content,
.ods-nav .wp-block-navigation-item__content:hover,
.ods-nav .wp-block-navigation-item__content:focus {
	text-decoration: none !important;
}

.ods-nav .is-menu-open .wp-block-navigation-item__content {
	padding: 0.55rem 0 0.75rem !important;
	font-size: var(--wp--preset--font-size--medium);
	background-position: left bottom 0.45rem;
}

/* WordPress shows the full menu from 600px, but the six links fit beside
   the logo on one line only from about 61rem (980px). Up to 64rem (1024px),
   keep the Menu button, so the links never wrap onto a second line. */
@media (min-width: 600px) and (max-width: 63.99rem) {
	.ods-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.ods-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* 3. Sections ------------------------------------------------------------- */

/* The footer sits at the bottom of the window on short pages */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > main {
	flex-grow: 1;
}

/* Keeps the same gap above the footer as before: the footer brings its own */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.ods-main {
	padding-bottom: var(--ods-section);
}

.ods-main > * + * {
	margin-block-start: 0;
}

.ods-section {
	padding-bottom: var(--ods-section);
}

/* No double gap when a section is the last thing before the footer */
.ods-main > .ods-section:last-child {
	padding-bottom: 0;
}

.ods-section > * {
	margin-block: 0;
}

.ods-section-head {
	align-items: baseline;
	gap: 0.5rem 1.5rem;
	margin: 1.25rem 0 1.5rem !important;
}

.ods-section > .ods-section-head:first-child {
	margin-top: 0 !important;
}

/* Section titles: in the headline font, so each part of a page is easy to find */
.ods-section-label {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.ods-section-link {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

.ods-section-intro {
	max-width: var(--ods-measure);
	margin: -0.6rem 0 1.5rem !important;
	color: var(--ods-muted);
}

/* Hand-ruled divider: the Separator block with the "Hand-drawn line" style */
hr.wp-block-separator.is-style-hand-drawn:not(.is-style-wide):not(.is-style-dots),
.ods-rule {
	box-sizing: border-box;
	width: 100%;
	height: 6px;
	margin-top: 0;
	margin-bottom: 0;
	margin-left: 0;
	margin-right: 0;
	border: 0;
	background: url("../marks/rule-1.svg") no-repeat center / 100% 100%;
	opacity: 1;
}

.ods-section hr.is-style-hand-drawn,
.ods-related .ods-rule {
	background-image: url("../marks/rule-2.svg");
}

.ods-footer hr.is-style-hand-drawn,
.ods-signup-section hr.is-style-hand-drawn {
	background-image: url("../marks/rule-3.svg");
}

/* 4. Homepage ------------------------------------------------------------- */

.ods-intro {
	padding-block: clamp(2.25rem, 7vw, 5rem) clamp(2.25rem, 6vw, 4.25rem);
}

.ods-intro > *,
.ods-intro__text > * {
	margin-block: 0;
}

.ods-tagline {
	max-width: 15ch;
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 650;
	line-height: 1.06;
	letter-spacing: -0.035em;
}

.ods-lede,
.is-style-lede {
	max-width: 31rem;
	color: var(--ods-muted);
	font-size: clamp(1.1875rem, 1.05rem + 0.7vw, 1.4375rem);
	line-height: 1.45;
}

/* The link to the stories under the headline, big enough for a thumb */
.ods-intro .ods-intro__actions {
	margin: 0;
	padding-top: 1.75rem;
}

.ods-intro__actions .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding-inline: 1.25rem;
	text-decoration: none;
}

.ods-intro__actions .wp-block-button__link:focus-visible {
	outline: 2px solid var(--ods-teal);
	outline-offset: 3px;
}

.ods-intro .ods-lede {
	margin-top: 1.25rem;
	text-wrap: pretty;
}

/* The story map and the open data map: on phones they sit under the headline;
   from 46rem (tablets and computers) the text and the map sit side by side.
   The open data map's column is a little wider, so countries are easy to point at. */
.ods-intro .ods-story-map,
.ods-intro .ods-data-map {
	max-width: 36rem;
	margin: 2rem 0 0;
}

@media (min-width: 46rem) {
	.ods-intro:has(.ods-story-map, .ods-data-map) {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 2rem;
		align-items: center;
	}

	.ods-intro:has(.ods-data-map) {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
		align-items: stretch;
	}

	/* The two columns share one top and one bottom line: the headline starts
	   level with the map, and the button sits level with the last line of the
	   caption under it */
	.ods-intro:has(.ods-data-map) .ods-intro__text {
		display: flex;
		flex-direction: column;
	}

	.ods-intro:has(.ods-data-map) .ods-tagline {
		margin-top: -0.12em;
	}

	.ods-intro:has(.ods-data-map) .ods-intro__actions {
		margin-top: auto;
	}

	.ods-intro .ods-data-map {
		display: flex;
		flex-direction: column;
	}

	.ods-intro .ods-data-map__source {
		margin-top: auto;
		padding-top: 0.55rem;
	}

	/* A touch smaller, so the headline keeps to a few lines beside the map */
	.ods-intro:has(.ods-story-map, .ods-data-map) .ods-tagline {
		font-size: clamp(2rem, 0.6rem + 3.6vw, 3.75rem);
	}

	.ods-intro .ods-story-map,
	.ods-intro .ods-data-map {
		max-width: none;
		margin-top: 0;
	}
}

@media (min-width: 64rem) {
	.ods-intro:has(.ods-story-map, .ods-data-map) {
		gap: 3rem;
	}

	.ods-intro:has(.ods-story-map, .ods-data-map) .ods-tagline {
		font-size: clamp(2.375rem, 1rem + 3.4vw, 3.75rem);
	}
}

.ods-story-map__hidden,
.ods-story-map-empty {
	margin: 0 0 0.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px dashed var(--ods-muted);
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.45;
}

.ods-story-map__world {
	position: relative;
	container-type: inline-size;
}

.ods-story-map__world img {
	display: block;
	width: 100%;
	height: auto;
}

.ods-story-map__dots {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Phones show the grouped set of dots; a map 440px or wider shows the finer set */
.ods-story-map__dots--large {
	display: none;
}

@container (min-width: 440px) {
	.ods-story-map__dots--small {
		display: none;
	}

	.ods-story-map__dots--large {
		display: block;
	}
}

.ods-story-map__dots li {
	position: absolute;
	width: 0;
	height: 0;
	margin: 0;
}

.ods-story-map__dots li:hover,
.ods-story-map__dots li:focus-within {
	z-index: 2;
}

/* A 28px tap area around a 10px dot */
.ods-story-map__dot {
	position: absolute;
	top: -0.875rem;
	left: -0.875rem;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ods-ink);
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}

.ods-story-map__dot::before,
.ods-story-map__dot--many::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	border-radius: 50%;
}

.ods-story-map__dot::before {
	width: 0.625rem;
	height: 0.625rem;
	background: var(--ods-teal);
	box-shadow: 0 0 0 2px var(--ods-paper);
}

/* A place with more than one story gets a ring, like a circled note */
.ods-story-map__dot--many::after {
	width: 1.3rem;
	height: 1.3rem;
	border: 1.5px solid var(--ods-teal);
}

.ods-story-map__dot:hover::before,
.ods-story-map__dot:focus-visible::before {
	width: 0.8rem;
	height: 0.8rem;
}

.ods-story-map__dot:focus-visible {
	outline: 2px solid var(--ods-ink);
	outline-offset: 0;
}

/* The place and title appear on hover or keyboard focus. They stay readable by
   screen readers at all times. */
.ods-story-map__label {
	position: absolute;
	bottom: calc(100% + 0.15rem);
	left: 50%;
	width: max-content;
	max-width: 15rem;
	padding: 0.45rem 0.65rem 0.5rem;
	border: 1px solid var(--ods-rule);
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-serif);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
	text-align: left;
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%);
}

.ods-story-map__dot:hover .ods-story-map__label,
.ods-story-map__dot:focus-visible .ods-story-map__label {
	opacity: 1;
}

.ods-story-map__dot--west .ods-story-map__label {
	left: -0.25rem;
	transform: none;
}

.ods-story-map__dot--east .ods-story-map__label {
	right: -0.25rem;
	left: auto;
	transform: none;
}

.ods-story-map__dot--below .ods-story-map__label {
	top: calc(100% + 0.15rem);
	bottom: auto;
}

.ods-story-map__place {
	display: block;
	margin-bottom: 0.1rem;
	color: var(--ods-teal);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

/* The note under the map, with its key: a circled dot and a pen arrow */
.ods-story-map__note {
	display: flex;
	align-items: flex-start;
	gap: 0.3rem;
	margin: 0.5rem 0 0;
	color: var(--ods-teal);
	font-family: var(--ods-hand);
	font-size: 1.15rem;
	line-height: 1.3;
	text-wrap: balance;
	text-align: left;
}

.ods-story-map__note::before {
	content: "";
	flex: none;
	width: 3.5rem;
	height: 1.95rem;
	margin-top: -0.4rem;
	background: url("../marks/map-key.svg") no-repeat left top / contain;
}

/* The open data map: the same grey world, with every country that has an
	open data portal in one teal. Portals count their datasets in different
	ways, so the colour does not rank them; a count shows in the label. A
	dashed ring marks the EU's portal. On computers the map sits to the right
	of the headline, a little wider than the text so the countries are easy
	to point at. */
.ods-data-map {
	--land: #D9D9D9; /* the grey of world-map.svg: no portal listed */
	--level-0: #B4DAD5;
	--level-1: #86C1B9;
	--level-2: #55A49B;
	--level-3: #2A877F;
	--level-4: #0B5E58;
	max-width: 36rem;
	margin: 2rem 0 0;
}

.ods-data-map__world {
	position: relative;
	container-type: inline-size;
}

.ods-data-map__world img {
	display: block;
	width: 100%;
	height: auto;
}

.ods-data-map__marks {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: auto; /* the map's own shape, so it stays on the grey world when the note sits below */
	overflow: visible;
	pointer-events: none; /* only the countries and dots respond */
}

.ods-data-map__mark {
	cursor: pointer;
	outline: none;
}

/* The shades of the scale, for the countries, the island dots and the key */
.ods-data-map__level--0 { --shade: var(--level-0); }
.ods-data-map__level--1 { --shade: var(--level-1); }
.ods-data-map__level--2 { --shade: var(--level-2); }
.ods-data-map__level--3 { --shade: var(--level-3); }
.ods-data-map__level--4 { --shade: var(--level-4); }

.ods-data-map__land {
	fill: var(--shade, var(--level-0));
	stroke: var(--ods-paper);
	stroke-width: 0.6;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	pointer-events: visiblePainted;
	transition: filter 0.2s ease;
}

.ods-data-map__mark.is-active .ods-data-map__land,
.ods-data-map__mark--spot.is-active .ods-data-map__dot {
	filter: brightness(0.8) saturate(1.15);
}

.ods-data-map__mark:focus-visible .ods-data-map__land,
.ods-data-map__mark--spot:focus-visible .ods-data-map__dot {
	stroke: var(--ods-ink);
	stroke-width: 2;
}

.ods-data-map__hit {
	fill: transparent;
	pointer-events: all;
}

.ods-data-map__mark--regional .ods-data-map__hit {
	fill: none;
	stroke: transparent;
	stroke-width: 6;
	pointer-events: stroke;
}

.ods-data-map__dot {
	vector-effect: non-scaling-stroke;
	pointer-events: none;
}

/* Islands too small to shade get a dot in their shade */
.ods-data-map__mark--spot .ods-data-map__dot {
	fill: var(--shade, var(--level-0));
	stroke: var(--ods-teal);
	stroke-width: 1;
}

.ods-data-map__mark--regional .ods-data-map__dot {
	fill: none;
	stroke: var(--ods-ink);
	stroke-opacity: 0.55;
	stroke-width: 1.25;
	stroke-dasharray: 3 3.5;
	stroke-linecap: round;
}

.ods-data-map__mark--regional.is-active .ods-data-map__dot,
.ods-data-map__mark--regional:focus-visible .ods-data-map__dot {
	stroke-opacity: 1;
	stroke-width: 2;
}

/* One moment as the page opens: the countries fill in from west to east */
@media (prefers-reduced-motion: no-preference) {
	.ods-data-map__land,
	.ods-data-map__mark--spot .ods-data-map__dot {
		animation: ods-data-map-shade 0.7s ease backwards;
		animation-delay: calc(var(--d, 0ms) + 150ms);
	}

	.ods-data-map__mark--regional .ods-data-map__dot {
		animation: ods-data-map-ring 0.6s ease backwards;
		animation-delay: 1050ms;
	}
}

@keyframes ods-data-map-shade {
	from {
		fill-opacity: 0;
		stroke-opacity: 0;
	}
}

@keyframes ods-data-map-ring {
	from {
		opacity: 0;
	}
}

/* The label that appears on hover, keyboard focus or a first tap */
.ods-data-map__tip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	width: max-content;
	max-width: 17rem;
	padding: 0.5rem 0.7rem 0.55rem;
	border: 1px solid var(--ods-rule);
	background: var(--ods-paper);
	box-shadow: 0 2px 10px rgba(14, 42, 46, 0.08);
	color: var(--ods-ink);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.18s ease, visibility 0.18s;
}

.ods-data-map__tip.is-visible {
	opacity: 1;
	visibility: visible;
}

.ods-data-map__tip.is-touch {
	pointer-events: auto;
}

.ods-data-map__tip p {
	margin: 0;
}

.ods-data-map__tip-place {
	color: var(--ods-teal);
	font-family: var(--ods-sans);
	font-size: 0.8125rem;
	font-weight: 500;
}

.ods-data-map__tip-count {
	margin-top: 0.1rem;
	font-family: var(--ods-serif);
	font-size: 1.125rem;
	line-height: 1.25;
}

.ods-data-map__tip-source,
.ods-data-map__tip-detail {
	margin-top: 0.2rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: 0.75rem;
	line-height: 1.4;
}

.ods-data-map__tip-visit {
	display: inline-block;
	margin-top: 0.4rem;
	color: var(--ods-teal);
	font-family: var(--ods-sans);
	font-size: 0.8125rem;
	font-weight: 500;
}

/* The key, under the map: the scale on the first line, then the other marks */
.ods-data-map__key {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1rem;
	margin: 0.8rem 0 0;
	padding: 0;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: 0.75rem;
	line-height: 1.3;
	list-style: none;
}

.ods-data-map__key li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ods-data-map__key .ods-data-map__key-scale {
	flex-basis: 100%;
}

.ods-data-map__steps {
	display: inline-grid;
	grid-template-columns: repeat(4, 1fr);
	width: 4.5rem;
	height: 0.6rem;
}

.ods-data-map__steps span,
.ods-data-map__swatch {
	background: var(--shade);
}

.ods-data-map__swatch {
	flex: none;
	width: 0.9rem;
	height: 0.6rem;
}

.ods-data-map__swatch--none {
	background: var(--land);
}

.ods-data-map__swatch--ring {
	width: 0.75rem;
	height: 0.75rem;
	border: 1.5px dashed rgba(14, 42, 46, 0.55);
	border-radius: 50%;
	background: none;
}

/* The handwritten note sits on the map, in the empty Pacific west of South
	America. When the map is too small for it to read well, it moves under the map. */
.ods-data-map__note {
	margin: 0.6rem 0 0;
	color: var(--ods-teal);
	font-family: var(--ods-hand);
	font-size: 1.2rem;
	line-height: 1.15;
	pointer-events: none;
}

.ods-data-map__note span {
	display: block;
}

@container (min-width: 30rem) {
	.ods-data-map__note {
		position: absolute;
		top: 60%;
		left: 0;
		width: 22%;
		margin: 0;
		font-size: 3cqw;
		text-wrap: balance;
	}
}

/* The source, small and quiet */
.ods-data-map__source {
	margin-top: 0.55rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: 0.75rem;
	line-height: 1.5;
	text-wrap: pretty;
}

/* The list that opens when a place has more than one story */
.ods-story-map__places,
.ods-intro > .ods-story-map__places {
	margin: auto;
}

.ods-story-map__places {
	width: min(22rem, calc(100vw - 2.5rem));
	padding: 1.1rem 1.25rem 1.25rem;
	border: 1px solid var(--ods-rule);
	background: var(--ods-paper);
	color: var(--ods-ink);
}

.ods-story-map__places::backdrop {
	background: rgb(36 36 36 / 0.35);
}

.ods-story-map__places-name {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ods-story-map__places ul {
	margin: 0.4rem 0 1rem;
	padding: 0;
	list-style: none;
}

.ods-story-map__places li {
	margin: 0;
}

.ods-story-map__places li + li {
	border-top: 1px solid var(--ods-rule);
}

.ods-story-map__places li a {
	display: block;
	padding-block: 0.6rem;
	color: var(--ods-ink);
	font-family: var(--ods-serif);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.3;
	text-decoration: none;
}

.ods-story-map__places li a:hover {
	color: var(--ods-teal);
	text-decoration: underline;
}

.ods-story-map__close {
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: none;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
}

.ods-story-map__close:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

/* The featured story sits in its own pale teal band, edge to edge.
   (The shadow paints the band past the page margins without widening the page.) */
.ods-featured-query {
	margin-bottom: var(--ods-section);
	padding-block: clamp(2.25rem, 5vw, 3.75rem);
	background: rgba(14, 122, 114, 0.05);
	box-shadow: 0 0 0 100vmax rgba(14, 122, 114, 0.05);
	clip-path: inset(0 -100vmax);
}

.ods-featured-query .wp-block-post-template,
.ods-featured-query .wp-block-post {
	margin: 0;
}

/* "Featured story" is set like the other section titles (Latest stories...),
   with the same light line under it */
.ods-featured-label {
	margin: 0 0 1.75rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ods-rule);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.ods-featured {
	display: grid;
	gap: 2rem;
}

/* On wider screens: the chart on the left and larger, the text on the right */
@media (min-width: 56rem) {
	.ods-featured {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 4rem;
		align-items: center;
	}

	.ods-featured > .ods-featured__visual {
		order: -1;
		max-width: none;
	}
}

.ods-featured > *,
.ods-featured__text > * {
	margin-block: 0;
}

.ods-featured__title {
	margin-top: 0.5rem !important;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.1;
	letter-spacing: -0.028em;
}

.ods-featured__summary {
	max-width: 30rem;
	margin-top: 0.9rem !important;
	font-size: 1.25rem;
	line-height: 1.45;
}

.ods-featured__text .ods-meta {
	margin-top: 1rem !important;
}

.ods-featured__more {
	display: inline-block;
	margin-top: 1.25rem !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.ods-featured__visual {
	max-width: 32rem;
	margin: 0;
}

.ods-featured__visual img {
	display: block;
	width: 100%;
	height: auto;
}

/* Charts saved with a white background take on the band's tint instead of
   sitting in a white box */
.ods-featured-query .ods-featured__visual img {
	mix-blend-mode: multiply;
}

/* 5. Story cards ---------------------------------------------------------- */

.wp-block-post-template.ods-cards,
ul.ods-cards {
	gap: 2.25rem 2.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.ods-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.ods-card {
	padding-top: 1rem;
	border-top: 1px solid var(--ods-rule);
}

.ods-card > * {
	margin-block: 0;
}

.ods-card__visual {
	display: block;
	margin: 0 0 1rem !important;
}

.ods-card__visual img {
	display: block;
	width: 100%;
	height: auto;
}

.ods-card__title {
	margin-top: 0.4rem !important;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.18;
}

.ods-card__title a,
.ods-featured__title a {
	color: inherit;
	text-decoration: none;
}

.ods-card__title a:hover,
.ods-featured__title a:hover {
	color: var(--ods-teal);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.ods-card__summary {
	margin-top: 0.5rem !important;
	color: var(--ods-muted);
	font-size: 1.0625rem;
	line-height: 1.5;
}

.ods-card__summary p {
	margin: 0;
}

.ods-card .ods-meta {
	margin-top: 0.8rem !important;
}

/* Kicker: the world a story belongs to */
.ods-kicker {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: 1.4;
}

.ods-kicker a {
	display: inline-block;
	padding-block: 0.3rem;
	margin-block: -0.3rem;
	text-decoration: none;
}

.ods-kicker a:hover {
	text-decoration: underline;
}

/* Breadcrumbs above a headline: Stories › The World of People */
.ods-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ods-breadcrumbs li {
	margin: 0;
}

.ods-breadcrumbs li + li::before {
	content: "\203A";
	margin: 0 0.5rem;
	color: var(--ods-muted);
	font-weight: 400;
}

.ods-breadcrumbs [aria-current="page"] {
	color: var(--ods-ink);
}

/* Date and reading time */
.ods-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.9rem !important;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.4;
}

.ods-meta > * {
	margin: 0 !important;
}

.ods-meta a {
	color: inherit;
}

.ods-reading-time {
	margin: 0;
}

.ods-empty {
	max-width: var(--ods-measure);
	color: var(--ods-muted);
}

.wp-block-query-pagination {
	margin-top: 2.5rem !important;
	gap: 1rem;
}

/* Easy tapping: the whole story card opens the story, and the world link
   above the headline is tall enough for a thumb. */
.ods-card {
	position: relative;
}

.ods-card .ods-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ods-card .ods-kicker a,
.ods-related .ods-kicker a {
	position: relative;
	z-index: 1;
}

.ods-card .ods-card__title a:focus-visible {
	outline: none;
}

.ods-card:has(.ods-card__title a:focus-visible) {
	outline: 2px solid var(--ods-teal);
	outline-offset: 4px;
}

/* 6. Story worlds: compact rows on a soft teal ------------------------------ */

.ods-worlds {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 46rem) {
	.ods-worlds {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem 1rem;
	}
}

.ods-world {
	display: flex;
	margin: 0;
}

/* Each world is a row: the name with its count beside it, then what it covers */
.ods-world__link {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "name amount" "desc desc";
	align-items: baseline;
	align-content: start;
	gap: 0.3rem 1rem;
	width: 100%;
	padding: 0.8rem 1rem 0.85rem;
	border-radius: 3px;
	background: rgba(14, 122, 114, 0.05); /* #F3F9F9: teal text on it stays readable */
	color: inherit;
	text-decoration: none;
}

.ods-world__link:hover {
	box-shadow: inset 0 0 0 1px var(--ods-teal);
	text-decoration: none;
}

/* "The World of" small, the key word large, on one line */
.ods-world__name {
	grid-area: name;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.35rem;
}

.ods-world__prefix {
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.3;
}

.ods-world__key {
	font-family: var(--ods-sans);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.ods-world__link:hover .ods-world__key {
	color: var(--ods-teal);
}

.ods-world__desc {
	grid-area: desc;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.45;
}

.ods-world__amount {
	grid-area: amount;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem 0.6rem;
	padding: 0 0 0.15rem;
}

/* The count is a plain label. The handwriting is kept for notes that point at
   the data (chart notes, the map note, margin notes), so it always means
   "the author is showing you something". */
.ods-world__count {
	color: var(--ods-teal);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.ods-world__count--none {
	color: var(--ods-muted);
	font-weight: 500;
}

/* Homepage worlds on phones: two to a row, name and count only. Each world's
   page still says what it covers. */
@media (max-width: 45.99rem) {
	.ods-worlds--counts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.ods-worlds--counts .ods-world__link {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "name" "amount";
		gap: 0.3rem;
		padding: 0.7rem 0.8rem 0.75rem;
	}

	.ods-worlds--counts .ods-world__name {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.ods-worlds--counts .ods-world__amount {
		justify-content: flex-start;
		padding: 0;
	}

	.ods-worlds--counts .ods-world__count {
		white-space: normal;
	}

	.ods-worlds--counts .ods-world__desc {
		display: none;
	}
}

/* 7. Story pages and other pages ----------------------------------------- */

.ods-page-head,
.ods-article__header {
	padding-block: clamp(2rem, 5vw, 3.5rem) 1.75rem;
}

.ods-page-head > *,
.ods-article__header > * {
	margin-block: 0;
}

/* Page titles (Stories, About, Contact, each world...) have the same light
   line under them as the homepage section titles */
.ods-page-title {
	margin-top: 0.4rem !important;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--ods-rule);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.028em;
}

.ods-page-head .wp-block-term-description,
.ods-page-head .ods-lede {
	margin-top: 1.25rem !important;
	max-width: var(--ods-measure);
	color: var(--ods-muted);
	font-size: 1.25rem;
	line-height: 1.45;
}

.ods-page-head .wp-block-term-description p {
	margin: 0;
}

.ods-article__title {
	max-width: 19ch;
	margin-top: 0.6rem !important;
	font-size: clamp(1.9rem, 1.35rem + 2.8vw, 3rem);
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -0.032em;
}

.ods-article__summary {
	max-width: 36rem;
	margin-top: 1rem !important;
	color: var(--ods-muted);
	font-size: clamp(1.1875rem, 1.1rem + 0.5vw, 1.375rem);
	line-height: 1.45;
}

.ods-article__summary p {
	margin: 0;
}

.ods-article__header .ods-meta {
	margin-top: 1.25rem !important;
}

/* "Jump to": on wide screens the article's
   sections sit in a column on the left and stay in view while reading. The
   text moves over to make room, and the handwritten notes keep the right
   margin. On smaller screens it is a folded list above the text, opened with
   a tap. */
.ods-article__body > .ods-contents {
	max-width: var(--ods-measure);
	margin-bottom: 2rem;
	border-top: 1px solid var(--ods-rule);
	border-bottom: 1px solid var(--ods-rule);
}

.ods-contents__fold > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 0.85rem 0;
	cursor: pointer;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.ods-contents__fold > summary::-webkit-details-marker {
	display: none;
}

/* A small chevron that turns when the list opens */
.ods-contents__fold > summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0.25rem;
	border-right: 2px solid var(--ods-teal);
	border-bottom: 2px solid var(--ods-teal);
	transform: translateY(-25%) rotate(45deg);
}

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

.ods-contents__fold > .ods-contents__list {
	margin-bottom: 1rem;
}

.ods-prose h2,
.ods-prose h3 {
	scroll-margin-top: 1.5rem;
}

.ods-article__body > *,
.ods-article__main > .ods-prose {
	margin-block: 0;
}

@media (min-width: 70rem) {
	.ods-article:has(.ods-contents) .ods-article__header {
		padding-left: 12.5rem;
	}

	.ods-article__body:has(> .ods-contents) {
		display: grid;
		grid-template-columns: 10rem minmax(0, 1fr);
		column-gap: 2.5rem;
		align-items: start;
	}

	.ods-article__body > .ods-contents {
		position: sticky;
		top: 2rem;
		max-height: calc(100vh - 4rem);
		overflow-y: auto;
		max-width: none;
		margin-bottom: 0;
		padding-top: 0.35rem;
		border: 0;
	}

	/* Beside the text the list is always open, under a plain heading */
	.ods-contents__fold > summary {
		margin: 0 0 0.6rem;
		padding: 0;
		cursor: default;
		pointer-events: none;
		font-size: var(--wp--preset--font-size--x-small);
	}

	.ods-contents__fold > summary::after {
		display: none;
	}

	.ods-contents__fold > .ods-contents__list {
		margin-bottom: 0;
	}

	.admin-bar .ods-article__body > .ods-contents {
		top: calc(2rem + 32px);
	}
}

.ods-contents__heading {
	margin: 0 0 0.6rem;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: 1.3;
}

.ods-contents__list {
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--ods-rule);
	list-style: none;
}

.ods-contents__list li {
	margin: 0;
}

.ods-contents__list a {
	display: block;
	margin-left: -1px;
	padding: 0.35rem 0 0.35rem 0.85rem;
	border-left: 2px solid transparent;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.35;
	text-decoration: none;
}

.ods-contents__list a:hover {
	color: var(--ods-teal);
}

.ods-contents__list a[aria-current="true"] {
	border-left-color: var(--ods-teal);
	color: var(--ods-ink);
}

/* The opening visual under the headline is the story's featured image */
.ods-lead-visual {
	max-width: var(--ods-measure);
	margin: 2rem 0 0 !important;
}

.ods-lead-visual img {
	display: block;
	width: 100%;
	height: auto;
}

/* The text of a story or page */
.ods-prose {
	line-height: 1.62;
}

@media (min-width: 46rem) {
	.single .ods-prose {
		font-size: 1.1875rem;
	}
}

.ods-prose > h2 {
	margin-top: 2.1em;
}

.ods-prose > h3 {
	margin-top: 1.8em;
}

.ods-prose > h2 + *,
.ods-prose > h3 + * {
	margin-top: 0.6em;
}

.ods-prose li + li {
	margin-top: 0.4em;
}

.ods-prose blockquote,
.ods-prose .wp-block-quote {
	margin-inline: 0;
	padding: 0.1rem 0 0.1rem 1.4rem;
	border: 0;
	background: url("../marks/bracket-3.svg") no-repeat left center / 0.75rem 100%;
	font-size: 1.15em;
	line-height: 1.45;
}

.ods-prose .wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
}

.ods-prose sup {
	font-family: var(--ods-sans);
	font-size: 0.7em;
	line-height: 0;
}

/* Tables: straight rules, figures aligned */
.wp-block-table {
	overflow-x: auto;
	margin-block: 1.75em;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.wp-block-table th,
.wp-block-table td {
	padding: 0.6rem 1.25rem 0.6rem 0;
	border: 0;
	border-bottom: 1px solid var(--ods-rule);
	text-align: left;
	vertical-align: top;
}

.wp-block-table th {
	border-bottom-color: var(--ods-ink);
	font-weight: 600;
}

.wp-block-table thead {
	border-bottom: 0;
}

.wp-block-table figcaption {
	margin-top: 0.6rem;
}

/* Chart: a Group with the "Chart" style holding a title, the chart and its source */
.is-style-chart {
	margin-block: 2.25em !important;
}

.is-style-chart > * {
	margin-block: 0;
}

.is-style-chart > h2,
.is-style-chart > h3,
.is-style-chart > h4,
.is-style-chart .ods-chart__title {
	font-family: var(--ods-sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

.is-style-chart > .wp-block-image,
.is-style-chart > .wp-block-embed,
.is-style-chart > .wp-block-html {
	margin-top: 0.9rem;
}

.is-style-chart img {
	display: block;
	width: 100%;
	max-width: 32rem;
	height: auto;
}

.is-style-chart iframe {
	display: block;
	width: 100%;
	border: 0;
}

.is-style-chart > p,
.ods-chart__source {
	margin-top: 0.7rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
}

/* Data & Methods and other reference material, set in the sans */
.is-style-reference {
	margin-top: 3.5rem !important;
	padding-top: 1.75rem;
	background: url("../marks/rule-2.svg") no-repeat left top / 100% 6px;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.is-style-reference > * {
	margin-block: 0;
}

.is-style-reference > * + * {
	margin-top: 1em;
}

/* The sans comes in 400, 500 and 600 only: bold text uses 600, never a fake bold */
.is-style-reference strong,
.ods-search .wp-block-search__label {
	font-weight: 600;
}

.is-style-reference h2,
.is-style-reference h3 {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--large);
}

/* Notes and references.
	Footnote numbers are small teal figures; in-text references such as
	"(World Bank, 2024)" are links with a light dotted line. Tapping either
	shows the note or the full reference in a box beside the text. */
sup.fn {
	line-height: 0;
	font-family: var(--ods-sans);
	font-size: 0.68em;
	font-weight: 600;
}

sup.fn a {
	position: relative;
	padding: 0 0.15em;
	color: var(--ods-teal);
	text-decoration: none;
}

/* A larger area to tap than the small figure itself */
sup.fn a::after {
	content: "";
	position: absolute;
	inset: -0.7em -0.45em;
}

sup.fn a:hover,
sup.fn a[aria-expanded="true"] {
	color: var(--ods-teal-deep);
	text-decoration: underline;
}

a.ods-cite {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-style: dotted;
	text-decoration-color: var(--ods-teal);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.22em;
}

a.ods-cite:hover,
a.ods-cite[aria-expanded="true"] {
	color: var(--ods-teal-deep);
	text-decoration-style: solid;
}

/* The notes, under "Notes" at the end of a story */
.ods-notes .wp-block-footnotes,
.wp-block-footnotes {
	margin-top: 1em;
	padding-left: 1.4em;
	line-height: 1.6;
}

.wp-block-footnotes li + li {
	margin-top: 0.5em;
}

.wp-block-footnotes li::marker {
	color: var(--ods-teal);
	font-weight: 600;
}

.wp-block-footnotes a[href$="-link"] {
	margin-left: 0.25em;
	text-decoration: none;
}

/* References: one entry per item, with a hanging indent */
.wp-block-list.is-style-references {
	padding-left: 0;
	list-style: none;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.wp-block-list.is-style-references li {
	padding-left: 1.5em;
	text-indent: -1.5em;
	overflow-wrap: anywhere;
}

.wp-block-list.is-style-references li + li {
	margin-top: 0.6em;
}

/* The note or reference that was jumped to */
.wp-block-footnotes li:target,
.wp-block-list.is-style-references li:target,
sup.fn:target,
sup.fn a:target {
	background: rgba(14, 122, 114, 0.1);
	box-shadow: -0.35rem 0 0 rgba(14, 122, 114, 0.1), 0.35rem 0 0 rgba(14, 122, 114, 0.1);
}

.wp-block-footnotes li,
.wp-block-list.is-style-references li {
	scroll-margin-top: 6rem;
}

/* The box that shows a note or a reference beside the text */
.ods-note-pop {
	position: absolute;
	z-index: 60;
	box-sizing: border-box;
	padding: 1rem 1.1rem 0.8rem;
	border: 1px solid var(--ods-rule);
	border-top: 3px solid var(--ods-teal);
	border-radius: 3px;
	background: var(--ods-paper);
	box-shadow: 0 6px 24px rgba(14, 42, 46, 0.14);
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

.ods-note-pop.is-above {
	border-top-width: 1px;
	border-bottom: 3px solid var(--ods-teal);
}

.ods-note-pop:focus {
	outline: none;
}

.ods-note-pop:focus-visible {
	outline: 2px solid var(--ods-teal);
	outline-offset: 2px;
}

.ods-note-pop__text {
	overflow-wrap: anywhere;
}

.ods-note-pop__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.75rem;
	padding-top: 0.6rem;
	border-top: 1px solid var(--ods-rule);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-note-pop__close {
	padding: 0.3rem 0.1rem;
	border: 0;
	background: none;
	color: var(--ods-muted);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ods-note-pop__close:hover {
	color: var(--ods-ink);
	text-decoration: underline;
}

.ods-article__footer {
	margin-top: 3.5rem;
	padding-bottom: var(--ods-section);
}

/* Comments, after "Meet the author": the comments, then a short form */
.ods-comments-section {
	padding-bottom: var(--ods-section);
}

.ods-comments {
	max-width: 42rem;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.ods-comments > * {
	margin-block: 0;
}

.ods-comment-list {
	margin: 0 0 2rem !important;
	padding: 0;
	list-style: none;
}

.ods-comment-list ol {
	margin: 1rem 0 0;
	padding-left: 1.25rem;
	border-left: 2px solid var(--ods-rule);
	list-style: none;
}

.ods-comment-list li + li {
	margin-top: 1.5rem;
}

#ods-comments,
#ods-author,
.ods-databox__heading {
	scroll-margin-top: 1.5rem;
}

.ods-comment > * {
	margin-block: 0;
}

.ods-comment__meta {
	gap: 0.25rem 0.75rem;
	align-items: baseline;
}

.ods-comment .wp-block-comment-author-name {
	color: var(--ods-ink);
	font-weight: 600;
}

.ods-comment .wp-block-comment-date {
	color: var(--ods-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-comment .wp-block-comment-content {
	margin-top: 0.35rem;
	color: var(--ods-ink);
	font-family: var(--ods-serif);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.ods-comment .wp-block-comment-content > * {
	margin-block: 0 0.5em;
}

.ods-comment .wp-block-comment-content > :last-child {
	margin-bottom: 0;
}

.ods-comment .wp-block-comment-reply-link {
	margin-top: 0.3rem;
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-comment .wp-block-comment-reply-link a {
	font-weight: 500;
}

.ods-comments .comment-reply-title {
	margin: 0 0 0.4rem;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

.ods-comments .comment-reply-title small {
	margin-left: 0.75rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.ods-comments .comment-notes,
.ods-comments .logged-in-as {
	margin: 0 0 1rem;
	color: var(--ods-muted);
}

.ods-comments .comment-form p {
	margin: 0 0 1rem;
}

.ods-comments .comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--ods-ink);
	font-weight: 500;
}

.ods-comments .comment-form input[type="text"],
.ods-comments .comment-form input[type="email"],
.ods-comments .comment-form textarea {
	width: 100%;
	min-height: 2.875rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: 1rem;
}

.ods-comments .comment-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.ods-comments .comment-form .comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

.ods-comments .comment-form .comment-form-cookies-consent label {
	margin: 0;
	color: var(--ods-muted);
	font-weight: 400;
}

.ods-comments .comment-form-cookies-consent input {
	margin-top: 0.3rem;
	accent-color: var(--ods-teal);
}

.ods-comments .form-submit .submit {
	min-height: 2.875rem;
	padding: 0.5rem 1.1rem;
	border: 1px solid var(--ods-teal);
	border-radius: 2px;
	background: var(--ods-teal);
	color: var(--ods-paper);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	cursor: pointer;
}

.ods-comments .form-submit .submit:hover {
	border-color: var(--ods-ink);
	background: var(--ods-ink);
}

.ods-comments .wp-block-comments-pagination {
	margin-bottom: 2rem;
}

/* Charts drawn from a table (the Data chart block): grey marks, one teal highlight,
	a scale from zero, and the exact value on hover, tap or arrow keys. */
.ods-chart {
	position: relative;
	margin-block: 2.25em !important;
}

.ods-chart .ods-chart__title {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

.ods-chart figcaption {
	margin-top: 0.7rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
}

.ods-chart figcaption .ods-chart__source {
	display: block;
	margin-top: 0;
}

.ods-chart__frame {
	margin-top: 1rem;
	padding: 0 0 1.75rem calc(var(--axis, 3ch) + 0.75rem);
	font-family: var(--ods-sans);
}

.ods-chart__plot {
	position: relative;
	height: 12rem;
}

@media (min-width: 46rem) {
	.ods-chart__plot {
		height: 15rem;
	}
}

.ods-chart__tick {
	position: absolute;
	right: 0;
	left: 0;
	border-top: 1px solid var(--ods-rule);
}

.ods-chart__tick--base {
	border-top-color: var(--ods-muted);
}

.ods-chart__tick-label {
	position: absolute;
	top: 0;
	right: calc(100% + 0.5rem);
	color: var(--ods-muted);
	font-size: 0.75rem;
	line-height: 1;
	white-space: nowrap;
	transform: translateY(-50%);
}

.ods-chart .ods-chart__marks {
	position: absolute;
	inset: 0;
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ods-chart .ods-chart__mark {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	margin: 0;
	cursor: default;
}

.ods-chart__mark:focus-visible {
	outline: 2px solid var(--ods-teal);
	outline-offset: 2px;
}

.ods-chart__bar {
	position: absolute;
	bottom: 0;
	left: 15%;
	width: 70%;
	height: var(--v);
	border-radius: 1px 1px 0 0;
	background: #D9D9D9;
}

.ods-chart__mark.is-highlight .ods-chart__bar {
	background: var(--ods-teal);
}

.ods-chart__mark.is-active .ods-chart__bar {
	background: #B8B8B8;
}

.ods-chart__mark.is-highlight.is-active .ods-chart__bar {
	background: #0A5A57;
}

.ods-chart__x {
	position: absolute;
	top: calc(100% + 0.45rem);
	left: 50%;
	color: var(--ods-muted);
	font-size: 0.75rem;
	line-height: 1;
	white-space: nowrap;
	transform: translateX(-50%);
}

@media (max-width: 45.99rem) {
	.ods-chart__x--minor {
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
}

/* Line charts: a grey line, with the highlight and the point you are on in teal */
.ods-chart__line {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.ods-chart__line polyline {
	fill: none;
	stroke: #8C8C8C;
	stroke-width: 2;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.ods-chart__dot {
	position: absolute;
	bottom: var(--v);
	left: 50%;
	width: 0.6rem;
	height: 0.6rem;
	border: 2px solid var(--ods-paper);
	border-radius: 50%;
	background: #8C8C8C;
	opacity: 0;
	transform: translate(-50%, 50%);
}

.ods-chart__mark.is-highlight .ods-chart__dot,
.ods-chart__mark.is-active .ods-chart__dot {
	background: var(--ods-teal);
	opacity: 1;
}

/* A handwritten note above the highlighted mark */
.ods-chart__note {
	position: absolute;
	bottom: calc(var(--v) + 0.5rem);
	left: 50%;
	color: var(--ods-teal);
	font-family: var(--ods-hand);
	font-size: 1rem;
	line-height: 1.15;
	white-space: nowrap;
	transform: translateX(-50%);
}

.ods-chart__note--start {
	left: 0;
	transform: none;
}

.ods-chart__note--end {
	right: 0;
	left: auto;
	transform: none;
}

/* Bars lying down: the value is written at the end of each bar */
.ods-chart .ods-chart__rows {
	display: grid;
	gap: 0.55rem;
	margin: 1rem 0 0;
	padding: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	list-style: none;
}

.ods-chart .ods-chart__row {
	display: grid;
	grid-template-columns: minmax(5rem, 35%) minmax(0, 1fr);
	gap: 0.75rem;
	align-items: center;
	margin: 0;
}

.ods-chart__label {
	line-height: 1.25;
}

.ods-chart__track {
	position: relative;
	height: 1.5rem;
	margin-right: 3.75rem; /* Room for the value after the longest bar */
}

.ods-chart__row .ods-chart__bar {
	top: 0;
	bottom: auto;
	left: 0;
	width: var(--v);
	height: 100%;
	border-radius: 0 1px 1px 0;
}

.ods-chart__row.is-highlight .ods-chart__bar {
	background: var(--ods-teal);
}

.ods-chart__value {
	position: absolute;
	top: 50%;
	left: calc(var(--v) + 0.4rem);
	color: var(--ods-ink);
	font-size: 0.8125rem;
	white-space: nowrap;
	transform: translateY(-50%);
}

.ods-chart__row.is-highlight .ods-chart__value {
	color: var(--ods-teal);
	font-weight: 600;
}

/* The value that appears when you point at, tap or move to a mark */
.ods-chart__tip {
	position: absolute;
	z-index: 3;
	padding: 0.3rem 0.55rem;
	border-radius: 2px;
	background: var(--ods-ink);
	color: var(--ods-paper);
	font-family: var(--ods-sans);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
}

.ods-chart__tip[hidden] {
	display: none;
}

/* The last row: the table behind the chart, and the signature every chart
	carries (the address beside the grey ODS mark) */
.ods-chart__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: 0.75rem;
	font-family: var(--ods-sans);
	font-size: 0.75rem;
}

.ods-chart__download {
	color: var(--ods-teal);
	font-weight: 600;
}

/* The signature is built like the logo: the dots first, then the address
	right after the story dot, on its line. The gap is the logo's own (0.32em of
	the name, with the dots 2.25em tall), scaled to these smaller dots. */
.ods-chart__sign {
	display: flex;
	align-items: center;
	gap: 0.17em;
	margin-left: auto;
	color: var(--ods-muted);
}

.ods-chart__sign::before {
	content: "";
	width: 0.9rem;
	height: 0.9rem;
	background: url("../images/watermark.svg") no-repeat center / contain;
}

/* Data box: where the numbers come from, how they were used and how to cite
   the story, in one soft teal box. Datasets first, the method in a fold. */
.ods-databox {
	max-width: var(--ods-measure);
	margin-top: 3rem;
	padding: 1.3rem 1.4rem 1.4rem;
	border-radius: 2px;
	background: rgba(14, 122, 114, 0.06);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

.ods-databox p {
	margin: 0;
}

.ods-databox__heading {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.2;
}

.ods-databox__title {
	margin-top: 0.9rem !important;
}

.ods-databox__title + .ods-databox__sets {
	margin-top: 0.5rem;
}

.ods-databox__sets {
	display: grid;
	gap: 1rem;
	margin: 0.9rem 0 0;
	padding: 0;
	list-style: none;
}

.ods-databox__set + .ods-databox__set {
	padding-top: 1rem;
	border-top: 1px solid rgba(14, 42, 46, 0.12);
}

.ods-databox__set p + p {
	margin-top: 0.25rem;
}

.ods-databox__name {
	font-weight: 600;
}

/* A slightly deeper teal keeps links easy to read on the tinted box */
.ods-databox a {
	color: #0C7069;
}

.ods-databox__publisher {
	display: block;
	color: var(--ods-muted);
	font-weight: 400;
}

.ods-databox__key {
	font-weight: 600;
}

.ods-databox__file {
	margin-top: 0.55rem !important;
}

.ods-databox__file a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	background: var(--ods-paper);
	font-weight: 600;
	text-decoration: none;
}

.ods-databox__file a:hover span {
	text-decoration: underline;
}

.ods-databox__file svg {
	flex: none;
}

/* Coverage and analysis date */
.ods-databox__facts {
	display: grid;
	gap: 0.3rem;
	margin: 1rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(14, 42, 46, 0.12);
}

.ods-databox__facts > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.4rem;
}

.ods-databox__facts dt {
	font-weight: 600;
}

.ods-databox__facts dt::after {
	content: ":";
}

.ods-databox__facts dd {
	margin: 0;
}

/* Data analysis: coverage, analysis date, methodology and limitations, in a fold */
.ods-databox__how {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(14, 42, 46, 0.12);
}

.ods-databox__how summary {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 2rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.ods-databox__how summary::-webkit-details-marker {
	display: none;
}

.ods-databox__how summary::before {
	content: "";
	flex: none;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
}

.ods-databox__how[open] summary::before {
	transform: rotate(45deg) translate(-2px, -2px);
}

.ods-databox__how .ods-databox__facts {
	gap: 0.7rem;
	margin-top: 0.7rem;
	padding-top: 0;
	border-top: 0;
}

/* Inside Data analysis, all four parts look the same: a title, the text below */
.ods-databox__how .ods-databox__facts > div {
	display: block;
}

.ods-databox__how .ods-databox__facts dt::after {
	content: none;
}

.ods-databox__how .ods-databox__facts dd {
	margin-top: 0.25rem;
}

.ods-databox__part .ods-databox__label + p {
	margin-top: 0.25rem;
}

.ods-databox__part {
	margin-top: 0.7rem;
}

.ods-databox__part p + p {
	margin-top: 0.5rem;
}

.ods-databox__label {
	font-weight: 600;
}

/* Cite this story */
.ods-databox__cite {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(14, 42, 46, 0.12);
}

.ods-databox__citation {
	margin-top: 0.25rem !important;
	color: var(--ods-ink);
	overflow-wrap: anywhere;
}

.ods-databox__copy {
	margin-top: 0.6rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	cursor: pointer;
}

.ods-databox__copy:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

.ods-databox__copy[hidden] {
	display: none;
}

@media print {
	.ods-databox__copy {
		display: none;
	}
}

/* Share this story: three plain buttons in a row */
.ods-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 2.5rem;
	font-family: var(--ods-sans);
}

.ods-share__heading {
	margin: 0;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ods-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ods-share__list li[hidden] {
	display: none;
}

.ods-share__button {
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0 1rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: none;
	color: var(--ods-ink);
	font: 500 var(--wp--preset--font-size--small) / 1 var(--ods-sans);
	text-decoration: none;
	cursor: pointer;
}

.ods-share__button:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

.ods-share__button.is-done {
	border-color: var(--ods-teal);
	background: var(--ods-teal);
	color: var(--ods-paper);
}

.ods-share__status {
	flex-basis: 100%;
	min-height: 1.2em;
	margin: -0.25rem 0 0;
	color: var(--ods-teal);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-share__status:empty {
	min-height: 0;
	margin: 0;
}

.ods-share + .ods-article__footer {
	margin-top: 2.5rem;
}

/* A data word in a story linked to its meaning on the Data glossary page: it reads
   as part of the sentence, with a dotted teal underline that turns solid on hover. */
.wp-block-post-content a[href*="/glossary/#term-"] {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-style: dotted;
	text-decoration-color: var(--wp--preset--color--teal, #0E7A72);
	text-decoration-thickness: 2px;
}

.wp-block-post-content a[href*="/glossary/#term-"]:hover {
	color: var(--wp--preset--color--teal, #0E7A72);
	text-decoration-style: solid;
}

/* Data glossary page --------------------------------------------------------
	A row of letters jumps to each letter. Each letter is a section: the letter,
	a way back to the row of letters, then each word with its meaning (side by
	side on wider screens). No story links here: the page stands on its own.
	To add a word, duplicate a word's group in its letter and change the text. */
.ods-az {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-block: 2rem 2.75rem !important;
	padding: 0 !important;
	list-style: none;
	scroll-margin-top: 1.5rem;
}

.ods-az li {
	margin: 0 !important;
}

/* The letters stay at the top of the screen while you read, in one row:
   the letters share the width on a computer, and on a phone the row
   scrolls sideways. Letters and words land just below the row. */
.ods-finder--glossary + .ods-az,
.ods-finder--glossary ~ .ods-az {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 4;
	flex-wrap: nowrap;
	gap: 0.125rem;
	max-width: 48rem;
	margin-block: 0 2.5rem !important;
	padding-block: 0.5rem !important;
	border-bottom: 1px solid var(--ods-rule);
	background: var(--ods-paper);
}

.ods-finder--glossary ~ .ods-az li {
	flex: 1 1 0;
	min-width: 0;
}

.ods-finder--glossary ~ .ods-az a {
	width: 100%;
	height: 2.25rem;
	border-color: transparent;
}

.ods-finder--glossary ~ .ods-az a:hover {
	border-color: var(--ods-teal);
}

.ods-az a.is-off {
	opacity: 0.3;
	pointer-events: none;
}

@media (max-width: 45.99rem) {
	.ods-finder--glossary ~ .ods-az {
		gap: 0.25rem;
		overflow-x: auto;
		scrollbar-width: none;
		overscroll-behavior-x: contain;
	}

	.ods-finder--glossary ~ .ods-az::-webkit-scrollbar {
		display: none;
	}

	.ods-finder--glossary ~ .ods-az li {
		flex: 0 0 auto;
	}

	.ods-finder--glossary ~ .ods-az a {
		width: 2.5rem;
		height: 2.5rem;
		border-color: var(--ods-rule);
	}
}

.ods-glossary-letter[hidden],
.ods-glossary__entry[hidden] {
	display: none !important;
}

.ods-finder--glossary ~ .ods-glossary-letter,
.ods-finder--glossary ~ .ods-glossary-letter .ods-glossary__entry {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 4.5rem);
}

.ods-az a {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--ods-rule);
	border-radius: 0.35rem;
	background: none;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.ods-az a:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

.ods-glossary-letter {
	max-width: 48rem;
	scroll-margin-top: 1rem;
}

.ods-glossary-letter + .ods-glossary-letter {
	margin-top: 3rem !important;
}

.ods-glossary-letter > *,
.ods-glossary__entry > * {
	margin-block: 0 !important;
}

.ods-glossary-letter__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.6rem;
}

.ods-glossary-letter__head > * {
	margin: 0 !important;
}

.ods-glossary-letter__heading {
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1;
}

.ods-glossary-letter__top {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-glossary-letter__top a {
	display: inline-block;
	padding-block: 0.3rem;
	color: var(--ods-muted);
	text-decoration: none;
}

.ods-glossary-letter__top a:hover {
	color: var(--ods-teal);
	text-decoration: underline;
}

/* Each word on the left, its meaning on the right */
.ods-glossary__entry {
	display: grid;
	gap: 0.35rem;
	padding: 1.15rem 0 1.2rem;
	border-top: 1px solid var(--ods-rule);
	scroll-margin-top: 1.5rem;
}

.ods-glossary__entry:last-child {
	border-bottom: 1px solid var(--ods-rule);
}

@media (min-width: 46rem) {
	.ods-glossary__entry {
		grid-template-columns: 13rem minmax(0, 1fr);
		gap: 2rem;
	}
}

/* Arriving from a "See" link: the word it points to is tinted */
.ods-glossary__entry:target {
	background: rgba(14, 122, 114, 0.06);
	box-shadow: -0.75rem 0 0 rgba(14, 122, 114, 0.06), 0.75rem 0 0 rgba(14, 122, 114, 0.06);
}

.ods-glossary__term {
	font-family: var(--ods-serif);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
}

.ods-glossary__meaning {
	max-width: var(--ods-measure, 34rem);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
}

.ods-glossary__meaning a {
	color: var(--ods-teal);
	text-underline-offset: 0.15em;
}

/* Text for screen readers only */
.ods-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* A message only editors see, when a Data chart's table cannot be read */
.ods-chart-message {
	padding: 0.75rem 1rem;
	border-left: 3px solid #b32d2e;
	background: #fcf0f1;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* 8. Author --------------------------------------------------------------- */

.ods-author {
	display: grid;
	gap: 1.75rem;
}

@media (min-width: 46rem) {
	.ods-author {
		grid-template-columns: minmax(0, 15rem) minmax(0, 34rem);
		gap: 3rem;
		align-items: start;
	}
}

.ods-author > *,
.ods-author__text > * {
	margin-block: 0;
}

.ods-author__portrait {
	margin: 0;
}

/* The portrait is round, in black, white and teal */
.ods-author__portrait img {
	display: block;
	width: 100%;
	max-width: 15rem;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

.ods-author__position {
	margin-bottom: 0.3rem !important;
	color: var(--ods-teal);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: 1.4;
}

.ods-author__name {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	letter-spacing: -0.02em;
}

.ods-author__role {
	margin-top: 0.45rem !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.4;
}

.ods-author__place {
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* A grey map pin before "Ontario, Canada", in the colour of the text
	 (decoration only: screen readers skip it) */
.ods-author__place::before {
	content: "";
	display: inline-block;
	width: 0.72em;
	height: 0.96em;
	margin-right: 0.35em;
	vertical-align: -0.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.4 0 0 5.2 0 11.7c0 8.6 10.6 19 11.1 19.5a1.3 1.3 0 0 0 1.8 0C13.4 30.7 24 20.3 24 11.7 24 5.2 18.6 0 12 0zm0 6.9a4.6 4.6 0 1 1 0 9.2 4.6 4.6 0 0 1 0-9.2z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.4 0 0 5.2 0 11.7c0 8.6 10.6 19 11.1 19.5a1.3 1.3 0 0 0 1.8 0C13.4 30.7 24 20.3 24 11.7 24 5.2 18.6 0 12 0zm0 6.9a4.6 4.6 0 1 1 0 9.2 4.6 4.6 0 0 1 0-9.2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.ods-author__bio {
	margin-top: 1rem !important;
}

.ods-author__more {
	margin-top: 1rem !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

/* Under a story: the full biography beside a smaller portrait. On a phone
	 the portrait sits beside the name, and the biography runs full width below. */
.ods-article__footer .ods-author {
	grid-template-columns: 4.5rem minmax(0, 1fr);
	column-gap: 1rem;
	row-gap: 0;
	align-items: center;
	max-width: 42rem;
}

.ods-article__footer .ods-author__portrait img {
	max-width: 4.5rem;
}

@media (max-width: 45.99rem) {
	.ods-article__footer .ods-author__text {
		display: contents;
	}

	.ods-article__footer .ods-author__portrait {
		grid-row: 1 / span 3;
	}

	.ods-article__footer .ods-author__name,
	.ods-article__footer .ods-author__role,
	.ods-article__footer .ods-author__place {
		grid-column: 2;
	}

	.ods-article__footer .ods-author__bio,
	.ods-article__footer .ods-author__more {
		grid-column: 1 / -1;
	}
}

@media (min-width: 46rem) {
	.ods-article__footer .ods-author {
		grid-template-columns: 8.5rem minmax(0, 1fr);
		gap: 2rem;
		align-items: start;
	}

	.ods-article__footer .ods-author__portrait img {
		max-width: 8.5rem;
	}
}

/* The short version (Author (short) part) */
.ods-author--compact {
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 1.1rem;
	align-items: center;
}

.ods-author--compact .ods-author__portrait img {
	max-width: 4.5rem;
}

.ods-author--compact .ods-author__name {
	font-size: var(--wp--preset--font-size--large);
}

.ods-author--compact .ods-author__more {
	margin-top: 0.4rem !important;
}

/* A photo chosen in Users > Profile, cropped into a circle with a thin teal
   ring (the founder's portrait that comes with the theme is already round) */
.ods-author__portrait.is-photo img {
	border: 2px solid var(--ods-teal);
	border-radius: 50%;
	object-fit: cover;
}

/* An author who has not chosen a portrait: the text takes the full width */
.ods-author.ods-author--no-portrait {
	grid-template-columns: minmax(0, 42rem);
}

.ods-author--no-portrait .ods-author__name,
.ods-author--no-portrait .ods-author__role,
.ods-author--no-portrait .ods-author__place,
.ods-author--no-portrait .ods-author__bio,
.ods-author--no-portrait .ods-author__more {
	grid-column: 1 / -1;
}

/* On the About page the note is already at the top, and the link points to itself */
.ods-about-author {
	margin-top: var(--ods-section) !important;
}

.ods-about-author .ods-author__note,
.ods-about-author .ods-author__more {
	display: none;
}

/* 9. Notes and marks ------------------------------------------------------ */

/* Handwritten note: a Paragraph with the "Handwritten note" style.
   On a phone it sits in the text beside a margin bracket.
   On a wide screen, inside a story, it moves into the right margin with a pen arrow. */
p.is-style-handwritten-note {
	max-width: 19rem;
	margin: 1.6rem 0 1.6rem 0.25rem;
	padding: 0.15rem 0 0.15rem 1.3rem;
	background: url("../marks/bracket-1.svg") no-repeat left center / 0.75rem 100%;
	color: var(--ods-teal);
	font-family: var(--ods-hand);
	font-size: 1.15rem;
	line-height: 1.3;
	text-wrap: balance;
}

p.is-style-handwritten-note:nth-of-type(2n) {
	background-image: url("../marks/bracket-2.svg");
	transform: rotate(-2.4deg);
}

.ods-author__note {
	margin: 1.4rem 0 0.4rem 0.25rem !important;
}

@media (min-width: 68rem) {
	.single .ods-prose > p.is-style-handwritten-note {
		position: relative;
		float: right;
		clear: right;
		width: 13.5rem;
		margin: 0.35rem calc(100% - 51.5rem) 1rem 0 !important;
		padding: 0;
		background: none;
	}

	.single .ods-prose > p.is-style-handwritten-note::before {
		content: "";
		position: absolute;
		top: 0.2rem;
		left: -3.9rem;
		width: 3.2rem;
		height: 2.4rem;
		background: url("../marks/arrow-1.svg") no-repeat center / contain;
	}
}

/* Highlighter: select words and choose Highlight in the toolbar.
   Whatever colour is picked, it shows as the teal marker stroke. */
mark,
mark.has-inline-color {
	margin: 0 -0.2em;
	padding: 0.05em 0.2em;
	background: url("../marks/highlight-1.svg") no-repeat center / 100% 92% !important;
	color: inherit !important;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* 10. Email sign-up ------------------------------------------------------- */

.ods-signup-section {
	padding-bottom: var(--ods-section);
}

.ods-signup-section > * {
	margin-block: 0;
}

.ods-signup-section .ods-signup {
	margin-top: 1.75rem;
}

.ods-signup {
	display: grid;
	gap: 0.6rem;
	max-width: var(--ods-measure);
}

.ods-signup > * {
	margin: 0;
}

.ods-signup__title {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.15;
}

.ods-signup__text {
	color: var(--ods-muted);
	font-size: 1.0625rem;
	line-height: 1.5;
}

.ods-signup__rss,
.ods-signup__editor-note {
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-signup__editor-note {
	padding: 0.5rem 0.7rem;
	border: 1px dashed var(--ods-muted);
}

.ods-signup--compact {
	gap: 0.45rem;
}

.ods-signup--compact .ods-signup__title {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.3;
}

.ods-signup--compact .ods-signup__text {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* Jetpack's form, dressed to match */
.ods-signup__form form,
.ods-signup__form .wp-block-jetpack-subscriptions__form-elements {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.ods-signup__form input[type="email"] {
	flex: 1 1 12rem;
	min-width: 0;
	min-height: 2.875rem;
	margin: 0 !important;
	padding: 0.55rem 0.7rem !important;
	border: 1px solid var(--ods-muted) !important;
	border-radius: 2px !important;
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-sans) !important;
	font-size: 1rem !important;
}

.ods-signup__form button,
.ods-signup__form .wp-block-button__link {
	min-height: 2.875rem;
	margin: 0 !important;
	padding: 0.5rem 1.1rem !important;
	border: 1px solid var(--ods-teal) !important;
	border-radius: 2px !important;
	background: var(--ods-teal) !important;
	color: var(--ods-paper) !important;
	font-family: var(--ods-sans) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 500;
}

.ods-signup__form button:hover {
	border-color: var(--ods-ink) !important;
	background: var(--ods-ink) !important;
}

/* 11. Footer -------------------------------------------------------------- */

/* A dark band that closes every page, with the logo in its dark version.
   Phone: the logo and a one-sentence "about us", then the sign-up, then Explore.
   Tablet and computer: the logo above the sign-up on the left, Explore on
   the right. */
/* Footer text, one level per kind (contrast on the dark band in brackets):
   titles teal (7.8:1), links soft white (15:1), descriptions cool grey
   (10:1), and the small print a dimmer grey (6.9:1) */
.ods-footer {
	--f-text: #F4F8F8;
	--f-soft: #C3D0D0;
	--f-muted: #98AEAD;
	--f-line: rgba(255, 255, 255, 0.14);
	--f-accent: #5FC4B8;
	margin-top: var(--ods-section) !important;
	padding-block: 2.75rem 1.5rem;
	background: #0B2427;
	color: var(--f-text);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

.ods-footer > * {
	margin-block: 0;
}

.ods-footer :focus-visible {
	outline-color: var(--f-accent);
}

.ods-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "brand" "worlds" "signup" "nav";
	gap: 2.25rem 1.5rem;
	padding-bottom: 2rem;
}

.ods-footer__grid > *,
.ods-footer__grid > * > * {
	margin-block: 0;
}

.ods-footer__brand { grid-area: brand; }
.ods-footer__nav { grid-area: nav; }
.ods-footer__worlds { grid-area: worlds; }
.ods-footer__signup { grid-area: signup; }

/* Tablet and computer: the logo beside the links, then the worlds beside
   the sign-up */
@media (min-width: 46rem) {
	.ods-footer__grid {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		grid-template-areas: "brand nav" "worlds signup";
		gap: 2.75rem 4rem;
		align-items: start;
	}
}

/* A one-sentence "about us" under the footer logo; the name is a touch brighter */
/* Follow Open Data Stories: LinkedIn and Instagram, in plain icons */
.ods-social .wp-block-social-links {
	gap: 0.6rem 1.1rem;
	margin: 0;
	padding: 0;
}

.ods-social .wp-block-social-links .wp-social-link {
	background: transparent !important;
	color: inherit !important;
}

.ods-social .wp-block-social-links .wp-social-link a {
	padding: 0.2rem;
	color: inherit !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
}

.ods-social .wp-block-social-links .wp-social-link a:hover .wp-block-social-link-label {
	text-decoration: underline;
}

.ods-social .wp-block-social-links .wp-social-link svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
}

.ods-social .wp-block-social-links .wp-social-link .wp-block-social-link-label {
	padding-left: 0.45rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.ods-social__heading {
	margin: 0 0 0.5rem;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

.ods-prose .ods-social,
.wp-block-post-content .ods-social {
	margin-top: 1.5rem;
	color: var(--ods-ink);
}

.ods-social--placeholder {
	padding: 0.6rem 0.8rem;
	border: 1px dashed currentColor;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	opacity: 0.8;
}

.ods-footer .ods-social {
	margin-top: 1.1rem !important;
	color: var(--f-text, #FFFFFF);
}

.ods-footer .ods-social--placeholder {
	color: var(--f-muted);
}

.ods-footer .ods-social--placeholder a {
	color: inherit;
}

.ods-footer__about {
	max-width: 38ch;
	margin: 0.75rem 0 0 !important;
	color: var(--f-soft);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	text-wrap: pretty;
}

.ods-footer__about strong {
	color: var(--f-text);
	font-weight: 400;
}

/* The logo in its dark version: grey dots darker, the story dot and "Stories" lighter */
.ods-footer .ods-logo__link,
.ods-footer .ods-logo__link:hover {
	color: #C5D1D1 !important;
}

.ods-footer .ods-logo__accent {
	color: var(--f-accent);
}

.ods-footer .ods-logo__mark circle {
	fill: #4C6265;
}

.ods-footer .ods-logo__mark circle:nth-child(6) {
	fill: var(--f-accent);
}

.ods-footer a {
	color: var(--f-text);
	text-decoration: none;
}

.ods-footer a:hover {
	color: var(--f-accent);
	text-decoration: underline;
}

.ods-footer-nav .wp-block-navigation__container {
	gap: 0;
}

/* Quick links: two short columns of links, what ODS publishes, then the
   site itself */
.ods-footer__nav > *,
.ods-footer__links > * {
	margin: 0 !important;
}

.ods-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 3rem;
}

/* The footer's titles (Quick links, Pick a world to explore), set like the
   sign-up's title */
.ods-footer .ods-footer__title {
	margin: 0 0 0.75rem !important;
	color: var(--f-text);
	font-family: var(--ods-sans);
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

/* Links tall enough for a thumb (at least 24px); underlined on hover */
.ods-footer-nav .wp-block-navigation-item__content {
	display: inline-block;
	padding-block: 0.3rem;
	color: var(--f-text) !important;
	text-decoration: none;
}

.ods-footer-nav .wp-block-navigation-item__content:hover {
	color: var(--f-accent) !important;
}

/* The sign-up inside the dark footer, with the RSS link in its text */
.ods-footer .ods-signup {
	max-width: 30rem;
}

.ods-footer .ods-signup__rss {
	color: var(--f-muted);
}

.ods-footer .ods-signup__rss a {
	color: var(--f-soft);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.ods-footer .ods-signup__title {
	margin: 0 0 0.4rem !important;
	color: var(--f-text);
	font-family: var(--ods-sans);
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.ods-footer .ods-signup__text {
	color: var(--f-soft);
}

/* A link inside a sentence keeps its underline. "Follow by RSS" is teal,
   like the titles, and turns white on hover. */
.ods-footer .ods-signup__text a {
	color: var(--f-accent);
	text-decoration: underline;
	text-decoration-color: currentColor;
}

.ods-footer .ods-signup__text a:hover {
	color: var(--f-text);
}

.ods-footer .ods-signup__label,
.ods-footer .ods-signup__status {
	color: var(--f-text);
}

/* Pick a world: every story world as a short link, each with a dot like
   the logo's. Two columns on phones and tablets, five on computers (ten
   worlds make two rows). Today's world has the teal dot; any dot turns
   teal on hover. */
.ods-world-links > * {
	margin: 0;
}

.ods-world-links__title {
	margin: 0 0 0.75rem !important;
	font-family: var(--ods-sans);
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.ods-world-links__list {
	display: grid;
	grid-template-columns: repeat(2, max-content);
	gap: 0.15rem 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 64rem) {
	.ods-world-links__list {
		grid-template-columns: repeat(5, max-content);
		gap: 0.15rem 2.25rem;
	}
}

/* Tall enough for a thumb (at least 24px) */
.ods-world-links__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding-block: 0.3rem;
	text-decoration: none;
}

.ods-world-links__link::before {
	content: "";
	flex: none;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #C4C4C4;
}

.ods-world-links__link:hover::before,
.ods-world-links__link:focus-visible::before,
.ods-world-links__link.is-today::before {
	background: var(--ods-teal);
}

/* On a world's own page, its name is underlined */
.ods-world-links__link[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--ods-teal);
	text-underline-offset: 0.2em;
}

/* Today's world, under the list: its name, then its newest headline */
.ods-world-links__today {
	max-width: 36rem;
	margin-top: 1.1rem !important;
}

.ods-world-links__day > * {
	margin: 0;
}

.ods-world-links__day-title {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.5;
}

.ods-world-links__day-text {
	margin-top: 0.2rem !important;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	text-wrap: pretty;
}

.ods-world-links__day a {
	text-decoration: underline;
	text-decoration-color: var(--ods-teal);
	text-underline-offset: 0.15em;
}

.ods-footer .ods-world-links__title {
	color: var(--f-text);
}

.ods-footer .ods-world-links__link::before {
	background: #4C6265;
}

.ods-footer .ods-world-links__link:hover::before,
.ods-footer .ods-world-links__link:focus-visible::before,
.ods-footer .ods-world-links__link.is-today::before {
	background: var(--f-accent);
}

.ods-footer .ods-world-links__link[aria-current="page"],
.ods-footer .ods-world-links__day a {
	text-decoration: underline;
	text-decoration-color: var(--f-accent);
}

.ods-footer .ods-world-links__day-title {
	color: var(--f-text);
}

.ods-footer .ods-world-links__day-text {
	color: var(--f-soft);
}

.ods-footer .ods-signup input[type="email"] {
	border-color: #4C6265;
	background: #12333A;
	color: #FFFFFF;
}

.ods-footer .ods-signup input[type="email"]:focus-visible {
	border-color: var(--f-accent);
}

.ods-footer .ods-signup button,
.ods-footer .ods-signup .wp-element-button {
	border-color: var(--f-accent);
	background: var(--f-accent);
	color: #0B2427;
}

.ods-footer .ods-signup button:hover,
.ods-footer .ods-signup .wp-element-button:hover {
	border-color: #A9EDE2;
	background: #A9EDE2;
	color: #0B2427;
}

/* The bottom line: copyright and the site's small print on the left, back
   to top on the right. On a phone they wrap onto as many lines as needed. */
.ods-footer__bottom {
	align-items: center;
	gap: 0.5rem 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--f-line);
	color: var(--f-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-footer__bottom > * {
	margin: 0;
}

.ods-footer__bottom a {
	display: inline-block;
	padding-block: 0.25rem;
	color: var(--f-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-copyright {
	margin: 0;
	color: var(--f-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-footer__fine {
	gap: 0.25rem 1.5rem;
}

.ods-footer__fine > * {
	margin: 0 !important;
}

/* Site policies: a small row of links, named "Site policies" for screen
   readers */
.ods-footer__legal,
.ods-footer__legal .wp-block-navigation__container {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
	margin: 0;
	padding: 0 !important;
	list-style: none;
}

.ods-footer__legal li {
	margin: 0;
}

.ods-footer__bottom .ods-footer__legal .wp-block-navigation-item__content {
	display: inline-block;
	padding-block: 0.25rem;
	color: var(--f-muted) !important;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: inherit;
}

.ods-footer__bottom .ods-footer__legal .wp-block-navigation-item__content:hover {
	color: var(--f-accent) !important;
}

/* 12. Small things -------------------------------------------------------- */

.wp-block-search__input {
	min-height: 2.875rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	font-family: var(--ods-sans);
	font-size: 1rem;
}

.wp-block-search__label {
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.ods-search {
	max-width: 32rem;
	margin: 0 0 1.75rem !important;
}

.wp-block-image figcaption,
.wp-block-embed figcaption {
	margin-top: 0.6rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	a,
	.wp-block-button__link {
		transition: color 120ms ease, border-color 120ms ease;
	}

	.ods-world__link {
		transition: box-shadow 120ms ease;
	}
}

@media print {
	.ods-header .wp-block-navigation,
	.ods-signup,
	.wp-block-search {
		display: none;
	}
}

/* 13. Homepage lists ---------------------------------------------------- */

.ods-section-head .ods-section-link {
	margin-left: auto;
}

/* "Explore the different worlds": a light line under the title, as under "Latest stories" */
.ods-worlds-section > .ods-section-head {
	margin-bottom: 1.6rem !important;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ods-rule);
}

/* 14. The three series: Stories, Roundup and Spotlight ------------------ */

/* Series label: the teal dot from the logo, then the series name */
.ods-kicker .ods-series-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-right: 0.9rem;
	color: var(--ods-ink);
	font-weight: 600;
}

.ods-kicker .ods-series-tag::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--ods-teal);
}

/* Each homepage section: title, a light line, then one line on what it holds */
.ods-series-section > .ods-section-head,
.ods-worlds-section > .ods-section-head {
	margin-bottom: 1.6rem !important;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ods-rule);
}

/* Featured images: the same shape on every card; the logo's dots when a
   post has none */
.ods-card__visual,
.ods-roundup-card__visual {
	overflow: hidden;
	border-radius: 3px;
	background: #EAF1F1;
}

.ods-card__visual img,
.ods-roundup-card__visual img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.ods-photo-placeholder a {
	display: block;
	aspect-ratio: 3 / 2;
}

.ods-photo-placeholder svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Cards with a picture have no line on top: the picture starts the card */
.ods-card:has(> .ods-card__visual) {
	padding-top: 0;
	border-top: 0;
}

/* Homepage rows (latest stories, latest spotlights): three across on a
   computer, two on a tablet, so cards keep the same size however many there are */
.ods-card-row .wp-block-post-template.ods-cards.is-layout-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2.5rem 2rem;
}

@media (min-width: 56rem) {
	.ods-card-row .wp-block-post-template.ods-cards.is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Phones: a small square picture beside the title, one card under another */
@media (max-width: 45.99rem) {
	.wp-block-post-template.ods-cards.is-layout-grid,
	.ods-card-row .wp-block-post-template.ods-cards.is-layout-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.ods-cards > .wp-block-post {
		padding-block: 1.15rem;
		border-top: 1px solid var(--ods-rule);
	}

	.ods-cards > .wp-block-post:last-child {
		border-bottom: 1px solid var(--ods-rule);
	}

	/* On the homepage the section title's line already sits above the
	   first card, so the card doesn't draw a second one */
	.ods-main > .ods-series-section .ods-cards > .wp-block-post:first-child {
		padding-top: 0;
		border-top: 0;
	}

	.ods-card:has(> .ods-card__visual) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 6.5rem;
		column-gap: 1rem;
		align-items: start;
	}

	.ods-card:has(> .ods-card__visual) > * {
		grid-column: 1;
	}

	.ods-card > .ods-card__visual {
		grid-column: 2;
		grid-row: 1 / span 4;
		margin: 0 !important;
	}

	.ods-card > .ods-card__visual img,
	.ods-card > .ods-card__visual.ods-photo-placeholder a {
		aspect-ratio: 1;
	}

	.ods-card__summary {
		font-size: 1rem;
	}
}

/* Homepage: the latest roundup, its picture beside it */
.ods-roundup-latest .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ods-roundup-card {
	display: grid;
	gap: 1.25rem;
}

.ods-roundup-card > *,
.ods-roundup-card__text > * {
	margin-block: 0;
}

.ods-roundup-card__visual {
	margin: 0 !important;
}

.ods-roundup-card__title {
	margin-top: 0.5rem !important;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	line-height: 1.12;
	letter-spacing: -0.025em;
}

.ods-roundup-card__title a {
	color: inherit;
	text-decoration: none;
}

.ods-roundup-card__title a:hover {
	color: var(--ods-teal);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

.ods-roundup-card .ods-meta {
	margin-top: 0.9rem !important;
}

.ods-roundup-card__more {
	display: inline-block;
	margin-top: 1rem !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

@media (min-width: 56rem) {
	.ods-roundup-card {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 3.5rem;
		align-items: center;
	}
}

/* Roundup and Spotlight pages */
.ods-series-actions {
	margin-top: 1.25rem !important;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

.ods-spotlight-group + .ods-spotlight-group {
	margin-top: var(--ods-section);
}

.ods-spotlight-group__title {
	margin: 1.5rem 0 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--ods-rule);
}

.ods-spotlight-group__title a {
	color: inherit;
	text-decoration: none;
}

.ods-spotlight-group__title a:hover {
	color: var(--ods-teal);
	text-decoration: underline;
}

.ods-series-empty {
	margin-top: 1.75rem;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* The open data map: one teal for every country with a portal, a title
   and the instruction above it, no handwritten note */
.ods-data-map {
	--portal: #55A49B;
}

.ods-data-map__mark {
	--shade: var(--portal);
}

.ods-data-map__swatch--portal {
	background: var(--portal);
}

.ods-data-map__title {
	margin: 0 0 0.6rem;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.3;
}

.ods-data-map__hint {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.8125rem;
	font-weight: 500;
}

.ods-data-map__source a {
	color: var(--ods-teal);
}

/* On phones the map is small, so the list is offered as a clear button */
@media (max-width: 45.99rem) {
	.ods-data-map__source .ods-data-map__list-link {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 2.75rem;
		margin-top: 0.75rem;
		padding: 0.55rem 1rem;
		border: 1px solid var(--ods-teal);
		border-radius: 3px;
		font-size: var(--wp--preset--font-size--small);
		font-weight: 600;
		text-decoration: none;
	}

	.ods-data-map__source .ods-data-map__list-link:hover {
		background: rgba(14, 122, 114, 0.06);
	}
}

/* Open data portals: the list behind the map */
/* Two columns now, so the list keeps a comfortable reading width */
.ods-portal-table {
	width: 100%;
	max-width: 44rem;
	border-collapse: collapse;
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

.ods-portal-table th {
	padding: 0 1rem 0.6rem 0;
	border-bottom: 1px solid var(--ods-ink);
	color: var(--ods-muted);
	font-size: 0.75rem;
	font-weight: 500;
	text-align: left;
}

.ods-portal-table td {
	padding: 0.6rem 1rem 0.6rem 0;
	border-bottom: 1px solid var(--ods-rule);
	vertical-align: top;
}

.ods-portal-table td:first-child {
	color: var(--ods-ink);
	font-weight: 500;
}

/* When the list was last checked, under the list */
.ods-portal-list__checked {
	margin: 1.25rem 0 0 !important;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-portal-table tr[hidden] {
	display: none !important;
}

/* Phones: one short row per country, its name beside its portal */
@media (max-width: 37.5rem) {
	.ods-portal-table thead {
		display: none;
	}

	.ods-portal-table tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
		column-gap: 1rem;
		padding-block: 0.65rem;
		border-bottom: 1px solid var(--ods-rule);
	}

	.ods-portal-table td {
		padding: 0;
		border: 0;
	}
}

/* "Find a country" and "Find a word": a labelled box, then a line that says
   how many match. Shown only once the page's script runs. */
.ods-finder {
	max-width: 26rem;
	margin: 0 0 1.5rem !important;
}

.ods-finder[hidden],
.ods-finder__empty[hidden] {
	display: none;
}

.ods-finder__label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.ods-finder__input {
	width: 100%;
	min-height: 2.875rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--ods-muted);
	border-radius: 2px;
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: 1rem;
}

.ods-finder__input:focus-visible {
	outline: 2px solid var(--ods-teal);
	outline-offset: 1px;
}

.ods-finder__status {
	min-height: 1.2em;
	margin: 0.4rem 0 0 !important;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.ods-finder--glossary {
	margin-top: 2rem !important;
}

.ods-finder__empty {
	margin: 1rem 0 !important;
	color: var(--ods-muted);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
}

/* Related stories under a post: the same cards, built by the block itself */
a.ods-photo-placeholder {
	display: block;
	aspect-ratio: 3 / 2;
}

a.ods-photo-placeholder svg {
	display: block;
	width: 100%;
	height: 100%;
}

@media (max-width: 45.99rem) {
	ul.ods-cards {
		gap: 0;
	}

	ul.ods-cards > .ods-card {
		padding-block: 1.15rem;
		border-top: 1px solid var(--ods-rule);
	}

	ul.ods-cards > .ods-card:last-child {
		border-bottom: 1px solid var(--ods-rule);
	}

	.ods-card > a.ods-photo-placeholder {
		aspect-ratio: 1;
	}
}

/* Card pictures keep their shape, even before an image loads or if it fails */
.ods-card__visual,
.ods-roundup-card__visual {
	aspect-ratio: 3 / 2;
}

.ods-card__visual a,
.ods-roundup-card__visual a,
.ods-photo-placeholder a {
	display: block;
	height: 100%;
}

.ods-card__visual img,
.ods-roundup-card__visual img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

@media (max-width: 45.99rem) {
	.ods-card > .ods-card__visual {
		aspect-ratio: 1;
	}
}

/* World cards: the name, then what the world covers (no counts) */
.ods-world__link {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "name" "desc";
}

/* On a world's page, its own card in "All worlds" has a teal edge */
.ods-world.is-current .ods-world__link {
	box-shadow: inset 0 0 0 2px var(--ods-teal);
}

/* On the homepage, the count sits on the name's line, at the right */
@media (min-width: 46rem) {
	.ods-worlds--counts .ods-world__link {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "name amount" "desc desc";
	}
}

/* Spotlight page: "World by world", then "Resources" (People, Tools...) */
.ods-spotlight-part + .ods-spotlight-part {
	margin-top: var(--ods-section);
}

.ods-spotlight-part__title {
	margin: 1.5rem 0 1.6rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ods-rule);
}

/* A resource's kind (People, Tools...) in place of a world */
.ods-kicker .ods-kicker__kind {
	color: var(--ods-teal);
}

/* Spotlight page: buttons that show one kind of resource at a time */
.ods-kind-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
}

.ods-kind-filter[hidden],
.ods-cards > .wp-block-post[hidden] {
	display: none;
}

.ods-kind-filter button {
	min-height: 2.5rem;
	padding: 0.35rem 0.95rem;
	border: 1px solid var(--ods-rule);
	border-radius: 999px;
	background: #fff;
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
}

.ods-kind-filter button:hover {
	border-color: var(--ods-teal);
	color: var(--ods-teal);
}

.ods-kind-filter button[aria-pressed="true"] {
	border-color: var(--ods-teal);
	background: var(--ods-teal);
	color: #fff;
}

.ods-kind-filter button:focus-visible {
	outline: 2px solid var(--ods-teal);
	outline-offset: 2px;
}

/* 15. Reading aids: search in the header, Updated date, section links, Back to top */

/* Search in the header: a magnifying glass that opens a search field */
.ods-header__tools {
	gap: 0.5rem 1.25rem;
}

.ods-header-search {
	position: relative;
	margin: 0;
}

.ods-header-search .wp-block-search__inside-wrapper {
	border: 0 !important;
	padding: 0 !important;
}

.ods-header-search .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid transparent;
	border-radius: 2px;
	background: none !important;
	color: var(--ods-ink) !important;
	cursor: pointer;
}

.ods-header-search .wp-block-search__button svg {
	width: 1.35rem;
	height: 1.35rem;
	fill: currentColor;
}

.ods-header-search .wp-block-search__button:hover {
	color: var(--ods-teal) !important;
}

/* Open: the field slides out to the left of the button, over the menu */
.ods-header-search .wp-block-search__input {
	position: absolute;
	top: 0;
	right: calc(100% + 0.35rem);
	z-index: 5;
	width: min(19rem, calc(100vw - 6.5rem));
	height: 2.4rem;
	margin: 0;
	padding: 0 0.8rem;
	border: 1px solid var(--ods-ink);
	border-radius: 2px;
	background: var(--ods-paper);
	color: var(--ods-ink);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	box-shadow: 0 0 0 0.5rem var(--ods-paper);
}

.ods-header-search.wp-block-search__searchfield-hidden .wp-block-search__input {
	width: 0;
	padding: 0;
	border-width: 0;
	box-shadow: none;
	pointer-events: none;
}

/* Phones and small tablets: no room beside the logo and the Menu button, so
   search is at the bottom of the menu instead */
@media (max-width: 49.99rem) {
	.ods-header-search {
		display: none !important;
	}
}

.ods-nav .ods-menu-search {
	display: none;
}

.ods-nav .is-menu-open .ods-menu-search {
	display: block;
	width: 100%;
	max-width: 24rem;
	margin-top: 1.5rem;
}

.ods-menu-search .wp-block-search__inside-wrapper {
	gap: 0.4rem;
}

.ods-menu-search .wp-block-search__input {
	min-height: 2.75rem;
	padding: 0 0.8rem;
	border: 1px solid var(--ods-ink);
	border-radius: 2px;
	background: var(--ods-paper);
	font-family: var(--ods-sans);
	font-size: 1rem;
}

.ods-menu-search .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ods-ink);
	border-radius: 2px;
	background: var(--ods-ink);
	color: var(--ods-paper);
}

.ods-menu-search .wp-block-search__button svg {
	width: 1.35rem;
	height: 1.35rem;
	fill: currentColor;
}

.ods-menu-search .wp-block-search__button:hover {
	border-color: var(--ods-teal);
	background: var(--ods-teal);
}

/* Updated date beside the publication date */
.ods-updated__label {
	font-weight: 500;
}

/* Section links: a small link icon after each section title */
.ods-anchor {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	margin-left: 0.4rem;
	vertical-align: middle;
	color: var(--ods-muted) !important;
	text-decoration: none !important;
	opacity: 0;
}

.ods-anchor svg {
	width: 1rem;
	height: 1rem;
}

.ods-anchor:hover,
.ods-anchor:focus-visible {
	color: var(--ods-teal) !important;
}

:is(h2, h3):hover > .ods-anchor,
.ods-anchor:focus-visible {
	opacity: 1;
}

/* Touch screens have no pointing, so the icon stays in view, softly */
@media (hover: none) {
	.ods-anchor {
		opacity: 0.55;
	}
}

/* "Link copied" */
.ods-toast {
	position: fixed;
	bottom: 1.25rem;
	left: 50%;
	z-index: 60;
	padding: 0.55rem 1rem;
	border-radius: 2px;
	background: var(--ods-ink);
	color: var(--ods-paper);
	font-family: var(--ods-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%);
}

.ods-toast.is-shown {
	opacity: 1;
}

/* Back to top on phones */
.ods-to-top {
	position: fixed;
	right: 1rem;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.9rem;
	height: 2.9rem;
	border: 1px solid var(--ods-ink);
	border-radius: 50%;
	background: var(--ods-paper);
	color: var(--ods-ink) !important;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(14, 42, 46, 0.18);
}

.ods-to-top[hidden] {
	display: none;
}

.ods-to-top:hover,
.ods-to-top:focus-visible {
	border-color: var(--ods-teal);
	color: var(--ods-teal) !important;
}

@media (min-width: 50rem) {
	.ods-to-top {
		display: none !important;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ods-anchor,
	.ods-toast {
		transition: opacity 150ms ease;
	}
}

@media print {
	.ods-anchor,
	.ods-to-top,
	.ods-toast,
	.ods-social {
		display: none !important;
	}
}

/* A numbered list of principles: each title on its own line, a little space between */
.ods-principles > li + li {
	margin-top: 0.9rem;
}

.ods-principles > li > strong:first-child {
	font-family: var(--ods-sans);
	font-weight: 600;
}

/* Text for screen readers only, such as the label of the sign-up's email box */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
}
