/* ==========================================================================
   LEGACY SQUARESPACE ARCHIVE STYLES (letskickass.org & hltsad.org)
   Strictly scoped to legacy page templates so lkaps.org stays 100% untouched.
   ========================================================================== */

body.page-template-page-legacy-lkaps,
body.page-template-page-legacy-hltsad,
body.page-template-page-hltsad-alt,
body.post-template-single-hltsad-story{
	--legacy-bg: #ffffff;
	--legacy-text: #000000;
	--legacy-accent: #ffb700;
	--legacy-accent-lkaps: #ffce00;
	--legacy-accent-hltsad: #ffbf04;
	--legacy-light: #f5f5f5;
	--legacy-gray: #d9d9d9;
	--legacy-dark-gray: #797979;

	background: var(--legacy-bg) !important;
	background-image: none !important;
	color: var(--legacy-text);
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.5;
	padding: 0 !important;
}

/* Mobile viewport overflow guard across header, main, and footer */
html:has(.legacy-header),
body:has(.legacy-header) {
	overflow-x: clip;
	max-width: 100%;
}

body:has(.legacy-header) * {
	box-sizing: border-box;
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Override parent/global site-blocks top spacing so full-bleed header sits flush */
body.page-template-page-legacy-lkaps .wp-site-blocks,
body.page-template-page-legacy-hltsad .wp-site-blocks,
body.page-template-page-hltsad-alt .wp-site-blocks,
body.page-template-hltsad-alternate-header .wp-site-blocks,
body.post-template-single-hltsad-story .wp-site-blocks {
	padding-top: 0 !important;
	padding-bottom: 0;
	margin-top: 0;
	margin-bottom: 0;
}
/* Scale legacy body copy & medium preset text to a comfortable 20px (1.25rem) */
/* Scale legacy body copy & card typography */
body:has(.legacy-header) .legacy-main,
.editor-styles-wrapper:has(.legacy-header) .legacy-main {
	--wp--preset--font-size--medium: 1.25rem;
	--hltsad-card-title-size: 1.35rem;
	--hltsad-card-excerpt-size: 1.12rem;
}

body:has(.legacy-header) .legacy-main p,
body:has(.legacy-header) .legacy-main li,
body:has(.legacy-header) .legacy-main .has-medium-font-size,
.editor-styles-wrapper:has(.legacy-header) .legacy-main p,
.editor-styles-wrapper:has(.legacy-header) .legacy-main li,
.editor-styles-wrapper:has(.legacy-header) .legacy-main .has-medium-font-size {
	font-size: 1.25rem !important;
	line-height: 1.6;
}



/* Typography Hierarchy: Archivo Black for headings & site title */
body.page-template-page-legacy-lkaps :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title, .legacy-site-title, .legacy-site-title a),
body.page-template-page-legacy-hltsad :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title, .legacy-site-title, .legacy-site-title a),
body.page-template-page-hltsad-alt :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title, .legacy-site-title, .legacy-site-title a),
body.post-template-single-hltsad-story :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title, .legacy-site-title, .legacy-site-title a){
	font-family: var(--wp--preset--font-family--archivo-black, "Archivo Black", sans-serif);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--legacy-text);
}

body.page-template-page-legacy-lkaps h1,
body.page-template-page-legacy-hltsad h1,
body.page-template-page-legacy-lkaps .wp-block-post-title,
body.page-template-page-legacy-hltsad .wp-block-post-title {
	font-size: clamp(2.25rem, 5vw, 4rem);
}

body.page-template-page-legacy-lkaps h2,
body.page-template-page-legacy-hltsad h2 {
	font-size: clamp(1.75rem, 3.5vw, 2.8rem);
}

body.page-template-page-legacy-lkaps h3,
body.page-template-page-legacy-hltsad h3 {
	font-size: clamp(1.375rem, 2.5vw, 2.2rem);
}

body.page-template-page-legacy-lkaps h4,
body.page-template-page-legacy-hltsad h4 {
	font-size: clamp(1.125rem, 2vw, 1.6rem);
}

