/**
 * M7 Dataviewer — front-end styles.
 * Colours come from the CSS variables printed in wp_head so they follow the plugin settings.
 */

.m7dv {
	--m7dv-accent-fallback: #12A3B5;
	--m7dv-heading-fallback: #2B2666;
	--m7dv-border: #E4E4EC;
	--m7dv-muted: #6B6B85;
	--m7dv-surface: #FFFFFF;
	--m7dv-surface-alt: #FAF9F7;

	margin: 0 0 2.5em;
	padding: 24px 24px 20px;
	background: var(--m7dv-surface);
	border: 1px solid var(--m7dv-border);
	border-radius: 14px;
	font-family: var(--m7dv-font, inherit);
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
	box-sizing: border-box;
}

.m7dv *,
.m7dv *::before,
.m7dv *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ header */

.m7dv__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 20px;
	/* Breathing room between the switchers and whatever they switch. */
	margin-bottom: 28px;
}

.m7dv__heading { flex: 1 1 260px; min-width: 0; }

/* Title centred above the chart: the heading takes the whole width and the
   switchers sit centred underneath it. */
.m7dv--title-center .m7dv__header { justify-content: center; }
.m7dv--title-center .m7dv__heading { flex: 1 1 100%; text-align: center; }
.m7dv--title-center .m7dv__controls { flex: 1 1 100%; justify-content: center; }

#top .m7dv--title-center .m7dv__title,
.m7dv--title-center .m7dv__title { text-align: center; }

#top .m7dv .m7dv__title,
.m7dv__title {
	margin: 0;
	padding: 0;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
}

.m7dv__subtitle {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--m7dv-muted);
}

.m7dv__controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* ----------------------------------------------------------- series picker */

.m7dv__picker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.m7dv__picker-label {
	color: var(--m7dv-muted);
	font-size: var(--m7dv-ui-size, 15px);
	font-weight: 600;
}

#top .m7dv .m7dv__picker-select,
.m7dv__picker-select {
	max-width: 240px;
	height: auto;
	margin: 0;
	padding: 9px 34px 9px 16px;
	border: 1px solid var(--m7dv-border);
	border-radius: 999px;
	background-color: var(--m7dv-surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5' stroke='%236B6B85' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 15px 15px;
	box-shadow: none;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
	font-family: inherit;
	font-size: var(--m7dv-ui-size, 15px);
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

#top .m7dv .m7dv__picker-select:focus,
.m7dv__picker-select:focus { color: var(--m7dv-heading, var(--m7dv-heading-fallback)); }

.m7dv__picker-select:focus-visible {
	outline: 2px solid var(--m7dv-accent, var(--m7dv-accent-fallback));
	outline-offset: 2px;
}

/* A column the series picker has taken out of the table. */
#top .m7dv .m7dv-is-hidden,
.m7dv-is-hidden { display: none !important; }

/* -------------------------------------------------------------------- tabs */

.m7dv__tabs {
	display: inline-flex;
	padding: 3px;
	background: var(--m7dv-surface-alt);
	border: 1px solid var(--m7dv-border);
	border-radius: 999px;
}

.m7dv__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 9px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--m7dv-muted);
	font-family: inherit;
	font-size: var(--m7dv-ui-size, 15px);
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
}

.m7dv__tab:hover { color: var(--m7dv-accent, var(--m7dv-accent-fallback)); background: rgba(18,163,181,.08); }
.m7dv__tab:focus-visible { outline: 2px solid var(--m7dv-accent, var(--m7dv-accent-fallback)); outline-offset: 2px; }

.m7dv__tab.is-active {
	background: var(--m7dv-accent, var(--m7dv-accent-fallback));
	color: #fff;
}

.m7dv__tab svg { flex: none; }

/* --------------------------------------------------------------- csv button */

.m7dv__csv,
.m7dv-csv-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 1px solid var(--m7dv-accent, var(--m7dv-accent-fallback));
	border-radius: 999px;
	background: transparent;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback)) !important;
	font-size: var(--m7dv-ui-size, 15px);
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	transition: background-color .18s ease, color .18s ease;
}

.m7dv__csv:hover,
.m7dv-csv-link:hover {
	background: var(--m7dv-accent, var(--m7dv-accent-fallback));
	color: #fff !important;
}

.m7dv__csv:focus-visible { outline: 2px solid var(--m7dv-accent, var(--m7dv-accent-fallback)); outline-offset: 2px; }

/* ------------------------------------------------------------------ panels */

.m7dv__panel { display: none; }
.m7dv__panel.is-active { display: block; }

