/**
 * Kit overlays on Newsroom design.
 */

/* Section head: title left, Read more right */
.mak-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	width: 100%;
}

.mak-section-head .nr-section-title {
	margin: 0;
	flex: 1 1 auto;
}

.mak-section-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	font-family: var(--nr-font-body, inherit);
	font-size: 14px;
	font-weight: 500;
	color: var(--nr-blue, #1a73e8);
	text-decoration: none;
	white-space: nowrap;
}

.mak-section-more:hover {
	color: var(--nr-blue-dark, #174ea6);
	text-decoration: none;
}

.mak-section--boxed.has-custom-bg {
	/* background via inline style */
}

/* Single meta row */
.mak-post-meta--single {
	margin-top: 14px;
	max-width: 46rem;
}

.mak-post-meta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 8px;
	row-gap: 6px;
	font-size: 14px;
	color: var(--nr-ink-2, #5f6368);
}

.mak-post-meta__sep {
	color: var(--nr-ink-3, #80868b);
	user-select: none;
}

.mak-post-meta__label {
	font-weight: 600;
	color: var(--nr-ink, #202124);
}

.mak-post-meta__published .mak-post-meta__label {
	font-weight: 500;
	color: var(--nr-ink-2, #5f6368);
}

.mak-post-meta--card {
	display: flex;
	flex-wrap: wrap;
	gap: 0 6px;
	font-size: 12px;
	color: var(--nr-ink-2, #5f6368);
	margin-top: 6px;
}

/* Article + TOC layout (aligned with news.local / SEL)
 * Theme kit.css may also style these; keep plugin portable. */
.mak-article-body--toc {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: start;
	max-width: min(1180px, 100%);
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

@media (min-width: 1024px) {
	.mak-article-body--toc {
		grid-template-columns: minmax(260px, 288px) minmax(0, 720px);
		justify-content: center;
		column-gap: 40px;
	}
}

/* Prevent theme .nr-article { margin: 0 auto } from opening a gap after TOC */
.mak-article-body--toc > .mak-article__content,
.mak-article-body--toc > .nr-article {
	max-width: none;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0 0 56px;
	box-sizing: border-box;
}

.mak-toc {
	order: -1;
	min-width: 0;
}

@media (min-width: 1024px) {
	.mak-toc {
		order: 0;
		position: sticky;
		top: 88px;
		align-self: start;
		width: 100%;
	}
}

.mak-toc__card {
	background: #fff;
	border: 1px solid var(--nr-line, #dadce0);
	border-radius: 16px;
	padding: 10px 12px 12px;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.06);
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

.mak-toc__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border: 0;
	background: transparent;
	padding: 6px 2px 10px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	color: var(--nr-ink, #202124);
	text-align: left;
}

.mak-toc__title {
	font-size: 14px;
	font-weight: 600;
}

.mak-toc__caret {
	flex-shrink: 0;
	opacity: 0.65;
	transition: transform 0.15s ease;
}

.mak-toc.is-collapsed .mak-toc__caret {
	transform: rotate(-90deg);
}

.mak-toc__list {
	list-style: none;
	margin: 0;
	padding: 8px 0 6px;
	border-top: 1px solid var(--nr-line, #dadce0);
	counter-reset: mak-toc;
	max-height: min(62vh, 520px);
	overflow: auto;
	scrollbar-width: thin;
}

.mak-toc.is-collapsed .mak-toc__list,
.mak-toc.is-collapsed .mak-toc__top,
.mak-toc.is-collapsed .mak-toc__gpref {
	display: none;
}

.mak-toc__item {
	margin: 0;
}

.mak-toc__item--h2 {
	counter-increment: mak-toc;
}

.mak-toc__item--h3 {
	counter-increment: none;
}

.mak-toc__link {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 7px 6px;
	border-radius: 8px;
	color: var(--nr-ink-2, #5f6368);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.35;
	min-width: 0;
}

.mak-toc__item--h2 .mak-toc__link::before {
	content: counter(mak-toc) ".";
	flex: 0 0 1.6em;
	width: 1.6em;
	max-width: 1.6em;
	text-align: right;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
	padding-top: 1px;
	color: var(--nr-ink-3, #80868b);
	font-variant-numeric: tabular-nums;
}

.mak-toc__item--h3 .mak-toc__link {
	padding-left: calc(1.6em + 14px);
	font-size: 13px;
	font-weight: 400;
}

.mak-toc__item--h3 .mak-toc__link::before {
	content: "";
	width: 5px;
	height: 5px;
	margin-top: 0.45em;
	margin-left: -13px;
	border-radius: 50%;
	background: var(--nr-ink-3, #80868b);
	opacity: 0.55;
	flex: 0 0 5px;
}

.mak-toc__link:hover,
.mak-toc__link:focus-visible,
.mak-toc__link.is-active {
	background: #e8f0fe;
	color: var(--nr-blue, #1a73e8);
	text-decoration: none;
}

.mak-toc__item--h2 .mak-toc__link.is-active::before {
	color: var(--nr-blue, #1a73e8);
}

.mak-toc__item--h3 .mak-toc__link.is-active::before {
	background: var(--nr-blue, #1a73e8);
	opacity: 1;
}

.mak-toc__top {
	display: inline-flex;
	margin-top: 4px;
	padding: 6px 6px 2px;
	font-size: 12px;
	font-weight: 500;
	color: var(--nr-blue, #1a73e8);
	text-decoration: none;
}

.mak-toc__top:hover {
	text-decoration: underline;
}

.mak-toc__gpref {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--nr-line, #dadce0);
}

.mak-gpref {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1.5px solid #1a73e8;
	border-radius: 999px;
	background: #fff;
	color: #1a73e8;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

.mak-gpref:hover,
.mak-gpref:focus-visible {
	background: #e8f0fe;
	border-color: #174ea6;
	color: #174ea6;
	text-decoration: none;
}

.mak-gpref__icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
}

.mak-gpref__text {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	overflow-wrap: anywhere;
}

.mak-gpref__arrow {
	flex-shrink: 0;
	font-weight: 600;
	opacity: 0.9;
}

@media (max-width: 1023px) {
	.mak-toc.is-collapsed-mobile .mak-toc__list,
	.mak-toc.is-collapsed-mobile .mak-toc__top,
	.mak-toc.is-collapsed-mobile .mak-toc__gpref {
		display: none;
	}

	.mak-toc.is-collapsed-mobile .mak-toc__caret {
		transform: rotate(-90deg);
	}
}

html {
	scroll-behavior: smooth;
}

.nr-entry h2,
.nr-entry h3 {
	scroll-margin-top: 88px;
}

.nr-article-hero img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
	height: auto;
}

/* MailerPress form inside newsletter band */
.mak-newsletter-form--shortcode {
	margin: 20px auto 0;
	max-width: 520px;
	text-align: left;
}

.nr-newsletter .mak-newsletter-form--shortcode form,
.nr-newsletter .mailerpress-optin-form,
.nr-newsletter form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	align-items: center;
}

.nr-newsletter .mak-newsletter-form--shortcode input[type="email"],
.nr-newsletter .mak-newsletter-form--shortcode input[type="text"] {
	min-width: 220px;
	flex: 1 1 200px;
}

/* —— Key Moments (Flux-style) —— */
.mak-key-moments {
	--mak-km-accent: #5b4dff;
	--mak-km-border: #c7c2ff;
	--mak-km-title: #202124;
	--mak-km-text: #5f6368;
	background: #fff;
	border: 1.5px solid var(--mak-km-border);
	border-radius: 20px;
	padding: 28px 28px 16px;
	margin: 0 0 32px;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.04);
	box-sizing: border-box;
	max-width: 100%;
}

.mak-key-moments__title {
	margin: 0 0 18px;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--mak-km-title);
	line-height: 1.3;
}

.mak-key-moments__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mak-key-moments__item {
	margin: 0;
	padding: 0;
	border-top: 1px solid #f0f0f5;
}

.mak-key-moments__item:first-child {
	border-top: 0;
}

.mak-key-moments__row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 4px;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	transition: background 0.15s ease;
}

a.mak-key-moments__row:hover {
	background: #f7f6ff;
}

.mak-key-moments__num {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	margin-top: 2px;
	border-radius: 50%;
	background: var(--mak-km-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.mak-key-moments__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mak-key-moments__item-title {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: var(--mak-km-title);
	line-height: 1.35;
}

.mak-key-moments__item-text {
	display: block;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--mak-km-text);
}

.mak-key-moments__arrow {
	flex: 0 0 auto;
	color: #c5c8d0;
	margin-top: 6px;
	display: inline-flex;
}

a.mak-key-moments__row:hover .mak-key-moments__arrow {
	color: var(--mak-km-accent);
}

@media (max-width: 600px) {
	.mak-key-moments {
		padding: 20px 16px 10px;
		border-radius: 16px;
	}
	.mak-key-moments__row {
		padding: 14px 0;
	}
}