/* Main Content Area */
body.page-template-page-legacy-lkaps .legacy-main,
body.page-template-page-legacy-hltsad .legacy-main {
	padding-left: var(--wp--preset--spacing--30) !important;
	padding-right: var(--wp--preset--spacing--30) !important;
}

body.page-template-page-legacy-lkaps .legacy-main a:not(.wp-block-button__link),
body.page-template-page-legacy-hltsad .legacy-main a:not(.wp-block-button__link),
body.page-template-page-hltsad-alt .legacy-main a:not(.wp-block-button__link){
	color: var(--legacy-accent);
	text-decoration: underline;
	text-decoration-color: var(--legacy-accent);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 2px;
}

body.page-template-page-legacy-lkaps .legacy-main a:not(.wp-block-button__link):hover,
body.page-template-page-legacy-hltsad .legacy-main a:not(.wp-block-button__link):hover,
body.page-template-page-hltsad-alt .legacy-main a:not(.wp-block-button__link),
body.post-template-single-hltsad-story .legacy-main a:not(.wp-block-button__link),
body.post-template-single-hltsad-story .legacy-main a:not(.wp-block-button__link):hover{
	color: var(--legacy-accent);
}

/* Buttons: Override main site's pastel gradient pill buttons with legacy CTA styling */
body.page-template-page-legacy-lkaps .wp-block-button__link,
body.page-template-page-legacy-hltsad .wp-block-button__link,
body:has(.legacy-header) .wp-block-button__link,
body.page-template-page-legacy-lkaps .wp-element-button,
body.page-template-page-legacy-hltsad .wp-element-button,
body:has(.legacy-header) .wp-element-button {
	background-color: var(--legacy-accent) !important;
	background-image: none !important;
	color: var(--legacy-text) !important;
	border: 2px solid var(--legacy-accent) !important;
	border-radius: 25px !important;
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	text-transform: uppercase;
	padding: 0.9em 1.6em;
	transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

body.page-template-page-legacy-lkaps .wp-block-button__link:hover,
body.page-template-page-legacy-hltsad .wp-block-button__link:hover,
body:has(.legacy-header) .wp-block-button__link:hover,
body.page-template-page-legacy-lkaps .wp-element-button:hover,
body.page-template-page-legacy-hltsad .wp-element-button:hover,
body:has(.legacy-header) .wp-element-button:hover {
	background-color: var(--legacy-accent) !important;
	background-image: none !important;
	opacity: 0.85;
}

/* Outline button variant (e.g., Donate button with .is-style-outline) */
body:has(.legacy-header) .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	background-image: none !important;
	color: var(--legacy-text) !important;
	border: 2px solid var(--legacy-accent) !important;
	border-radius: 25px !important;
}

body:has(.legacy-header) .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--legacy-accent) !important;
	color: var(--legacy-text) !important;
	opacity: 1;
}

/* Header Navigation */
body.page-template-page-legacy-lkaps .legacy-header--lkaps {
	background-color: var(--legacy-accent-lkaps);
}

body.page-template-page-legacy-hltsad .legacy-header--hltsad {
	background-color: var(--legacy-accent-hltsad);
}

body.page-template-page-legacy-lkaps .legacy-header .wp-block-navigation,
body.page-template-page-legacy-hltsad .legacy-header .wp-block-navigation {
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: none;
}

body.page-template-page-legacy-lkaps .legacy-header .wp-block-navigation-item__content,
body.page-template-page-legacy-hltsad .legacy-header .wp-block-navigation-item__content {
	color: var(--legacy-text);
	text-decoration: none;
}

body.page-template-page-legacy-lkaps .legacy-header .wp-block-navigation-item__content:hover,
body.page-template-page-legacy-hltsad .legacy-header .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* Footer */
body.page-template-page-legacy-lkaps .legacy-footer--lkaps {
	background-color: var(--legacy-light);
	color: var(--legacy-text);
	font-size: 0.95rem;
	text-transform: none;
}