/* Before the script runs (or without JavaScript) show the table, not an empty canvas. */
.m7dv:not(.m7dv--ready) .m7dv__panel--table { display: block; }
.m7dv:not(.m7dv--ready) .m7dv__panel--chart,
.m7dv:not(.m7dv--ready) .m7dv__tabs { display: none; }

/* Chart-only mode keeps the table in the page for screen readers. */
.m7dv--ready .m7dv__panel--sr {
	display: block;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.m7dv__canvas-wrap {
	position: relative;
	width: 100%;
	min-height: 200px;
}

/* No fixed height entered: the chart takes its height from the width of the
   container it sits in, so it always fits whatever column it is dropped into.
   A container that already has a height of its own is handled by .m7dv--fill. */
.m7dv__canvas-wrap--auto {
	height: auto;
	/* 3:1 is 16:9 at about 60% of the height. A narrow screen would take that
	   below usefulness, so the chart never goes under 240px. */
	min-height: 240px;
	aspect-ratio: 3 / 1;
}

@supports not (aspect-ratio: 3 / 1) {
	.m7dv__canvas-wrap--auto { height: 250px; }
}

/* Add class="m7dv--fill" to the shortcode when the surrounding container has a
   fixed height (an Enfold equal-height cell, for example). */
.m7dv--fill {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.m7dv--fill .m7dv__panel--chart {
	flex: 1 1 auto;
	min-height: 0;
}

.m7dv--fill .m7dv__canvas-wrap--auto {
	height: 100%;
	min-height: 160px;
	aspect-ratio: auto;
}

/* class="m7dv--tall" on the shortcode restores the taller chart. */
.m7dv--tall .m7dv__canvas-wrap--auto { aspect-ratio: 16 / 9; }

@supports not (aspect-ratio: 16 / 9) {
	.m7dv--tall .m7dv__canvas-wrap--auto { height: 420px; }
}

.m7dv__canvas { display: block; width: 100% !important; }

/* ------------------------------------------------------------------- table */

.m7dv-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--m7dv-border);
	border-radius: 10px;
}

.m7dv-table-wrap:focus-visible { outline: 2px solid var(--m7dv-accent, var(--m7dv-accent-fallback)); outline-offset: 2px; }

#top .m7dv .m7dv-table,
.m7dv-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: var(--m7dv-table-size, 16px);
	background: var(--m7dv-row, #ffffff);
}

#top .m7dv .m7dv-table th,
#top .m7dv .m7dv-table td,
.m7dv-table th,
.m7dv-table td {
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid var(--m7dv-border);
	text-align: right;
	white-space: nowrap;
	line-height: 1.45;
	font-size: var(--m7dv-table-size, 16px);
}

/* Header row. Themes style bare th elements from several places (Enfold does
   it in base.css and again in its generated colour-set CSS), so the three
   table colours are marked important: they are the plugin's own setting and
   nothing else should get to repaint these cells. */
