/* ==========================================================================
   Health Today — design tokens
   ========================================================================== */

:root {
	--ht-green: #309b65;
	--ht-green-tint: rgba(48, 155, 101, 0.1);
	--ht-navy: #021846;
	--ht-border: #dadada;
	--ht-text: #12101d;
	--ht-ad-cta: #1b9a0a;
	--ht-white: #ffffff;

	/* Lora is the primary heading font (page H1s, section H2s). Playfair
	   Display is used only for the logo wordmark. DM Sans covers body copy,
	   UI, and article-specific headings (single post title + in-body H2s). */
	--ht-font-heading: 'Lora', Georgia, serif;
	--ht-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	--ht-font-logo: 'Playfair Display', Georgia, serif;
	--ht-font-legal-title: 'Lora', Georgia, serif;

	/* Figma: page 1440 wide, 64px gutters → 1312px content area. */
	--ht-container: 1440px;
	--ht-content: 1312px;
	--ht-gutter: 64px;
	--ht-radius-tag: 4px;
	--ht-radius-pill: 999px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--ht-font-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ht-text);
	background: var(--ht-white);
	overflow-x: hidden;
	overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
/* Media/embeds/tables inside post content can never exceed their column. */
.ht-article__content iframe,
.ht-article__content video,
.ht-article__content embed,
.ht-article__content object { max-width: 100%; }
.ht-article__content table { display: block; width: 100%; overflow-x: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--ht-font-heading);
	font-weight: 600;
	margin: 0 0 0.5em;
	line-height: 1.2;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

.ht-main { display: block; width: 100%; overflow-x: hidden; }

.ht-section {
	max-width: var(--ht-container);
	margin: 0 auto;
	padding: 24px var(--ht-gutter);
}

.ht-section__title {
	font-weight: 600;
	font-size: 32px;
	margin-bottom: 24px;
}

/* ==========================================================================
   Buttons & tags
   ========================================================================== */

.ht-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ht-font-body);
	font-weight: 800;
	font-size: 16px;
	padding: 16px 24px;
	border: none;
	border-radius: 0;
	background: var(--ht-green);
	color: var(--ht-white);
	white-space: nowrap;
}
.ht-btn--pill { border-radius: var(--ht-radius-pill); font-weight: 600; }

