/*
 * Root fluid-type scale, shared by every page. This used to be copy-pasted
 * into each page stylesheet with small drifts, including a cascade bug in
 * about/contact/404/terms.v2.css: their `max-width: 1200px` tier was set to
 * 22px (copy-paste from the 1600px tier) instead of 18px, and since a
 * `max-width` rule matches every width below its threshold, that one rule
 * silently swallowed the narrower 400px/700px tiers beneath it on those
 * pages. Rewritten here using only ascending `min-width` breakpoints so each
 * tier cleanly overrides the previous one with no overlap ambiguity.
 */
/*
 * Design tokens shared by every page (originally scoped to .pv2-root for
 * profile pages only; hoisted to :root so list pages can use the same
 * accent/radius/shadow scale instead of their own hardcoded values).
 */
:root {
	--pv2-navy:          #0f1f3d;
	--pv2-accent:        #2f5fd6;
	--pv2-body-text:     #161b22;
	--pv2-secondary-text:#3c4450;
	--pv2-muted-text:    #677181;
	--pv2-placeholder:   #767676;
	--pv2-border:        #e3e7ed;
	--pv2-card-bg:       #ffffff;
	--pv2-tinted-bg:     #f3f6fc;
	--pv2-page-bg:       #f8f9fb;

	--pv2-radius-sm:     0.5rem;
	--pv2-radius-md:     0.625rem;
	--pv2-radius-lg:     0.875rem;

	--pv2-shadow-card:   0 0.0625rem 0.1875rem rgba(15, 31, 61, 0.06), 0 0.0625rem 0.125rem rgba(15, 31, 61, 0.04);

	--pv2-navbar-h:      3.5rem;
	--pv2-sidebar-w:     13.75rem;
}

html {
	font-size: 16px;
}
@media screen and (min-width: 700px) {
	html { font-size: 17px; }
}
@media screen and (min-width: 1200px) {
	html { font-size: 18px; }
}
@media screen and (min-width: 1600px) {
	html { font-size: 22px; }
}
@media screen and (min-width: 2200px) {
	html { font-size: 28px; }
}
@media screen and (min-width: 3200px) {
	html { font-size: 36px; }
}
@media screen and (min-width: 3800px) {
	html { font-size: 42px; }
}
@media screen and (min-width: 4600px) {
	html { font-size: 50px; }
}
@media screen and (min-width: 5200px) {
	html { font-size: 60px; }
}
@media screen and (min-width: 6200px) {
	html { font-size: 72px; }
}

/*
 * Shared across every page: icon sizing, the fixed site header/nav, and the
 * mobile menu panel mechanics. Page-specific stylesheets only carry rules
 * that are genuinely unique to that page (hero sections, tables, forms,
 * mobile-menu background art, etc).
 *
 * Header sizing uses rem, safe now that every page shares the exact same
 * root font-size scale above — rem always resolves to the same px value on
 * any page at a given viewport width.
 *
 * Two header color themes exist, selected by a modifier class:
 *   - default (no modifier): white text/logo, for pages with a dark hero
 *     image behind the transparent header (index, about).
 *   - .header-site--light: black text/logo, for pages with a light/opaque
 *     background behind the header (contact, operatives, organizations,
 *     prisoners, prisoners-released-in-deals, 404, privacy-policy,
 *     terms-of-service). Apply this modifier to BOTH the <header id="header-site">
 *     and the sibling <div id="menu-container"> (the mobile flyout lives
 *     outside <header> in the DOM, so it needs its own copy of the class).
 */

.pv2-icon {
	width: 1rem;
	height: 1rem;
	display: inline-block;
	flex-shrink: 0;
	fill: currentColor;
	vertical-align: -0.125em;
}

.mobile-menu-container-hidden {
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mobile-menu-container-visible {
	display: block;
	opacity: 1;
	transition: opacity 0.3s ease;
}

/*
 * #header-site and #menu-container get an explicit line-height here because
 * several page stylesheets set `body { line-height: 1.6 }` for their own
 * body copy; without this reset that inherits into the logo/menu-link/
 * mobile-menu-text line boxes and inflates the header's height on those
 * pages relative to pages that don't touch body's line-height.
 */
#header-site,
#menu-container {
	line-height: normal;
}

.header-site {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 50;
	background-color: transparent;
	box-shadow: none;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-site.header-scrolled {
	background-color: #1f2937;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-site--light {
	background-color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-site--light.header-scrolled {
	background-color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-menu-container {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding: 0.75rem 1.5rem;
}

.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo-container {
	display: flex;
	align-items: center;
}

.logo {
	font-size: 1.5rem;
	font-weight: bold;
	color: #ffffff;
	display: flex;
	align-items: center;
}

.logo-image {
	display: block;
	height: 2rem;
}

.desktop-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.menu-link {
	font-size: 1rem;
	line-height: 1.4;
	font-weight: 550;
	color: #ffffff;
	background-color: transparent;
	border-color: transparent;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.3s ease;
}

.menu-link:hover {
	color: #c6d8ff;
}

.mobile-menu-button {
	display: none;
}

.menu-toggle-button {
	color: #ffffff;
	background-color: transparent;
	border-color: transparent;
	transition: color 0.3s ease;
}

.menu-toggle-button:hover {
	color: #c6d8ff;
}

.menu-toggle-button:focus {
	outline: none;
}

.menu-icon {
	width: 1.5rem;
	height: 1.5rem;
	color: inherit;
}

.header-site--light .logo,
.header-site--light .menu-link,
.header-site--light .menu-toggle-button {
	color: #000000;
}

.header-site--light .menu-link:hover {
	color: #4a59ff;
}

.header-site--light .menu-toggle-button:hover {
	color: #555555;
}

@media (max-width: 1000px) {
	.header-menu-container {
		padding: 0.5rem 1rem;
	}

	.logo-image {
		max-width: 95%;
	}

	.mobile-menu-button {
		display: block;
		background-color: transparent;
		border-color: transparent;
	}

	.desktop-menu {
		display: none;
	}

	.mobile-menu-container-visible {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100vh;
		z-index: 45;
		background-size: cover;
		background-position: center;
		background-attachment: fixed;
		padding-bottom: 1.5rem;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		overflow: hidden;
		gap: 1rem;
	}

	.mobile-menu-text {
		font-size: 1.2rem;
		line-height: 1.4;
		color: #ffffff;
		background-color: transparent;
		border-color: transparent;
		text-decoration: none;
		transition: color 0.3s ease;
	}

	.mobile-menu-text:hover {
		color: rgba(255, 255, 255, 0.5);
	}

	.header-site--light .mobile-menu-text {
		color: #000000;
	}

	.header-site--light .mobile-menu-text:hover {
		color: rgba(0, 0, 0, 0.5);
	}
}