#top .m7dv .m7dv-table thead th,
#top .m7dv .m7dv-table thead tr th,
.m7dv-table thead th,
.m7dv-table thead tr th {
	background: var(--m7dv-thead, #EDEFF4) !important;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
	font-weight: 700;
	font-size: var(--m7dv-table-head-size, 15px);
	letter-spacing: .01em;
	white-space: nowrap;
}

/* Row labels stay put while the table scrolls sideways. */
#top .m7dv .m7dv-table th:first-child,
#top .m7dv .m7dv-table td:first-child,
.m7dv-table th:first-child,
.m7dv-table td:first-child {
	text-align: left;
	font-weight: 600;
	position: sticky;
	left: 0;
	z-index: 1;
	box-shadow: 1px 0 0 var(--m7dv-border);
}

/* The label column is a header column, so it carries the header colour too. */
#top .m7dv .m7dv-table tbody th,
#top .m7dv .m7dv-table tbody tr th,
.m7dv-table tbody th,
.m7dv-table tbody tr th {
	background: var(--m7dv-thead, #EDEFF4) !important;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
}

/* Data cells alternate: odd rows, then the lighter tone. */
#top .m7dv .m7dv-table tbody tr:nth-child(odd) td,
.m7dv-table tbody tr:nth-child(odd) td {
	background: var(--m7dv-row, #ffffff) !important;
}

#top .m7dv .m7dv-table tbody tr:nth-child(even) td,
.m7dv-table tbody tr:nth-child(even) td {
	background: var(--m7dv-row-alt, #F5F6F9) !important;
}

#top .m7dv .m7dv-table tbody tr:hover td,
.m7dv-table tbody tr:hover td {
	background: var(--m7dv-row-hover, rgba(18,163,181,.09)) !important;
}

.m7dv-table tbody tr:last-child th,
.m7dv-table tbody tr:last-child td { border-bottom: 0; }

.m7dv-table__swatch {
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-right: 8px;
	border-radius: 2px;
	vertical-align: baseline;
}

/* ----------------------------------------------------------------- caption */

.m7dv__caption {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--m7dv-border);
	text-align: left;
}

.m7dv__description {
	font-size: 15px;
	line-height: 1.65;
	color: #3c3c50;
}

#top .m7dv .m7dv__updated,
.m7dv__updated {
	margin: 4px 0 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--m7dv-muted);
	font-style: italic;
}

.m7dv__source-label {
	font-style: normal;
	font-weight: 700;
}

.m7dv__description > *:first-child { margin-top: 0; }
.m7dv__description > *:last-child { margin-bottom: 0; }

.m7dv__source {
	margin: 12px 0 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--m7dv-muted);
	font-style: italic;
}

.m7dv-notice {
	padding: 12px 16px;
	border-left: 3px solid #d63638;
	background: #fcf0f1;
	color: #8a1f21;
	font-size: 14px;
}

.m7dv-list > .m7dv { margin-bottom: 32px; }

/* ------------------------------------------------------------------ mobile */

@media only screen and (max-width: 767px) {
	.m7dv { padding: 18px 14px 16px; border-radius: 10px; }
	.m7dv__canvas-wrap--auto { aspect-ratio: 20 / 9; }
	.m7dv__header { gap: 12px; }
	.m7dv__controls { width: 100%; justify-content: space-between; }
	#top .m7dv .m7dv__title,
	.m7dv__title { font-size: 18px; }
	#top .m7dv .m7dv-table th,
	#top .m7dv .m7dv-table td,
	.m7dv-table th,
	.m7dv-table td { padding: 11px 13px; font-size: var(--m7dv-table-size-mobile, 15px); }
	#top .m7dv .m7dv-table thead th,
	.m7dv-table thead th { font-size: var(--m7dv-table-size-mobile, 15px); }
	.m7dv__tab,
	.m7dv__csv { font-size: 14px; padding: 8px 15px; }
}

@media print {
	.m7dv__tabs,
	.m7dv__csv { display: none !important; }
	.m7dv__panel { display: block !important; }
}

/* ============================================================== title list */

.m7dv-title-list {
	--m7dv-accent-fallback: #12A3B5;
	--m7dv-heading-fallback: #2B2666;
	--m7dv-border: #E4E4EC;

	display: grid;
	grid-template-columns: repeat(var(--m7dv-title-cols, 1), minmax(0, 1fr));
	gap: 0 16px;
	margin: 0 0 2.5em;
	padding: 0;
	list-style: none;
	font-family: var(--m7dv-font, inherit);
}

.m7dv-title-list--cols-2 { --m7dv-title-cols: 2; }
.m7dv-title-list--cols-3 { --m7dv-title-cols: 3; }

#top .m7dv-title-list .m7dv-title-list__item,
.m7dv-title-list__item {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

#top .m7dv-title-list .m7dv-title-list__link,
.m7dv-title-list__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 10px;
	background: var(--m7dv-soft, #F4F5F8);
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
	font-size: var(--m7dv-ui-size, 15px);
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease;
}

.m7dv-title-list__text { flex: 1 1 auto; min-width: 0; }

.m7dv-type-icon {
	flex: none;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback));
}

#top .m7dv-title-list .m7dv-title-list__link:hover,
.m7dv-title-list__link:hover {
	background: #EBEDF2;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback));
	text-decoration: none;
}

.m7dv-title-list__link:focus-visible {
	outline: 2px solid var(--m7dv-accent, var(--m7dv-accent-fallback));
	outline-offset: 2px;
}

.m7dv-title-list__arrow {
	flex: none;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback));
	opacity: .5;
	transition: opacity .18s ease, transform .18s ease;
}

.m7dv-title-list__link:hover .m7dv-title-list__arrow {
	opacity: 1;
	transform: translateX(3px);
}

/* ================================================================ card grid */

.m7dv-grid-list {
	--m7dv-accent-fallback: #12A3B5;
	--m7dv-heading-fallback: #2B2666;
	--m7dv-border: #E4E4EC;
	--m7dv-muted: #6B6B85;

	display: grid;
	grid-template-columns: repeat(var(--m7dv-cols, 3), minmax(0, 1fr));
	gap: 28px;
	margin: 0 0 2.5em;
	font-family: var(--m7dv-font, inherit);
}