.ht-tag {
	display: inline-flex;
	align-items: center;
	background: var(--ht-green-tint);
	color: var(--ht-green);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: var(--ht-radius-tag);
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.ht-header {
	background: var(--ht-white);
	border-bottom: 1px solid var(--ht-border);
	position: relative;
	z-index: 100;
}
.ht-header__inner {
	max-width: var(--ht-container);
	margin: 0 auto;
	padding: 24px var(--ht-gutter);
	display: flex;
	align-items: center;
	gap: 40px;
}
.ht-logo {
	font-family: var(--ht-font-logo);
	font-weight: 700;
	font-size: 30px;
	line-height: 33px;
	text-transform: uppercase;
	color: var(--ht-green);
	white-space: nowrap;
}
.ht-nav { flex: 1; }
.ht-nav__list {
	display: flex;
	align-items: center;
	gap: 40px;
}
.ht-nav__list a {
	font-weight: 600;
	font-size: 15px;
}
.ht-menu-toggle {
	display: none;
	background: none;
	border: none;
	padding: 0;
	margin-left: auto;
	width: 32px;
	height: 32px;
	color: var(--ht-text);
}
.ht-menu-toggle svg { width: 32px; height: 32px; display: block; }
.ht-menu-toggle__close { display: none; }
.ht-menu-toggle[aria-expanded="true"] .ht-menu-toggle__open { display: none; }
.ht-menu-toggle[aria-expanded="true"] .ht-menu-toggle__close { display: block; }

.ht-mobile-nav { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */

.ht-footer {
	background: var(--ht-navy);
	color: var(--ht-white);
	padding: 56px var(--ht-gutter);
}
.ht-footer__main {
	max-width: var(--ht-content);
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
}
.ht-footer__newsletter { width: 500px; max-width: 100%; }
.ht-footer__tagline { color: var(--ht-white); }
.ht-logo--footer { color: var(--ht-white); }
.ht-footer__links {
	display: flex;
	gap: 40px;
	flex: 1;
	justify-content: flex-end;
}
.ht-footer__column { min-width: 140px; }
.ht-footer__heading {
	font-family: var(--ht-font-body);
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 16px;
}
.ht-footer__column ul li { padding: 8px 0; font-size: 14px; }
.ht-footer__social li a { display: flex; align-items: center; gap: 12px; }
.ht-footer__social svg { width: 24px; height: 24px; }

.ht-footer__credits {
	max-width: var(--ht-content);
	margin: 40px auto 0;
}
.ht-footer__divider {
	border: none;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	margin: 0 0 32px;
}
.ht-footer__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	flex-wrap: wrap;
	gap: 12px;
}
.ht-footer__legal { display: flex; gap: 24px; }
.ht-footer__legal a { text-decoration: underline; }

/* ==========================================================================
   Newsletter form (shared: footer + homepage section)
   ========================================================================== */

.ht-newsletter { width: 100%; }
.ht-newsletter__form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ht-newsletter__fields {
	display: flex;
	width: 100%;
}
.ht-newsletter__input {
	flex: 1;
	min-width: 0;
	padding: 16px 24px;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-right: none;
	color: var(--ht-white);
	font-family: var(--ht-font-body);
	font-size: 16px;
}
.ht-newsletter__input::placeholder { color: rgba(255, 255, 255, 0.8); }
.ht-newsletter__fields .ht-btn { width: 161px; flex-shrink: 0; }
.ht-newsletter__disclaimer {
	font-size: 12px;
	color: var(--ht-white);
	margin: 0;
}
.ht-newsletter__disclaimer a { text-decoration: underline; }
.ht-newsletter__notice {
	padding: 12px 16px;
	margin-bottom: 12px;
	border-radius: 4px;
	font-size: 14px;
}
.ht-newsletter__notice--success { background: rgba(48, 155, 101, 0.15); color: var(--ht-green); }
.ht-newsletter__notice--error { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* In-content newsletter: full-width navy card, 600px centered content column
   (Figma 88:23483 — bg #021846, px 56 py 24, inner 600px, gap 32). */
.ht-newsletter-card {
	background: var(--ht-navy);
	color: var(--ht-white);
	padding: 24px 56px;
	display: flex;
	justify-content: center;
	/* White text on the dark navy renders heavier on Apple devices without
	   font-smoothing, making the regular-weight subtitle look bold. Antialiased
	   smoothing renders it crisp/light, matching how Figma displays it. */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.ht-newsletter-card__inner {
	width: 600px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	gap: 32px;
}
.ht-newsletter-card__intro { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.ht-newsletter-card__intro h2 {
	font-family: var(--ht-font-legal-title);
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	margin: 0;
	color: var(--ht-white);
	/* The real heading ("…for the daily newsletter") is ~4px wider than the
	   600px column at 40px, so it wrapped to two lines; the Figma mock only
	   fits one line because its placeholder text drops the "r" ("…fo the…").
	   A hair of negative tracking keeps Figma's 40px while fitting one line. */
	letter-spacing: -0.02em;
}
/* Figma: the subtitle is DM Sans Regular (not bold). */
.ht-newsletter-card__intro p { font-size: 20px; line-height: 1.2; margin: 0; font-weight: 400; }
.ht-newsletter-card .ht-newsletter { display: flex; flex-direction: column; gap: 8px; }
.ht-newsletter-card .ht-newsletter__input { color: var(--ht-white); }

/* ==========================================================================
   Grids
   ========================================================================== */

.ht-grid {
	display: grid;
	gap: 24px;
	margin-bottom: 24px;
	/* Cards in a row share the tallest one's height (grid default stretch), so
	   the grid stays uniform even when one post has a much longer title. The
	   card itself pins its footer to the bottom (see .ht-card__body /
	   .ht-card__footer) so the extra height reads as breathing room above the
	   byline, not an empty gap below it. Long titles are clamped to 2 lines so
	   a single post can't force the whole row tall. */
}
.ht-grid--2col { grid-template-columns: repeat(2, 1fr); }
.ht-grid--3col { grid-template-columns: repeat(3, 1fr); }
.ht-grid--4col { grid-template-columns: repeat(4, 1fr); gap: 40px; }
.ht-grid--team { gap: 40px; }

/* ==========================================================================
   Blog cards (vertical: featured / grid)
   ========================================================================== */

.ht-card {
	background: var(--ht-white);
	border: 2px solid var(--ht-border);
	display: flex;
	flex-direction: column;
	padding-bottom: 24px;
}
.ht-card__image { aspect-ratio: 358 / 221; overflow: hidden; }
.ht-card__image img { width: 100%; height: 100%; object-fit: cover; }
.ht-card__image-placeholder { width: 100%; height: 100%; background: #eee; }
/* Figma blog-post card (88:23466): 24px image→body gap, 16px between the
   meta row / title+excerpt group / footer, 8px between title and excerpt, and
   24px bottom padding. The footer sits directly after the excerpt (no
   push-to-bottom), so cards hug their content instead of opening big gaps. */
/* flex:1 lets the body fill an equal-height card so its footer (margin-top
   auto) can sit at the very bottom, aligned across every card in the row. */
.ht-card__body { padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.ht-card__text { display: flex; flex-direction: column; gap: 8px; }
.ht-card__meta-row { display: flex; align-items: center; justify-content: space-between; }
.ht-card__updated { font-size: 12px; color: var(--ht-text); }
.ht-card__title { font-family: var(--ht-font-body); font-size: 24px; font-weight: 600; line-height: 1.2; margin: 0; }
/* Clamp grid-card titles to 2 lines so a long headline (e.g. the advertorial)
   doesn't tower over its neighbours and break the row's uniform height. */
.ht-card--grid .ht-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* Figma: the large featured/trending card title is Medium (500), not SemiBold. */
.ht-card--featured .ht-card__title { font-weight: 500; }
.ht-card__title a:hover { text-decoration: underline; }
/* Grid card description — clamped to 2 lines to match Figma's card layout. */
.ht-card__excerpt { font-size: 16px; color: var(--ht-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: auto; }
.ht-card__author { display: flex; align-items: center; gap: 8px; }
.ht-card__avatar { border-radius: 50%; object-fit: cover; }
.ht-card__author-name { font-size: 14px; font-weight: 500; }
.ht-card__stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ht-stat { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.ht-stat svg { width: 16px; height: 16px; }

/* ==========================================================================
   Compact horizontal card (trending sidebar)
   ========================================================================== */

/* Bordered frame, 149x171 image flush to the left/top/bottom of the frame,
   24px gap, then a vertically-centered body — matching the Figma card. */
/* Image column fills the full card height (align-items:stretch + a 171px floor),
   so it always covers its frame even if the body wraps taller. */
.ht-card-compact { display: flex; gap: 24px; align-items: stretch; border: 2px solid var(--ht-border); background: var(--ht-white); }
.ht-card-compact + .ht-card-compact { margin-top: 24px; }
.ht-card-compact__image { width: 149px; flex-shrink: 0; min-height: 171px; overflow: hidden; }
.ht-card-compact__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-card-compact__body { display: flex; flex-direction: column; gap: 8px; justify-content: center; flex: 1; min-width: 0; padding-right: 24px; }
/* Category tag hugs its text — never stretches to the body width. */
.ht-card-compact__body .ht-tag { align-self: flex-start; }
.ht-card-compact__title { font-family: var(--ht-font-body); font-weight: 500; font-size: 24px; line-height: 1.4; margin: 0; }
.ht-card-compact__stats { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Trending panel
   ========================================================================== */

.ht-trending { padding-top: 24px; }
.ht-trending__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
/* Grid tracks must be allowed to shrink below their content's intrinsic width
   (default min-width:auto would push the column — and the whole page — wider
   than a narrow phone, then get clipped by .ht-main's overflow-x:hidden). */
.ht-trending__grid > * { min-width: 0; }
.ht-grid > * { min-width: 0; }
.ht-trending__heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.ht-trending__heading svg { width: 44px; height: 44px; color: var(--ht-green); }
.ht-trending__heading h2 { margin: 0; font-weight: 600; font-size: 32px; line-height: 1.4; }

/* Desktop only: the featured card and the trending list are equal height and
   bottom-aligned (Figma). Stretch the two columns, then let the featured
   card's image grow to fill any extra height while its caption stays compact
   at the bottom. Scoped to >=901px because below that the grid is single-column
   and the featured card should keep its normal image aspect ratio. */
@media (min-width: 901px) {
	.ht-trending__grid { align-items: stretch; }
	.ht-trending__featured { display: flex; }
	.ht-trending__featured > .ht-card { width: 100%; }
	.ht-card--featured .ht-card__image-link { display: block; flex: 1 1 auto; min-height: 0; }
	.ht-card--featured .ht-card__image { height: 100%; aspect-ratio: auto; }
	.ht-card--featured .ht-card__body { flex: 0 0 auto; }
}

/* ==========================================================================
   Ad banner
   ========================================================================== */

.ht-ad-banner {
	position: relative;
	background: linear-gradient(179deg, #ffe1da 16%, #ffd9d1 39%, #ffc1a7 97%);
	overflow: hidden;
	min-height: 250px;
	display: flex;
	align-items: center;
}
.ht-ad-banner__collage {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
/* Desktop before/after photo positions per Figma 88:23448 (Card, 1312x250):
   image204 (before) x=599.85 w=146.97, image205 (after) x=789.81 w=178.68 —
   percentages below are those figures relative to the 1312px card width. */
.ht-ad-banner__photo {
	position: absolute;
	top: 0;
	height: 100%;
}
.ht-ad-banner__photo img { width: 100%; height: 100%; object-fit: cover; }
.ht-ad-banner__photo--before { left: 45.72%; width: 11.2%; max-width: 147px; }
.ht-ad-banner__photo--after { left: 60.2%; width: 13.62%; max-width: 179px; }
/* Figma's own arrow icon (Vector 248) — a drawn shaft+chevron shape, not a
   text glyph, so it's inlined as SVG rather than a Unicode "→" character
   (which would render differently per-font and never quite match). Position
   from Vector 248: x=714.62, y=93.83 relative to the 1312x250 card. */
.ht-ad-banner__arrow { position: absolute; left: 54.47%; top: 37.53%; z-index: 2; width: 45.5px; line-height: 0; }
.ht-ad-banner__arrow svg { display: block; width: 100%; height: auto; }
.ht-ad-banner__label {
	position: absolute;
	bottom: 18.9%;
	left: 50%;
	transform: translateX(-50%);
	background: var(--ht-white);
	font-weight: 800;
	font-size: 14px;
	text-transform: uppercase;
	padding: 6px 12px;
	white-space: nowrap;
}
.ht-ad-banner__product {
	/* Figma desktop 88:23457: 372x372 square, flush to the right edge, top -15px
	   in the 250px card, so the pouch bleeds off the bottom and only its top
	   (the yellow label) shows — the banner's overflow:hidden does the clipping.
	   %s are relative to the 1312-wide banner. */
	position: absolute;
	left: 71.68%;
	top: -6%;
	right: auto;
	transform: none;
	width: 28.35%;
	max-width: none;
	aspect-ratio: 1;
}
/* Figma uses an alpha-following drop shadow (hugs the pouch shape). A CSS
   box-shadow would follow the rectangular box and draw a stray vertical line
   in the image's transparent left margin, so use filter: drop-shadow instead. */
.ht-ad-banner__product img { width: 100%; height: 100%; object-fit: cover; display: block; filter: drop-shadow(-2px -4px 15px rgba(0, 0, 0, 0.25)); }
.ht-ad-banner__content {
	position: relative;
	z-index: 1;
	padding: 40px 53px;
	max-width: 540px;
}
.ht-ad-banner__heading { font-family: var(--ht-font-body); font-weight: 700; font-size: 40px; line-height: 1.2; color: var(--ht-text); margin-bottom: 24px; }
.ht-ad-banner .ht-btn--pill { background: var(--ht-ad-cta); font-weight: 600; font-size: 18px; padding: 8px 19px; }
/* Full-banner click target: covers the whole banner so a click anywhere follows
   the CTA link (the collage is pointer-events:none, so it doesn't block this). */
.ht-ad-banner__cover { position: absolute; inset: 0; z-index: 3; }

/* ==========================================================================
   Team cards
   ========================================================================== */

.ht-team-card { background: var(--ht-white); }
/* Media = photo + name/title bar stacked vertically, kept together as one
   column so the bar always sits directly below the photo. */
.ht-team-card__media { display: flex; flex-direction: column; }
.ht-team-card__photo { overflow: hidden; }
.ht-team-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-team-card__title-bar { text-align: left; }
.ht-team-card__name { font-family: var(--ht-font-body); font-weight: 600; font-size: 18px; line-height: 1.5; margin: 0; }
.ht-team-card__job-title { font-size: 14px; line-height: 1.5; margin: 0; }

/* Preview (About page, 4-col grid): landscape 298x288 photo, a 24px gap, then
   plain left-aligned name/title — no navy bar. */
.ht-team-card--preview { border: 2px solid var(--ht-border); }
.ht-team-card--preview .ht-team-card__media { gap: 24px; }
.ht-team-card--preview .ht-team-card__photo { aspect-ratio: 298 / 288; }
.ht-team-card--preview .ht-team-card__title-bar { padding: 0 16px 16px; color: var(--ht-text); }

/* Full (Medical Team page): a left media column (portrait 288x306 photo with
   the navy name bar directly below it, flush to the card's bottom frame)
   beside a vertically-centered details column. */
.ht-team-card--full { display: flex; gap: 24px; border: 2px solid var(--ht-border); padding-right: 24px; align-items: center; }
.ht-team-card--full .ht-team-card__media { width: 288px; flex-shrink: 0; align-self: stretch; }
.ht-team-card--full .ht-team-card__photo { aspect-ratio: 288 / 306; }
.ht-team-card--full .ht-team-card__title-bar { flex: 1; background: var(--ht-navy); color: var(--ht-white); padding: 16px; }
.ht-team-card__details { display: flex; flex-direction: column; gap: 24px; padding: 16px 0; flex: 1; }
.ht-team-card__detail-label { font-family: var(--ht-font-body); font-weight: 800; font-size: 18px; text-transform: uppercase; margin-bottom: 4px; }
.ht-team-card__detail-text { font-size: 14px; margin: 0; }
.ht-team-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   About page
   ========================================================================== */

.ht-about-hero__grid { display: flex; gap: 80px; margin-bottom: 24px; }
.ht-about-hero__heading { flex: 1; font-weight: 600; font-size: 48px; }
.ht-about-hero__copy { flex: 1; }
.ht-about-hero__image img { width: 100%; aspect-ratio: 1312 / 607; object-fit: cover; }

.ht-how-we-work {
	background: var(--ht-navy);
	color: var(--ht-white);
	text-align: center;
	max-width: none;
	padding: 40px var(--ht-gutter);
}
.ht-how-we-work h2 { font-weight: 700; font-size: 32px; margin-bottom: 16px; }
.ht-how-we-work p { max-width: 768px; margin: 0 auto; }

.ht-team-preview__intro { display: flex; gap: 80px; margin-bottom: 24px; }
.ht-team-preview__intro h2 { flex: 1; font-weight: 600; font-size: 32px; }
.ht-team-preview__intro p { flex: 1; }
/* About page section CTAs ("View all" under the team preview and under Latest
   Articles): identical size, centered below the grid (Figma). Stretched full
   width on mobile (see the responsive block). */
.ht-view-all { display: flex; width: 280px; max-width: 100%; margin: 24px auto 0; }

/* ==========================================================================
   Team hero (Medical Review Team page)
   ========================================================================== */

.ht-team-hero { text-align: center; padding-top: 40px; }
.ht-team-hero h1 { font-weight: 600; font-size: 48px; }
.ht-team-hero p { max-width: 700px; margin: 0 auto; }

/* ==========================================================================
   Single article / generic page
   ========================================================================== */

/* Article: 600px content column centered (Figma px-420 gutters on 1440). */
.ht-single { padding-top: 8px; }
.ht-page { padding-top: 24px; }
/* Figma article column is a 600px text column; add the gutters on top so the
   readable width is 600px (not 600 minus padding) on desktop. */
.ht-article { max-width: calc(600px + 2 * var(--ht-gutter)); margin: 0 auto; padding: 8px var(--ht-gutter); }

.ht-article__breadcrumb { font-size: 12px; color: #666; padding: 8px 0; }
.ht-article__breadcrumb a:hover { text-decoration: underline; }
.ht-article__breadcrumb-sep { margin: 0 4px; }

.ht-article__header { display: flex; flex-direction: column; gap: 8px; }
.ht-article__eyebrow { display: flex; align-items: center; justify-content: space-between; }
.ht-article__updated { font-size: 12px; color: var(--ht-text); }
.ht-article__title {
	font-family: var(--ht-font-body);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.4;
	margin: 0;
}
.ht-article__meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.ht-article .ht-card__author-name { font-weight: 500; }

.ht-article__hero-image { margin: 16px 0; }
.ht-article__hero-image img { width: 100%; height: auto; }

.ht-article__content { font-size: 14px; line-height: 1.5; color: var(--ht-text); }
.ht-article__content > *:first-child { margin-top: 0; }
.ht-article__content p { margin: 0 0 1em; }
.ht-article__content h2 {
	font-family: var(--ht-font-body);
	font-weight: 700;
	font-size: 32px;
	line-height: 1.2;
	margin: 1.2em 0 0.5em;
}
.ht-article__content h3 { font-family: var(--ht-font-body); font-weight: 700; font-size: 22px; margin: 1.2em 0 0.5em; }
.ht-article__content ul { list-style: disc; padding-left: 21px; margin: 0 0 1em; }
.ht-article__content ul li { margin-bottom: 4px; }
.ht-article__content a { color: #004eba; font-weight: 800; text-decoration: underline; }
.ht-article__content img { margin: 16px 0; width: 100%; height: auto; }
/* Emphasised green pull-quotes / questions (Figma #0a8e4c, DM Sans Bold 18). */
.ht-article__content .ht-highlight { color: #0a8e4c; font-weight: 700; font-size: 18px; line-height: 1.3; }
.ht-article__content .ht-highlight a { color: #0a8e4c; }
/* Full-width green CTA block inside article body. */
.ht-article__content .ht-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ht-green);
	color: var(--ht-white);
	font-weight: 800;
	font-size: 16px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 16px 24px;
	margin: 16px 0;
}

/* Sticky advertorial CTA — fixed to the bottom of the viewport, inset from
   the edges with breathing room on all sides (not full-bleed) at every
   width, matching the floating pill style used elsewhere in the design.
   Hidden once the article's own inline CTA link (.ht-cta, written into the
   post content) scrolls into view — see the IntersectionObserver in main.js
   — so the floating and inline CTAs never show at once.
   Being `position: fixed`, it would otherwise sit on top of whatever content
   scrolls to the bottom of the page (comments, footer, etc.) — reserve space
   for it so nothing renders underneath it. */
.ht-has-sticky-cta { padding-bottom: 96px; }
.ht-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 24px;
	z-index: 100;
	display: flex;
	justify-content: center;
	padding: 0 var(--ht-gutter);
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ht-sticky-cta.is-hidden {
	opacity: 0;
	visibility: hidden;
}
.ht-sticky-cta__btn {
	pointer-events: auto;
	width: 600px;
	max-width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ht-green);
	color: var(--ht-white);
	font-family: var(--ht-font-body);
	font-weight: 800;
	font-size: 16px;
	line-height: 1.5;
	text-transform: uppercase;
	text-decoration: none;
	padding: 16px 24px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.ht-article__footer { margin-top: 24px; }
.ht-article__disclaimer { font-size: 13px; color: #666; font-style: italic; }

/* ==========================================================================
   Legal pages (Terms / Privacy / Cookies)
   ========================================================================== */

.ht-legal-hero {
	background: var(--ht-navy);
	color: var(--ht-white);
	text-align: center;
	padding: 40px var(--ht-gutter);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}
.ht-legal-hero__title {
	font-family: var(--ht-font-legal-title);
	font-weight: 700;
	font-size: 48px;
	margin: 0;
	line-height: 1.2;
}
.ht-legal-hero__meta {
	display: flex;
	gap: 4px;
	width: 600px;
	max-width: 100%;
	font-size: 12px;
	line-height: 1.4;
}
.ht-legal-hero__meta span { flex: 1; }
.ht-legal-hero__intro {
	width: 600px;
	max-width: 100%;
	font-size: 16px;
	line-height: 1.4;
}
.ht-legal-hero__intro p { margin: 0 0 1em; }
.ht-legal-hero__intro p:last-child { margin-bottom: 0; }
.ht-legal-content {
	max-width: calc(600px + 2 * var(--ht-gutter));
	margin: 0 auto;
	padding: 24px var(--ht-gutter) 40px;
}
.ht-legal-content h2 { font-family: var(--ht-font-body); font-weight: 700; font-size: 32px; margin-top: 1.2em; }
.ht-legal-content p { font-size: 16px; line-height: 1.4; }
/* Bullet lists in legal copy — the global `ul { list-style:none }` reset
   would otherwise hide the markers. Matches the article content list style. */
.ht-legal-content ul { list-style: disc; padding-left: 21px; margin: 0 0 1em; }
.ht-legal-content li { font-size: 16px; line-height: 1.4; margin-bottom: 0.5em; }

/* ==========================================================================
   Comments
   ========================================================================== */

.ht-comments { max-width: calc(600px + 2 * var(--ht-gutter)); margin: 8px auto 0; padding: 0 var(--ht-gutter); }
.ht-article__comments { padding-top: 8px; }
.ht-comments__title,
.ht-comment-respond__title { font-family: var(--ht-font-heading); font-weight: 700; font-size: 28px; line-height: 1.2; margin: 0 0 24px; color: var(--ht-text); }

/* Comment list */
.ht-comments__list { list-style: none; margin: 0 0 40px; padding: 0; }
.ht-comments__list .ht-comment { list-style: none; margin: 0 0 24px; }
.ht-comment__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ht-comment__avatar {
	width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
	background: #eef0f2; color: #97a0aa;
	display: inline-flex; align-items: center; justify-content: center;
}
.ht-comment__avatar svg { width: 22px; height: 22px; }
.ht-comment__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ht-comment__author { font-weight: 700; font-size: 16px; color: var(--ht-text); }
.ht-comment__date { font-size: 13px; color: #666; }
.ht-comment__body { background: #f4f4f5; border-radius: 8px; padding: 16px 20px; }
.ht-comment__body p { margin: 0 0 8px; font-size: 16px; line-height: 1.5; color: var(--ht-text); }
.ht-comment__body p:last-child { margin-bottom: 0; }
.ht-comment__moderation { color: #666; }
/* Long comments are collapsed to ~6 lines with a "Read more" toggle. The
   .is-clamped class is added by JS only when the text actually overflows, so
   with JS disabled the full comment is shown (no hidden, unreachable text). */
.ht-comment__text.is-clamped {
	max-height: 9em; /* ~6 lines at 16px/1.5 */
	overflow: hidden;
	-webkit-mask-image: linear-gradient( to bottom, #000 70%, transparent 100% );
	        mask-image: linear-gradient( to bottom, #000 70%, transparent 100% );
}
.ht-comment__toggle {
	margin-top: 8px;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 600;
	color: var(--ht-green);
	cursor: pointer;
}
.ht-comment__toggle:hover { text-decoration: underline; }
.ht-comment__image { display: inline-block; margin-top: 12px; }
.ht-comment__image img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
.ht-comment__reply { margin: 8px 0 0 52px; }
.ht-comment__reply a { font-size: 14px; font-weight: 500; color: var(--ht-green); }
.ht-comment__reply a:hover { text-decoration: underline; }
.ht-comments__list .children { list-style: none; margin: 16px 0 0 52px; padding: 0; }

/* Leave a comment form */
.ht-comment-respond { margin-top: 8px; }
.ht-comment-form { display: flex; flex-direction: column; gap: 16px; }
.ht-comment-form__names { display: flex; gap: 16px; }
.ht-comment-form__names .ht-comment-form__input { flex: 1 1 0; min-width: 0; }
.ht-comment-form__input,
.ht-comment-form__textarea {
	width: 100%; font-family: var(--ht-font-body); font-size: 16px; color: var(--ht-text);
	padding: 16px 20px; border: 1px solid var(--ht-border); border-radius: 0; background: var(--ht-white);
}
.ht-comment-form__textarea { min-height: 150px; resize: vertical; }
.ht-comment-form__input::placeholder,
.ht-comment-form__textarea::placeholder { color: #6b7280; }
.ht-comment-form__input:focus,
.ht-comment-form__textarea:focus { outline: none; border-color: var(--ht-navy); }
/* "Upload image" is a styled label wrapping a hidden file input. */
.ht-comment-form__upload {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 16px; border: 1px solid var(--ht-border); cursor: pointer;
	font-size: 16px; color: var(--ht-text);
}
.ht-comment-form__upload:hover { border-color: var(--ht-navy); }
.ht-comment-form__upload svg { width: 20px; height: 20px; }
.ht-comment-form__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ht-comment-form__consent { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ht-text); cursor: pointer; }
.ht-comment-form__consent input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ht-green); }
.ht-comment-form__submit { width: 100%; text-transform: uppercase; letter-spacing: 0.02em; }
.ht-comments__closed { font-size: 15px; color: #666; }

/* Comment pagination (reuses the article pagination look). */
.comments-pagination { display: flex; gap: 8px; align-items: center; margin: 0 0 40px; }
.comments-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 8px; border-radius: 4px;
	font-size: 13px; font-weight: 500; color: var(--ht-text);
}
.comments-pagination .page-numbers.current { background: var(--ht-green); color: var(--ht-white); }

/* ==========================================================================
   Pagination
   ========================================================================== */

/* Leave room above the heading when AJAX pagination scrolls it into view. */
#latest-articles { scroll-margin-top: 24px; }
/* Brief dim while the next page of articles loads over AJAX. */
.js-latest-grid.is-loading { opacity: 0.45; transition: opacity 0.15s ease; pointer-events: none; }
/* Figma (88:23506): the page-number boxes are grouped together on the left
   with an 8px gap, and the "Page N of M" summary is pushed to the far right.
   Achieved without a wrapper element by gapping the flex row and letting the
   summary claim the remaining space via margin-left:auto. */
.ht-pagination { display: flex; align-items: center; gap: 8px; margin-top: 40px; }
.ht-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	/* Figma: 13px Medium numeral — smaller than the 40px box, giving it room. */
	font-size: 13px;
	font-weight: 500;
	border-radius: 4px;
	color: var(--ht-text);
}
/* Figma: the active page sits in a filled brand-green square, white numeral. */
.ht-pagination .page-numbers.current { background: var(--ht-green); color: var(--ht-white); }
.ht-pagination__summary { margin-left: auto; font-size: 13px; color: #666; }

/* ==========================================================================
   404
   ========================================================================== */

.ht-404__content { text-align: center; padding: 120px var(--ht-gutter); }
.ht-404__content .ht-btn { display: inline-flex; margin-top: 24px; }

/* ==========================================================================
   Responsive — matches Figma's mobile (390px) frames: single-column
   stacking throughout, hamburger nav, stacked newsletter fields.
   ========================================================================== */

@media (max-width: 900px) {
	.ht-trending__grid { grid-template-columns: 1fr; }
	.ht-grid--2col,
	.ht-grid--3col,
	.ht-grid--4col { grid-template-columns: 1fr; }
	.ht-team-card--full { flex-direction: column; align-items: stretch; padding-right: 0; }
	.ht-team-card--full .ht-team-card__media { width: 100%; align-self: auto; }
	.ht-team-card__details { padding: 0 16px 16px; }
	.ht-about-hero__grid,
	.ht-team-preview__intro { flex-direction: column; gap: 24px; }
	/* About hero image goes full-bleed (edge-to-edge) on mobile, cancelling the
	   section gutter, with the taller crop Figma uses (72:15712 is 390x270). */
	.ht-about-hero__image {
		margin-left: calc(-1 * var(--ht-gutter));
		margin-right: calc(-1 * var(--ht-gutter));
	}
	.ht-about-hero__image img { aspect-ratio: 390 / 270; }
	/* "View all" CTAs stretch to the full section width on mobile. */
	.ht-view-all { width: 100%; }
}

/* Hide the Jetpack/WordPress.com post "flair" appended after post content —
   Share this / Like this / Related posts. The design has no such block, and
   the theme renders its own Latest Articles section. Belt-and-suspenders with
   the filters in functions.php in case a WordPress.com setting re-enables one. */
#jp-post-flair,
.sharedaddy,
.jp-relatedposts,
.sd-like,
div.sharedaddy { display: none !important; }

/* Mobile — mirrors Figma's 390px frames: single column, push-down hamburger
   menu (white, 40px gaps, DM Sans SemiBold), stacked newsletter fields. */
@media (max-width: 768px) {
	:root { --ht-gutter: 16px; }

	.ht-header__inner { padding: 8px 16px; gap: 16px; }

	.ht-nav { display: none; }
	.ht-menu-toggle { display: block; }

	.ht-mobile-nav {
		display: block;
		max-height: 0;
		overflow: hidden;
		background: var(--ht-white);
		transition: max-height 0.25s ease;
	}
	.ht-mobile-nav.is-open { max-height: 80vh; }
	.ht-mobile-nav__list {
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 24px 16px;
	}
	.ht-mobile-nav__list a {
		display: inline-block;
		font-family: var(--ht-font-body);
		font-weight: 600;
		font-size: 15px;
		color: #000;
	}

	/* Figma mobile: 8px gap + tight body (149 img + 8 + 201 body = 358). */
	.ht-card-compact { flex-direction: row; gap: 8px; }
	.ht-card-compact__body { padding-right: 8px; }
	/* Figma mobile trending-card title is 18px (desktop stays 24px). */
	.ht-card-compact__title { font-size: 18px; }

	.ht-newsletter-card { padding: 24px 16px; }
	/* Mobile only, per the Figma mobile frame (72:16601): show the heading as a
	   non-bold "$". The real "Sign up for the daily newsletter" text stays in
	   the DOM (SEO / screen readers) but is hidden visually and replaced by the
	   "$" on phones. Desktop keeps the real headline (Figma desktop 88:23486). */
	.ht-newsletter-card__intro h2 { font-size: 0; letter-spacing: 0; }
	.ht-newsletter-card__intro h2::before {
		content: "$";
		display: block;
		font-size: 40px;
		font-weight: 700; /* Figma mobile "$" is bold */
		line-height: 1.2;
	}
	/* Figma mobile (72:16597): stacked form, 16px between input and button and
	   12px before the disclaimer; a compact 12px-padded input with a crisp
	   solid-white 1px border; button with 12px vertical padding. */
	.ht-newsletter__form { gap: 12px; }
	.ht-newsletter__fields { flex-direction: column; gap: 16px; }
	.ht-newsletter__input { border: 1px solid var(--ht-white); padding: 12px; margin-bottom: 0; }

	/* Comment form: stack the name/email inputs on phones. */
	.ht-comment-form__names { flex-direction: column; }
	.ht-newsletter__fields .ht-btn { width: 100%; padding: 12px 24px; }

	.ht-footer__main { flex-direction: column; }
	.ht-footer__links { flex-direction: column; gap: 32px; }
	.ht-footer__row { flex-direction: column; align-items: flex-start; }

	/* Ad banner stacks: heading + button, then the before→after + product
	   image row — an exact overlapping composition per Figma mobile 72:16564
	   (326x133 clipped box; %s are relative to that box). */
	.ht-ad-banner { flex-direction: column; align-items: stretch; min-height: 0; padding: 24px 16px; gap: 32px; }
	.ht-ad-banner__content { order: 1; display: flex; flex-direction: column; gap: 32px; align-items: flex-start; padding: 0; max-width: 100%; }
	.ht-ad-banner__heading { margin: 0; }
	.ht-ad-banner .ht-btn--pill { font-size: 18.5px; padding: 8px 19px; }
	.ht-ad-banner__collage {
		order: 2; position: relative; inset: auto;
		display: block; width: 100%; aspect-ratio: 326 / 133;
		padding: 0; margin: 0; overflow: hidden;
	}
	.ht-ad-banner__photo { position: absolute; top: auto; left: auto; height: auto; max-width: none; }
	.ht-ad-banner__photo img { width: 100%; height: 100%; object-fit: cover; }
	.ht-ad-banner__photo--before { left: 2.26%; top: -2.83%; width: 23.98%; height: 133.2%; }
	.ht-ad-banner__photo--after { left: 33.25%; top: -2.83%; width: 29.15%; height: 127.75%; }
	.ht-ad-banner__arrow { left: 20.5%; top: 28%; width: 24.2px; flex: none; }
	.ht-ad-banner__label { position: absolute; left: 50%; transform: translateX(-50%); bottom: auto; top: 54%; font-size: 9px; padding: 2px 6px; }
	.ht-ad-banner__product {
		display: block; position: absolute; left: 52.93%; top: -6%; right: auto; transform: none;
		width: 60.68%; aspect-ratio: 1; height: auto; max-width: none;
	}
	.ht-ad-banner__product img { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(-1px -2px 8px rgba(0, 0, 0, 0.25)); }

	/* Page hero titles use the Figma mobile --h1 (40px); section titles stay at
	   the desktop 32px (--h2); legal section headings use --h3 (24px). */
	.ht-about-hero__heading, .ht-legal-hero__title, .ht-team-hero h1 {
		font-size: 40px;
	}
	.ht-legal-content h2 { font-size: 24px; }
	.ht-legal-hero__meta { flex-direction: column; gap: 4px; text-align: center; }
	/* Sticky CTA needs no mobile override: --ht-gutter is already 16px here,
	   so the base rule's inset/floating style (Figma-matched) applies as-is. */
}
