/**
 * Overdrive 3.10.3 — selected visual refresh over the 3.10.0 RPM baseline.
 * Scope: header, author E-E-A-T presentation and article typography only.
 */

/* Header: hamburger left, wordmark, then theme + X + search. */
body.go-verge .go-header--editorial .go-header__bar {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	column-gap: clamp(8px, 1.4vw, 16px);
}

body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--text);
}

body.go-verge .go-header--editorial .go-header__menu-toggle--leading:hover,
body.go-verge .go-header--editorial .go-header__menu-toggle--leading:focus-visible {
	border: 0;
	background: color-mix(in srgb, var(--text) 7%, transparent);
	color: var(--lime);
}

body.go-verge .go-header--editorial .go-header__menu-toggle--leading svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

body.go-verge .go-header--editorial .go-header__brand {
	justify-self: start;
	min-width: 0;
}

body.go-verge .go-header--editorial .go-header__actions {
	justify-self: end;
	margin-inline-start: 0;
}

body.go-verge .go-header--editorial .go-header__x {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}

body.go-verge .go-header--editorial .go-header__x svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	stroke: none;
}

/*
 * Mobile contract: one line, no overlap, full wordmark kept visible and all
 * three right-side actions (theme, X and search) retained.
 */
@media (max-width: 767px) {
	body.go-verge .go-header--editorial .go-header__bar {
		grid-template-columns: 40px minmax(0, 1fr) auto;
		column-gap: 6px;
		padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
	}

	body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
		width: 40px;
		height: 40px;
		min-width: 40px;
	}

	body.go-verge .go-header--editorial .go-header__brand,
	body.go-verge .go-header--editorial.is-compact .go-header__brand {
		width: auto !important;
		min-width: 0 !important;
		max-width: 100% !important;
		height: auto !important;
		overflow: visible !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full {
		display: inline-flex !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full .go-logo__img,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full .go-logo__img {
		width: auto !important;
		height: 27px !important;
		max-width: min(142px, 100%) !important;
		max-height: 27px !important;
		object-fit: contain;
		object-position: left center;
	}

	body.go-verge .go-header--editorial .go-header__actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 0;
		min-width: max-content;
	}

	body.go-verge .go-header--editorial .go-header__theme-toggle,
	body.go-verge .go-header--editorial .go-header__x,
	body.go-verge .go-header--editorial .go-header__search-toggle {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
		flex: 0 0 40px !important;
		margin: 0 !important;
		padding: 0 !important;
	}
}

@media (max-width: 380px) {
	body.go-verge .go-header--editorial .go-header__bar {
		grid-template-columns: 38px minmax(0, 1fr) auto;
		column-gap: 4px;
		padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
	}

	body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
		width: 38px;
		height: 38px;
		min-width: 38px;
	}

	body.go-verge .go-header--editorial .go-header__theme-toggle,
	body.go-verge .go-header--editorial .go-header__x,
	body.go-verge .go-header--editorial .go-header__search-toggle {
		width: 36px !important;
		height: 38px !important;
		min-width: 36px !important;
		flex-basis: 36px !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full .go-logo__img,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full .go-logo__img {
		height: 24px !important;
		max-width: min(112px, 100%) !important;
		max-height: 24px !important;
	}
}