.m7dv-grid-list--cols-1 { --m7dv-cols: 1; }
.m7dv-grid-list--cols-2 { --m7dv-cols: 2; }
.m7dv-grid-list--cols-3 { --m7dv-cols: 3; }
.m7dv-grid-list--cols-4 { --m7dv-cols: 4; }
.m7dv-grid-list--cols-5 { --m7dv-cols: 5; }
.m7dv-grid-list--cols-6 { --m7dv-cols: 6; }

.m7dv-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--m7dv-border);
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.m7dv-card:hover {
	box-shadow: 0 10px 28px rgba(43,38,102,.13);
	transform: translateY(-2px);
}

.m7dv-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #F1F1F5;
	overflow: hidden;
}

.m7dv-card__media a { display: block; height: 100%; }

#top .m7dv-card__media img,
.m7dv-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
	transition: transform .35s ease;
}

.m7dv-card:hover .m7dv-card__media img { transform: scale(1.04); }

/* Without aspect-ratio the media box would have no height of its own and the
   image inside it would collapse to nothing. */
@supports not (aspect-ratio: 16 / 10) {
	.m7dv-card__media {
		height: 0;
		padding-bottom: 62.5%;
	}

	.m7dv-card__media a,
	.m7dv-card__media img,
	.m7dv-card__placeholder {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
}

.m7dv-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #C7C7D4;
}

.m7dv-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 8px;
	padding: 20px;
	background: var(--m7dv-soft, #F4F5F8);
}

#top .m7dv-card .m7dv-card__title,
.m7dv-card__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 700;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
}

#top .m7dv-card__title a,
.m7dv-card__title a {
	color: inherit !important;
	text-decoration: none !important;
}

#top .m7dv-card__title a:hover,
.m7dv-card__title a:hover { color: var(--m7dv-accent, var(--m7dv-accent-fallback)) !important; }

.m7dv-card__excerpt {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: #4c4c63;
}

/* A category card is a square picture with its name underneath. */
.m7dv-card--category .m7dv-card__media { aspect-ratio: 1 / 1; }

@supports not (aspect-ratio: 1 / 1) {
	.m7dv-card--category .m7dv-card__media { padding-bottom: 100%; }
}

/* Category cards get tighter chrome once they are small. */
.m7dv-cat-list.m7dv-grid-list--cols-5 .m7dv-card__body,
.m7dv-cat-list.m7dv-grid-list--cols-6 .m7dv-card__body {
	padding: 14px;
	gap: 6px;
}

#top .m7dv-cat-list.m7dv-grid-list--cols-5 .m7dv-card__title,
#top .m7dv-cat-list.m7dv-grid-list--cols-6 .m7dv-card__title,
.m7dv-cat-list.m7dv-grid-list--cols-5 .m7dv-card__title,
.m7dv-cat-list.m7dv-grid-list--cols-6 .m7dv-card__title { font-size: 16px; }

.m7dv-cat-list.m7dv-grid-list--cols-5 .m7dv-card__excerpt,
.m7dv-cat-list.m7dv-grid-list--cols-6 .m7dv-card__excerpt { font-size: 13.5px; }

.m7dv-cat-list.m7dv-grid-list--cols-5,
.m7dv-cat-list.m7dv-grid-list--cols-6 { gap: 20px; }

/* Category cards carry a count instead of a chart excerpt. */
.m7dv-card__count {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback));
}

.m7dv-card__button {
	align-self: flex-start;
	margin-top: 4px;
	padding: 8px 16px;
	border: 1px solid var(--m7dv-accent, var(--m7dv-accent-fallback));
	border-radius: 999px;
	color: var(--m7dv-accent, var(--m7dv-accent-fallback)) !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
}

.m7dv-card__button:hover {
	background: var(--m7dv-accent, var(--m7dv-accent-fallback));
	color: #fff !important;
}

/* ============================================================== single page */

.m7dv-single {
	--m7dv-accent-fallback: #12A3B5;
	--m7dv-heading-fallback: #2B2666;
	--m7dv-border: #E4E4EC;
	--m7dv-muted: #6B6B85;
	font-family: var(--m7dv-font, inherit);
}

.m7dv-single__header { margin-bottom: 32px; }

.m7dv-single__back {
	margin: 0 0 18px;
	font-size: 14px;
	font-weight: 600;
}

#top .m7dv-single__back a,
.m7dv-single__back a {
	color: var(--m7dv-accent, var(--m7dv-accent-fallback)) !important;
	text-decoration: none !important;
}