body.page-template-page-legacy-lkaps .legacy-footer--lkaps a,
body:has(.legacy-header) .legacy-footer--lkaps a,
.editor-styles-wrapper .legacy-footer--lkaps a {
	color: var(--legacy-accent, #ffb700);
	text-decoration: underline;
}

body.page-template-page-legacy-hltsad .legacy-footer--hltsad {
	background-color: #797979;
	color: #ffffff;
	font-size: 0.95rem;
	text-transform: none;
}

body.page-template-page-legacy-hltsad .legacy-footer--hltsad a {
	color: var(--legacy-accent, #ffb700);
	text-decoration: underline;
}

/* ==========================================================================
   Legacy Squarespace Archive Templates: Background & Edge-to-Edge Reset
   Scoped strictly to page-legacy-hltsad, page-legacy-lkaps, or :has(.legacy-header)
   ========================================================================== */
body.page-template-page-legacy-hltsad,
body.page-template-page-legacy-lkaps,
body:has(.legacy-header),
.editor-styles-wrapper:has(.legacy-header),
body.page-template-page-legacy-hltsad .wp-site-blocks,
body.page-template-page-legacy-lkaps .wp-site-blocks,
body:has(.legacy-header) .wp-site-blocks {
  --wp--style--root--padding-top: 0px !important;
 /* --wp--style--root--padding-right: 0px !important; */
  --wp--style--root--padding-bottom: 0px !important;
 /* --wp--style--root--padding-left: 0px !important; */
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.page-template-page-legacy-hltsad .wp-site-blocks.has-global-padding,
body.page-template-page-legacy-lkaps .wp-site-blocks.has-global-padding,
body:has(.legacy-header) .wp-site-blocks.has-global-padding {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.page-template-page-legacy-hltsad .wp-site-blocks > *,
body.page-template-page-legacy-lkaps .wp-site-blocks > *,
body:has(.legacy-header) .wp-site-blocks > *,
body.page-template-page-legacy-hltsad .wp-site-blocks > * + *,
body.page-template-page-legacy-lkaps .wp-site-blocks > * + *,
body:has(.legacy-header) .wp-site-blocks > * + *,
.editor-styles-wrapper:has(.legacy-header) .is-root-container > *:first-child,
header.wp-block-template-part:has(.legacy-header),
.legacy-header {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

body.page-template-page-legacy-hltsad .legacy-main,
body.page-template-page-legacy-lkaps .legacy-main,
body:has(.legacy-header) .legacy-main {
  padding: 0 !important;
  margin: 0 !important;
}

/* Remove theme.json blockGap (1em) between top-level sections on legacy pages */
body.page-template-page-legacy-hltsad .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns),
body.page-template-page-legacy-lkaps .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns),
body:has(.legacy-header) .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns),
body.page-template-page-legacy-hltsad .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns) + *,
body.page-template-page-legacy-lkaps .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns) + *,
body:has(.legacy-header) .legacy-main .wp-block-post-content > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns) + *,
.editor-styles-wrapper:has(.legacy-header) .is-root-container > :is(.alignfull, .wp-block-group, .wp-block-cover, .wp-block-media-text, .wp-block-columns) {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Constrain Medium RSS images & figures inside the Group block */
.hltsad-medium-post figure {
  margin: 2rem 0;
  max-width: 100%;
}

.hltsad-medium-post img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.hltsad-medium-post figcaption {
  font-size: 0.875rem;
  opacity: 0.8;
  text-align: center;
  margin-top: 0.5rem;
}

/* Style Medium's blockquotes (like the 1981 CDC MMWR report) */
.hltsad-medium-post blockquote {
	border-left: none;
	border-top: 1px solid var(--legacy-gray, #d9d9d9);
	border-bottom: 1px solid var(--legacy-gray, #d9d9d9);
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
	font-size: 1.4375rem; /* 23px */
	font-style: italic;
	line-height: 1.55;
	opacity: 0.9;
}
.hltsad-medium-post blockquote p {
	font-size: inherit;
	font-style: inherit;
	line-height: inherit;
	margin: 0;
}

/* Tighten paragraph and heading rhythm */
.hltsad-medium-post h3,
.hltsad-medium-post h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.hltsad-medium-post p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.hltsad-mmwr-accordion {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;

}

.hltsad-mmwr-accordion summary {
  cursor: pointer;
  padding: 0.25rem 0;
}

.hltsad-mmwr-accordion[open] summary {
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.75rem;
}

.hltsad-medium-post blockquote.hltsad-archival-quote {
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.7;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
}
/* Make the text and italicized terms inside the MMWR accordion smaller (15px) */
body:has(.legacy-header) .legacy-main .hltsad-mmwr-accordion p,
body:has(.legacy-header) .legacy-main .hltsad-mmwr-accordion p em,
body:has(.legacy-header) .legacy-main .hltsad-mmwr-accordion li,
body:has(.legacy-header) .legacy-main .hltsad-mmwr-accordion li em {
	font-size: 0.9375rem !important;
	line-height: 1.65 !important;
}



/* Single HLTSAD Story metadata, Prev/Next nav, and Related Posts grid */
body:has(.legacy-header) .hltsad-story-title {
	margin-bottom: 0.35rem;
}

body:has(.legacy-header) .hltsad-story-date {
	font-size: 0.95rem;
	opacity: 0.75;
	margin-bottom: 2rem;
	font-style:italic;
}

body:has(.legacy-header) .hltsad-post-nav {
	gap: 1rem;
	font-weight: 600;
}
body:has(.legacy-header) .hltsad-related-grid .wp-block-post {
	background: #f8f8f8;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	padding: 0 0 1.25rem 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

body:has(.legacy-header) .hltsad-related-grid .wp-block-post-featured-image {
	width: 100%;
	margin: 0 0 1rem 0;
}

body:has(.legacy-header) .hltsad-related-grid .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

/* Pad everything inside the card except the full-bleed featured image */
body:has(.legacy-header) .hltsad-related-grid .wp-block-post > :not(.wp-block-post-featured-image) {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

/* HLTSAD Archive Grid Cards */
.hltsad-archive-grid > ul.wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 1.5rem !important;
	list-style: none !important;
	padding-left: 0 !important;
	margin: 1.5rem 0 !important;
}

.hltsad-archive-grid .wp-block-post-template > li.wp-block-post {
	display: flex;
}

.hltsad-archive-grid .hltsad-card {
	width: 100%;
	background-color: #f8f8f8;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	overflow: hidden;
	gap: 0 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hltsad-archive-grid .wp-block-post:hover .hltsad-card,
.hltsad-archive-grid .hltsad-card:hover {
	transform: translateY(-3px);
	border-color: var(--legacy-accent-hltsad, #ffbf04) !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.hltsad-archive-grid .hltsad-card .wp-block-post-featured-image {
	width: 100%;
	background-color: #111111;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.hltsad-archive-grid .hltsad-card__body {
	flex: 1 1 auto;
	align-items: flex-start !important;
	text-align: left !important;
	gap: 0.45rem !important;
	padding: 1rem 1.25rem 1.25rem !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-date {
	margin: 0 !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-title {
	font-size: 1.15rem !important;
	line-height: 1.35 !important;
	text-transform: none !important;
	margin: 0 !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-title a {
	color: #000000 !important;
	text-decoration: none !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-title a:hover {
	text-decoration: underline !important;
	text-decoration-color: var(--legacy-accent-hltsad, #ffbf04) !important;
	text-decoration-thickness: 2px;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-excerpt {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	margin: 0 !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-excerpt__excerpt {
	font-size: 0.95rem !important;
	line-height: 1.5 !important;
	margin-top: 0.25rem !important;
	margin-bottom: 0.75rem !important;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	margin-bottom: 0;
}

.hltsad-archive-grid .hltsad-card .wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: 0 !important;
	font-weight: 700;
	font-size: 0.9rem;
	color: #000000 !important;
	border-bottom: 2px solid var(--legacy-accent-hltsad, #ffbf04);
	text-decoration: none !important;
}

/* Tablets (601px–900px): 2-column grid for both archive and Medium feed */
@media (min-width: 601px) and (max-width: 900px) {
	.hltsad-archive-grid > ul.wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* Phones (<= 600px): stack archive cards in 1 column, hide Medium feed */
@media (max-width: 600px) {
	.hltsad-archive-grid > ul.wp-block-post-template {
		grid-template-columns: 1fr !important;
	}

	.lkaps-medium-feed {
		display: none !important;
	}
}