/* Public author E-E-A-T presentation. */
body.author.go-verge .go-author-hero__identity { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin-bottom:8px; }
body.author.go-verge .go-author-hero__role { color:var(--lime-text); font-family:var(--font-mono); font-size:var(--fs-xs); font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
body.author.go-verge .go-author-hero__pronouns { color:var(--text-secondary); font-size:var(--fs-sm); }
body.author.go-verge .go-author-hero__topics { display:flex; flex-wrap:wrap; gap:7px; margin-top:16px; }
body.author.go-verge .go-author-hero__topic { display:inline-flex; align-items:center; min-height:28px; padding:5px 10px; border:1px solid var(--frame); border-radius:999px; color:var(--text-muted); font-size:var(--fs-xs); font-weight:650; line-height:1; }
body.author.go-verge .go-author-hero__facts { display:flex; flex-wrap:wrap; gap:12px 26px; margin:19px 0 0; }
body.author.go-verge .go-author-hero__fact { margin:0; }
body.author.go-verge .go-author-hero__fact dt { color:var(--text-secondary); font-family:var(--font-mono); font-size:.62rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
body.author.go-verge .go-author-hero__fact dd { margin:2px 0 0; color:var(--text); font-size:.9rem; font-weight:650; }
body.author.go-verge .go-author-hero__links { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:20px; }
body.author.go-verge .go-author-hero__links a { display:inline-flex; align-items:center; min-height:34px; padding:7px 12px; border:1px solid var(--frame); border-radius:999px; color:var(--text-muted); font-size:var(--fs-xs); font-weight:700; line-height:1; }
body.author.go-verge .go-author-hero__links a:hover,
body.author.go-verge .go-author-hero__links a:focus-visible { border-color:var(--lime-dim); color:var(--lime-text); }
body.author.go-verge .go-author-profile-notes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(24px,4vw,54px); padding:clamp(24px,3.5vw,42px) 0; border-top:1px solid var(--frame); }
body.author.go-verge .go-author-profile-note h2 { margin:0 0 10px; font-size:clamp(1.12rem,1.8vw,1.38rem); line-height:1.2; }
body.author.go-verge .go-author-profile-note p { margin:0; color:var(--text-muted); font-size:.95rem; line-height:1.62; }
body.author.go-verge .go-author-profile-note p + p { margin-top:10px; }
@media (max-width:640px) {
	body.author.go-verge .go-author-profile-notes { grid-template-columns:minmax(0,1fr); gap:24px; }
	body.author.go-verge .go-author-hero__facts { gap:12px 20px; }
}

/* Article body type scale from the current theme. */
body.single-post.go-verge .go-article__content { font-size:1.16rem; line-height:1.76; }
@media (max-width:767px) {
	body.single-post.go-verge .go-article__content { font-size:clamp(1.075rem,4.55vw,1.16rem); line-height:1.72; }
}


/* ==========================================================================
   3.10.4 — authoritative header geometry fix
   Desktop: brand is mathematically centered in the container.
   Mobile: explicit three-column contract prevents actions wrapping to row 2.
   ========================================================================== */

@media (min-width: 768px) {
	body.go-verge .go-header--editorial .go-header__bar {
		position: relative !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		grid-template-columns: none !important;
	}

	body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
		position: relative !important;
		z-index: 2;
		flex: 0 0 40px !important;
	}

	body.go-verge .go-header--editorial .go-header__brand,
	body.go-verge .go-header--editorial.is-compact .go-header__brand {
		position: absolute !important;
		left: 50% !important;
		top: 50% !important;
		z-index: 1;
		width: auto !important;
		min-width: 0 !important;
		max-width: min(236px, 34vw) !important;
		height: auto !important;
		margin: 0 !important;
		overflow: visible !important;
		transform: translate(-50%, -50%) !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full {
		position: static !important;
		inset: auto !important;
		display: inline-flex !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}

	body.go-verge .go-header--editorial .go-header__actions {
		position: relative !important;
		z-index: 2;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
		width: auto !important;
		margin-inline-start: auto !important;
	}
}

@media (max-width: 767px) {
	body.go-verge .go-header--editorial .go-header__bar {
		position: relative !important;
		display: grid !important;
		grid-template-columns: 40px minmax(0, 1fr) 108px !important;
		grid-template-rows: var(--go-header-compact-height, 58px) !important;
		align-items: center !important;
		column-gap: 6px !important;
		row-gap: 0 !important;
		height: var(--go-header-compact-height, 58px) !important;
		min-height: var(--go-header-compact-height, 58px) !important;
		padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)) !important;
		overflow: visible !important;
	}

	body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
		grid-column: 1 !important;
		grid-row: 1 !important;
		justify-self: start !important;
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
		margin: 0 !important;
	}

	body.go-verge .go-header--editorial .go-header__brand,
	body.go-verge .go-header--editorial.is-compact .go-header__brand {
		grid-column: 2 !important;
		grid-row: 1 !important;
		position: static !important;
		inset: auto !important;
		justify-self: center !important;
		align-self: center !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		overflow: hidden !important;
		transform: none !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full {
		position: static !important;
		inset: auto !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full .go-logo__img,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full .go-logo__img {
		width: auto !important;
		height: 26px !important;
		max-width: min(142px, 100%) !important;
		max-height: 26px !important;
		object-fit: contain !important;
		object-position: center !important;
	}

	body.go-verge .go-header--editorial .go-header__actions {
		grid-column: 3 !important;
		grid-row: 1 !important;
		position: static !important;
		display: grid !important;
		grid-template-columns: repeat(3, 36px) !important;
		align-items: center !important;
		justify-content: end !important;
		justify-self: end !important;
		width: 108px !important;
		min-width: 108px !important;
		height: 40px !important;
		margin: 0 !important;
		gap: 0 !important;
		transform: none !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	body.go-verge .go-header--editorial .go-header__theme-toggle,
	body.go-verge .go-header--editorial .go-header__x,
	body.go-verge .go-header--editorial .go-header__search-toggle {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 36px !important;
		height: 40px !important;
		min-width: 36px !important;
		max-width: 36px !important;
		flex: 0 0 36px !important;
		margin: 0 !important;
		padding: 0 !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

@media (max-width: 359px) {
	body.go-verge .go-header--editorial .go-header__bar {
		grid-template-columns: 36px minmax(0, 1fr) 96px !important;
		column-gap: 4px !important;
		padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)) !important;
	}

	body.go-verge .go-header--editorial .go-header__menu-toggle--leading {
		width: 36px !important;
		height: 38px !important;
		min-width: 36px !important;
	}

	body.go-verge .go-header--editorial .go-header__actions {
		grid-template-columns: repeat(3, 32px) !important;
		width: 96px !important;
		min-width: 96px !important;
	}

	body.go-verge .go-header--editorial .go-header__theme-toggle,
	body.go-verge .go-header--editorial .go-header__x,
	body.go-verge .go-header--editorial .go-header__search-toggle {
		width: 32px !important;
		min-width: 32px !important;
		max-width: 32px !important;
		flex-basis: 32px !important;
	}

	body.go-verge .go-header--editorial .go-header__logo-full .go-logo__img,
	body.go-verge .go-header--editorial.is-compact .go-header__logo-full .go-logo__img {
		height: 22px !important;
		max-height: 22px !important;
		max-width: min(104px, 100%) !important;
	}
}

/* ==========================================================================
   3.10.8 — UI, accessibility and layout-stability refinements

   This final layer deliberately excludes every advertising selector. It
   improves reading, controls and failure states without moving inventory or
   changing reserved ad geometry.
   ========================================================================== */

html {
	scroll-padding-block-start: calc(var(--go-header-compact-height, 58px) + 22px);
}

@supports (scrollbar-gutter: stable) {
	html { scrollbar-gutter: stable; }
}

body.go-verge {
	-webkit-tap-highlight-color: color-mix(in srgb, var(--lime) 22%, transparent);
}

body.go-verge :where(
	.go-article__content h2,
	.go-article__content h3,
	.go-article__content h4,
	.go-section,
	.go-pagehead,
	.go-faq-item
) {
	scroll-margin-block-start: calc(var(--go-header-compact-height, 58px) + 22px);
}

body.go-verge :where(
	.go-tile__title,
	.go-archive-row__title,
	.go-archive-feature__title,
	.go-section__title,
	.go-home-panel__title,
	.go-pagehead__title,
	.go-article-sidebar__story-copy
) {
	overflow-wrap: anywhere;
	text-wrap: pretty;
}

body.single-post.go-verge .go-article__content :where(p, li) {
	text-wrap: pretty;
}

body.single-post.go-verge .go-article__content :where(h2, h3, h4) {
	text-wrap: balance;
}

body.single-post.go-verge .go-article__hero.is-broken .go-frame {
	background: var(--surface-2);
}

body.go-verge :where(
	.go-btn,
	.go-load-more,
	.go-home-panel__link,
	.go-chips--filter a,
	.go-latest-filter,
	.go-pagination .page-numbers
) {
	min-block-size: 44px;
}

body.go-verge :where([aria-busy='true'], .is-loading) {
	cursor: progress;
}

@media (max-width: 767px) {
	body.go-verge :where(
		input:not([type='checkbox']):not([type='radio']):not([type='range']),
		select,
		textarea
	) {
		font-size: 16px;
	}

	body.go-verge .go-article__header {
		max-inline-size: 100%;
	}
}

@media (prefers-contrast: more) {
	body.go-verge :where(a, button, input, select, textarea, summary):focus-visible {
		outline-width: 3px;
		outline-offset: 3px;
	}

	body.go-verge :where(.go-btn, .go-chips--filter a, .go-latest-filter) {
		border-color: currentColor;
	}
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto !important; }
}
