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

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

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

.nrmh-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;
}

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

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

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

.nrmh-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);
}

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

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

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

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

/* ==========================================================================
   Article + sticky TOC (SEL / news.local style)
   Supports theme (nrmh-*) and Must Have Article Kit (mak-*) class names.
   ========================================================================== */

/* Body row: center TOC + reading column as one unit (no giant middle gap) */
.nrmh-article-body--toc,
.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;
	padding-top: 8px;
	padding-bottom: 8px;
	box-sizing: border-box;
}

@media (min-width: 1024px) {
	.nrmh-article-body--toc,
	.mak-article-body--toc {
		/* Fixed TOC rail + capped article column; justify center of .nr-wrap */
		grid-template-columns: minmax(260px, 288px) minmax(0, 720px);
		justify-content: center;
		column-gap: 40px;
		row-gap: 0;
	}
}

/* Content column: kill default .nr-article max-width + auto margin that
   floated the story away from the TOC on wide screens */
.nrmh-article-body--toc > .nr-article,
.nrmh-article-body--toc > .mak-article__content,
.mak-article-body--toc > .nr-article,
.mak-article-body--toc > .mak-article__content {
	max-width: none;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0 0 56px;
	box-sizing: border-box;
}

.nrmh-article-body--toc .nr-entry,
.mak-article-body--toc .nr-entry {
	font-size: 18px;
	line-height: 1.7;
	color: #3c4043;
}

.nrmh-article-body--toc .nr-entry > p:first-child,
.mak-article-body--toc .nr-entry > p:first-child,
.nrmh-article-body--toc .nr-entry > .nrmh-lead,
.nrmh-article-body--toc .nr-entry > .mak-lead {
	margin-top: 0;
}

.nrmh-article-body--toc .nr-entry h2,
.mak-article-body--toc .nr-entry h2 {
	font-size: 26px;
	line-height: 1.25;
	letter-spacing: -0.015em;
	margin: 2.1rem 0 0.75rem;
	color: var(--nr-ink, #202124);
}

.nrmh-article-body--toc .nr-entry h3,
.mak-article-body--toc .nr-entry h3 {
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 1.6rem 0 0.5rem;
	color: var(--nr-ink, #202124);
}

.nrmh-article-body--toc .nr-entry p,
.mak-article-body--toc .nr-entry p {
	margin: 0 0 1.15rem;
}

.nrmh-article-body--toc .nr-entry ul,
.mak-article-body--toc .nr-entry ul {
	margin: 0 0 1.15rem;
	padding-left: 1.25rem;
}

/* TOC sticky rail */
.nrmh-toc,
.mak-toc {
	order: -1;
	min-width: 0;
}

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

.nrmh-toc__card,
.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;
}

.nrmh-toc__toggle,
.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;
}

.nrmh-toc__title,
.mak-toc__title {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

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

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

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

.mak-toc__list {
	counter-reset: mak-toc;
}

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

.nrmh-toc__item,
.mak-toc__item {
	margin: 0;
}

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

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

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

.nrmh-toc__link,
.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;
	transition: background 0.12s ease, color 0.12s ease;
}

.nrmh-toc__item--h2 .nrmh-toc__link::before,
.mak-toc__item--h2 .mak-toc__link::before {
	content: counter(nrmh-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--h2 .mak-toc__link::before {
	content: counter(mak-toc) ".";
}

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

.nrmh-toc__item--h3 .nrmh-toc__link::before,
.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;
}

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

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

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

.nrmh-toc__top,
.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;
}

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

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

.nrmh-gpref,
.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;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nrmh-gpref:hover,
.nrmh-gpref:focus-visible,
.mak-gpref:hover,
.mak-gpref:focus-visible {
	background: #e8f0fe;
	border-color: #174ea6;
	color: #174ea6;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(26, 115, 232, 0.12);
}

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

.nrmh-gpref__text,
.mak-gpref__text {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	/* Prefer a single line; wrap only if needed without orphaning “Google” */
	overflow-wrap: anywhere;
	hyphens: auto;
}

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

@media (max-width: 1023px) {
	.nrmh-toc.is-collapsed-mobile .nrmh-toc__list,
	.nrmh-toc.is-collapsed-mobile .nrmh-toc__top,
	.nrmh-toc.is-collapsed-mobile .nrmh-toc__gpref,
	.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;
	}

	.nrmh-toc.is-collapsed-mobile .nrmh-toc__caret,
	.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 */
.nrmh-newsletter-form--shortcode {
	margin: 20px auto 0;
	max-width: 520px;
	text-align: left;
}

.nr-newsletter .nrmh-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 .nrmh-newsletter-form--shortcode input[type="email"],
.nr-newsletter .nrmh-newsletter-form--shortcode input[type="text"] {
	min-width: 220px;
	flex: 1 1 200px;
}