.m7dv-single__media {
	margin: 0 0 24px;
	border-radius: 14px;
	overflow: hidden;
}

#top .m7dv-single__media img,
.m7dv-single__image {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: 0;
}

#top .m7dv-single .m7dv-single__title,
.m7dv-single__title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 34px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
}

.m7dv-single__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}

#top .m7dv-single__term,
.m7dv-single__term {
	display: inline-block;
	padding: 4px 12px;
	text-decoration: none;
	border-radius: 999px;
	background: rgba(18,163,181,.12);
	color: #0b7482;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

#top a.m7dv-single__term:hover,
a.m7dv-single__term:hover {
	background: var(--m7dv-accent, var(--m7dv-accent-fallback));
	color: #fff;
	text-decoration: none;
}

/* ------------------------------------------------------- category archive */

.m7dv-archive__header { margin-bottom: 32px; }

.m7dv-archive__header--media {
	display: flex;
	align-items: flex-start;
	gap: 28px;
}

.m7dv-archive__media {
	flex: none;
	width: 156px;
	max-width: 30%;
	margin: 0;
	aspect-ratio: 1 / 1;
	border-radius: 14px;
	overflow: hidden;
	background: #F1F1F5;
}

@supports not (aspect-ratio: 1 / 1) {
	.m7dv-archive__media {
		height: 0;
		padding-bottom: 30%;
		position: relative;
	}

	.m7dv-archive__image {
		position: absolute;
		top: 0;
		left: 0;
	}
}

#top .m7dv-archive .m7dv-archive__image,
.m7dv-archive__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

.m7dv-archive__intro { min-width: 0; }

.m7dv-archive__empty {
	margin: 0 0 2.5em;
	padding: 18px;
	border-radius: 10px;
	background: var(--m7dv-soft, #F4F5F8);
	color: var(--m7dv-muted, #6B6B85);
	font-style: italic;
}

#top .m7dv-archive .m7dv-archive__title,
.m7dv-archive__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--m7dv-heading, var(--m7dv-heading-fallback));
}

.m7dv-archive__description {
	max-width: 760px;
	font-size: 18px;
	line-height: 1.6;
	color: #3c3c50;
}

.m7dv-single__excerpt {
	max-width: 760px;
	font-size: 18px;
	line-height: 1.6;
	color: #3c3c50;
}

/* The full description, across the width of the page. */
.m7dv-single__description {
	max-width: none;
	margin-bottom: 4px;
	font-size: 17px;
	line-height: 1.7;
	color: #3c3c50;
}

.m7dv-single__description > *:first-child { margin-top: 0; }
.m7dv-single__description > *:last-child { margin-bottom: 0; }

.m7dv-single__chart { margin-top: 8px; }

/* Columns step down with the screen: 6, then 5, then 4, then 3. A grid never
   gains columns, so asking for 4 stays 4 until the screen forces fewer. */
@media only screen and (max-width: 1399px) {
	.m7dv-grid-list--cols-6 { --m7dv-cols: 5; }
}

@media only screen and (max-width: 1199px) {
	.m7dv-grid-list--cols-5,
	.m7dv-grid-list--cols-6 { --m7dv-cols: 4; }
}

@media only screen and (max-width: 989px) {
	.m7dv-grid-list--cols-4,
	.m7dv-grid-list--cols-5,
	.m7dv-grid-list--cols-6 { --m7dv-cols: 3; }
}

@media only screen and (max-width: 767px) {
	.m7dv-archive__header--media {
		display: block;
	}

	.m7dv-archive__media {
		width: 140px;
		max-width: 50%;
		margin: 0 0 16px;
	}

	.m7dv-title-list { --m7dv-title-cols: 1 !important; }

	.m7dv-grid-list { gap: 20px; --m7dv-cols: 1 !important; }

	/* Category cards are small enough to sit two abreast on a phone. */
	.m7dv-grid-list.m7dv-cat-list { --m7dv-cols: 2 !important; }
	.m7dv-cat-list .m7dv-card__body { padding: 12px; }
	.m7dv-card__body { padding: 16px; }
	#top .m7dv-card .m7dv-card__title,
	.m7dv-card__title { font-size: 17px; }
	#top .m7dv-single .m7dv-single__title,
	.m7dv-single__title { font-size: 26px; }
	.m7dv-single__excerpt { font-size: 16px; }
	.m7dv-single__description { font-size: 16px; }
}

@media only screen and (max-width: 479px) {
	.m7dv-grid-list.m7dv-cat-list { --m7dv-cols: 1 !important; }
}
