/*
 * HowToMobile — tech portal layout (ShiftDelete-style structure, neutral palette).
 * Override accent: --htm-color-accent
 */

:root {
	--htm-color-bg: #FAFAF9;
	--htm-color-text: #0A0A0A;
	--htm-color-muted: #6B7280;
	--htm-color-border: #E5E7EB;
	--htm-color-accent: #0D6E9E;
	--htm-color-surface: #F3F4F6;
	--htm-color-dark: #111111;
	--htm-color-dark-muted: #9CA3AF;
	--htm-radius: 0px;
	--htm-section-pad: 40px;
	--htm-content-max: 1180px;
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */

body {
	background-color: var(--htm-color-bg);
	color: var(--htm-color-text);
}

/* Responsive images — never serve full-size in layout slots */
img {
	max-width: 100%;
	height: auto;
}

.wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.htm-home {
	margin: 0;
}

/* -------------------------------------------------------------------------
   Header — Search Engine Land style: logo | nav | search | CTA
   ------------------------------------------------------------------------- */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:root {
	--htm-header-blue: #1a6fd4;
	--htm-header-blue-hover: #1558ad;
	--htm-header-green: #2db872;
	--htm-header-text: #2d2d2d;
	--htm-header-muted: #6b7280;
	--htm-header-border: #e5e5e5;
	--htm-header-height: 72px;
	--htm-header-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.htm-header {
	background: #fff;
	border-bottom: 1px solid var(--htm-header-border);
	box-shadow: var(--htm-header-shadow);
	position: relative;
	z-index: 100;
}

/* Strip WP block padding so height stays exact */
.htm-header.wp-block-group,
.htm-header > .wp-block-group,
.htm-header > .wp-block-group > .wp-block-group {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.htm-header__inner,
.htm-header__inner.is-layout-flex {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 0;
	padding: 0;
	min-height: var(--htm-header-height);
	height: var(--htm-header-height);
}

/* Shortcode blocks must not break the single-row flex layout */
.htm-header__inner > .wp-block-shortcode {
	display: contents;
}

/* Logo — two-tone like SEL */
.htm-header__inner.is-layout-flex > .htm-header__logo {
	flex-shrink: 0;
}

.htm-header__logo-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	line-height: 1;
}

.htm-logo__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 6px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-size: 0.5rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	letter-spacing: 0.02em;
	flex-shrink: 0;
}

.htm-logo__text {
	display: inline-flex;
	align-items: baseline;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.htm-logo__primary {
	color: var(--htm-header-blue);
}

.htm-logo__secondary {
	color: var(--htm-header-green);
}

/* Primary navigation — padding-left survives WP margin reset on flex children */
.htm-header__nav {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0 0 0 48px;
}

.htm-header__menu {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.htm-header__menu > li {
	position: relative;
	margin: 0;
	padding: 0;
}

.htm-header__menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--htm-header-text);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	padding: 0;
	height: var(--htm-header-height);
	white-space: nowrap;
	transition: color 0.15s ease;
}

.htm-header__menu > li > a:hover,
.htm-header__menu > li:hover > a {
	color: var(--htm-header-blue);
}

/* Dropdown chevron — only when a submenu is actually rendered */
.htm-header__menu > li.menu-item-has-children:has(> .sub-menu > li) > a::after {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-top: 1px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	flex-shrink: 0;
}

/* Submenu dropdown */
.htm-header__menu .sub-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 200px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--htm-header-border);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 200;
}

.htm-header__menu > li:hover > .sub-menu,
.htm-header__menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.htm-header__menu .sub-menu a {
	display: block;
	padding: 10px 16px;
	color: var(--htm-header-text);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

.htm-header__menu .sub-menu a:hover {
	background: #f5f7fa;
	color: var(--htm-header-blue);
}

/* Right actions: search + CTA */
.htm-header__actions,
.htm-header__inner > .htm-header__actions {
	display: flex !important;
	align-items: center !important;
	flex-shrink: 0;
	gap: 12px;
	margin-left: auto;
	padding-left: 16px;
}

.htm-header-search {
	margin: 0;
}

.htm-header-search .wp-block-search__inside-wrapper {
	display: flex;
	align-items: center;
	border: none;
	background: transparent;
	padding: 0;
	gap: 0;
}

.htm-header-search .wp-block-search__input {
	width: 0;
	min-height: 36px;
	padding: 0;
	border: none;
	border-bottom: 2px solid transparent;
	background: transparent;
	font-size: 0.875rem;
	opacity: 0;
	transition: width 0.2s ease, opacity 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
}

.htm-header-search.is-search-open .wp-block-search__input,
.htm-header-search:focus-within .wp-block-search__input {
	width: 180px;
	padding: 4px 8px;
	opacity: 1;
	border-bottom-color: var(--htm-header-border);
}

.htm-header-search .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: transparent;
	color: var(--htm-header-muted);
	border: none;
	cursor: pointer;
	transition: color 0.15s ease;
}

.htm-header-search .wp-block-search__button:hover {
	color: var(--htm-header-blue);
}

.htm-header-search .wp-block-search__button svg {
	width: 20px;
	height: 20px;
}

/* CTA button */
.htm-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	background: var(--htm-header-blue);
	color: #fff !important;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	border-radius: 4px;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.htm-header__cta:hover {
	background: var(--htm-header-blue-hover);
	color: #fff !important;
}

/* Mobile menu toggle — hidden on desktop */
.htm-header__menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--htm-header-text);
}

.htm-header__menu-toggle-icon {
	display: block;
	width: 20px;
	height: 2px;
	background: currentColor;
	position: relative;
}

.htm-header__menu-toggle-icon::before,
.htm-header__menu-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.htm-header__menu-toggle-icon::before {
	top: -6px;
}

.htm-header__menu-toggle-icon::after {
	top: 6px;
}

/* Desktop — single row like Search Engine Land */
@media (min-width: 1024px) {
	.htm-header__menu {
		display: flex;
	}

	.htm-header__menu-toggle {
		display: none !important;
	}

	.htm-header__nav {
		flex: 1;
		min-width: 0;
		order: 0;
	}

	.htm-header__actions {
		order: 0;
		margin-left: auto;
	}
}

/* Tablet / mobile */
@media (max-width: 1023px) {
	.htm-header__inner {
		flex-wrap: wrap !important;
		height: auto;
		min-height: 60px;
		padding: 8px 0;
	}

	.htm-header__logo {
		margin-right: auto;
	}

	.htm-header__actions {
		order: 2;
		margin-left: 0;
		padding-left: 0;
	}

	.htm-header__nav {
		order: 3;
		flex: 0 0 auto;
		padding-left: 0;
	}

	.htm-header__menu-toggle {
		display: inline-flex;
	}

	.htm-header__menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 12px 20px 20px;
		background: #fff;
		border-bottom: 1px solid var(--htm-header-border);
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
	}

	.htm-header.is-menu-open .htm-header__menu {
		display: flex;
	}

	.htm-header__menu > li > a {
		height: auto;
		padding: 12px 0;
	}

	.htm-header__menu > li.menu-item-has-children:has(> .sub-menu > li) > a::after {
		margin-left: auto;
	}

	.htm-header__menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		padding: 0 0 8px 16px;
		min-width: 0;
	}

	.htm-header__cta {
		padding: 8px 14px;
		font-size: 0.8125rem;
	}
}

@media (max-width: 480px) {
	.htm-logo__text {
		font-size: 1rem;
	}

	.htm-header__logo {
		margin-right: 8px;
	}
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.htm-section {
	padding: var(--htm-section-pad) 0;
}

.htm-section--light {
	background: var(--htm-color-bg);
}

.htm-section--muted {
	background: var(--htm-color-surface);
	border-top: 1px solid var(--htm-color-border);
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-section-heading {
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 24px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.htm-section-heading--bar {
	padding-left: 14px;
	border-left: 4px solid var(--htm-color-accent);
}

.htm-section-heading--bar a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.htm-section-heading--bar a:hover {
	color: var(--htm-color-accent);
}

/* Category sections on homepage */
.htm-category-section__head,
.htm-category-section__head.is-layout-flex,
.htm-category-section__head.wp-block-group {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100%;
	gap: 16px;
	margin-bottom: 24px;
}

.htm-category-section__head .htm-section-heading {
	margin-bottom: 0;
	flex: 0 1 auto;
}

.htm-category-section__more {
	margin: 0 0 0 auto !important;
	flex-shrink: 0;
	text-align: right;
}

.htm-category-section__more a {
	color: var(--htm-color-accent);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.htm-category-section__more a:hover {
	text-decoration: underline;
}

.htm-category-section .htm-card-compact .wp-block-post-date {
	font-size: 0.75rem;
	color: var(--htm-color-muted);
	margin-top: 6px;
}

/* -------------------------------------------------------------------------
   Hero band — dark featured area
   ------------------------------------------------------------------------- */

.htm-hero-band {
	background: var(--htm-color-dark);
	padding: 24px 0 32px;
}

.htm-hero {
	margin: 0;
}

.htm-hero__lead {
	position: relative;
	overflow: hidden;
}

.htm-hero__columns {
	display: flex;
	gap: 40px;
}

.htm-hero__lead .wp-block-post-featured-image,
.htm-hero__lead-link {
	margin: 0;
	display: block;
}

.htm-hero__lead .wp-block-post-featured-image img,
.htm-hero__lead-image,
.htm-hero__lead-link img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.htm-hero__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
}

.htm-hero__overlay .wp-block-post-title {
	color: #fff;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 8px 0 0;
}

.htm-hero__overlay .wp-block-post-title a {
	color: #fff;
	text-decoration: none;
}

.htm-hero__overlay .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

.htm-hero__overlay .wp-block-post-terms,
.htm-hero__overlay .wp-block-post-terms a,
.htm-hero__category {
	color: var(--htm-color-accent);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
}

.htm-hero__overlay .htm-hero__title,
.htm-hero__overlay .htm-hero__title a {
	color: #fff;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 8px 0 0;
	text-decoration: none;
}

.htm-hero__overlay .htm-hero__title a:hover {
	color: var(--htm-color-accent);
}

/* Side stories — horizontal rows */
.htm-hero__side {
	display: flex;
	flex-direction: column;
	gap: 0;
	border-left: 1px solid #2a2a2a;
	padding-left: 24px;
}

.htm-hero__side-item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid #2a2a2a;
}

.htm-hero__side-item:last-child {
	border-bottom: none;
}

.htm-hero__side-text {
	flex: 1;
	min-width: 0;
}

.htm-hero__side-text .wp-block-post-title {
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 6px 0 0;
}

.htm-hero__side-text .wp-block-post-title a {
	color: #fff;
	text-decoration: none;
}

.htm-hero__side-text .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

.htm-hero__side-text .wp-block-post-terms,
.htm-hero__side-text .wp-block-post-terms a,
.htm-hero__side-text .htm-hero__category {
	color: var(--htm-color-accent);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
}

.htm-hero__side-title {
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 6px 0 0;
}

.htm-hero__side-title a {
	color: #fff;
	text-decoration: none;
}

.htm-hero__side-title a:hover {
	color: var(--htm-color-accent);
}

.htm-hero__side-thumb {
	flex-shrink: 0;
	width: 96px;
	display: block;
}

.htm-hero__side-thumb img {
	width: 96px;
	height: 72px;
	object-fit: cover;
	display: block;
}

/* -------------------------------------------------------------------------
   Grids — 4-col top stories, 3-col cards
   ------------------------------------------------------------------------- */

.htm-grid-4,
.wp-block-post-template.htm-grid-4 {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.htm-card-compact .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.htm-card-compact .wp-block-post-title {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35;
	margin-top: 10px;
}

.htm-card-compact .wp-block-post-title a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.htm-card-compact .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

.htm-grid-latest {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.htm-grid-latest .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* -------------------------------------------------------------------------
   Feed list items — thumb left, text right
   ------------------------------------------------------------------------- */

.htm-list-feed {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.htm-feed-2col {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 32px;
}

.htm-feed-item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-feed-item__thumb {
	flex-shrink: 0;
}

.htm-feed-item__thumb img {
	width: 140px;
	height: 90px;
	object-fit: cover;
	display: block;
}

.htm-list-feed .htm-feed-item__thumb img {
	width: 120px;
	height: 80px;
}

.htm-feed-item__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.htm-feed-item__body .wp-block-post-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.htm-feed-item__body .wp-block-post-title a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.htm-feed-item__body .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

.htm-feed-item__body .wp-block-post-date {
	font-size: 0.75rem;
	color: var(--htm-color-muted);
}

/* Highlights featured stack */
.htm-featured-stack {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.htm-card-featured .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.htm-card-featured .wp-block-post-title {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	margin-top: 10px;
}

.htm-card-featured .wp-block-post-title a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.htm-card-featured .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

/* -------------------------------------------------------------------------
   Category labels
   ------------------------------------------------------------------------- */

.is-style-category-label,
.htm-category-label .wp-block-post-terms,
.wp-block-post-terms.is-style-category-label {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--htm-color-accent);
}

.is-style-category-label a,
.wp-block-post-terms.is-style-category-label a {
	color: var(--htm-color-accent);
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Article cards (archive / generic)
   ------------------------------------------------------------------------- */

.is-style-article-card,
.htm-article-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.is-style-article-card .wp-block-post-featured-image img,
.htm-article-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.is-style-article-card .wp-block-post-title,
.htm-article-card .wp-block-post-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.is-style-article-card .wp-block-post-title a,
.htm-article-card .wp-block-post-title a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.is-style-article-card .wp-block-post-title a:hover,
.htm-article-card .wp-block-post-title a:hover {
	color: var(--htm-color-accent);
}

.htm-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--htm-color-muted);
	font-size: 0.75rem;
}

/* -------------------------------------------------------------------------
   Archive
   ------------------------------------------------------------------------- */

.htm-category-featured {
	margin-bottom: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-category-featured .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.htm-category-featured .wp-block-post-title {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 800;
	line-height: 1.15;
	margin-top: 16px;
}

/* Archive / category page */
.htm-archive__inner {
	max-width: var(--htm-content-max);
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

.htm-archive__header {
	margin-bottom: 32px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-archive-title {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 12px;
	padding-left: 14px;
	border-left: 4px solid var(--htm-color-accent);
	letter-spacing: -0.02em;
}

.htm-archive-description {
	color: var(--htm-color-muted);
	font-size: 1.0625rem;
	line-height: 1.65;
	margin: 0;
}

.htm-archive-description:empty {
	display: none;
}

/* Single-column list */
.htm-archive .htm-list-feed,
.htm-archive .htm-list-feed.is-layout-grid,
.htm-archive .wp-block-post-template.htm-list-feed {
	display: flex !important;
	flex-direction: column;
	grid-template-columns: none !important;
	gap: 0;
}

/* Row: thumb left | title + excerpt + date right */
.htm-archive .htm-archive-item,
.htm-archive .htm-archive-item.is-layout-flex,
.htm-archive .htm-feed-item.htm-archive-item {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 20px;
	padding: 24px 0;
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-archive .htm-archive-item:first-child {
	padding-top: 0;
}

/* Featured image block — fixed width on the left */
.htm-archive .htm-feed-item__thumb,
.htm-archive .wp-block-post-featured-image.htm-feed-item__thumb {
	flex: 0 0 220px !important;
	width: 220px !important;
	max-width: 220px !important;
	min-width: 220px;
	margin: 0 !important;
}

.htm-archive .htm-feed-item__thumb img,
.htm-archive .wp-block-post-featured-image.htm-feed-item__thumb img {
	width: 220px !important;
	height: 140px !important;
	max-width: 100%;
	object-fit: cover;
	display: block;
}

.htm-archive .htm-feed-item__body,
.htm-archive .htm-feed-item__body.is-layout-flex {
	flex: 1 1 auto !important;
	min-width: 0;
	width: auto !important;
	max-width: none;
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start;
	gap: 8px;
}

.htm-archive .htm-feed-item__body .wp-block-post-title {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.htm-archive .htm-feed-item__body .wp-block-post-excerpt {
	color: var(--htm-color-muted);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0;
	order: 2;
}

.htm-archive .htm-feed-item__body .wp-block-post-excerpt p {
	margin: 0;
}

.htm-archive .htm-feed-item__body .wp-block-post-date {
	font-size: 0.8125rem;
	color: var(--htm-color-muted);
	margin: 0;
	order: 3;
}

/* -------------------------------------------------------------------------
   Single article
   ------------------------------------------------------------------------- */

.htm-single-layout {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 40px;
	align-items: start;
	padding: 40px 0 48px;
}

.htm-single-content {
	min-width: 0;
	max-width: 750px;
}

.htm-single-header {
	padding: 0 0 20px;
	text-align: left;
}

.htm-single-header .wp-block-post-title {
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	font-weight: 800;
	line-height: 1.1;
	margin: 0;
}

.htm-single-header .wp-block-post-excerpt {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--htm-color-muted);
	margin-top: 12px;
}

.htm-single-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 16px;
	color: var(--htm-color-muted);
	font-size: 0.8125rem;
}

/* Featured image at top of article column */
.htm-single-lead-image {
	margin: 0 0 32px;
}

.htm-single-lead-image img {
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: cover;
	display: block;
}

/* In-article images: content width, left-aligned, not oversized */
.htm-single-content .wp-block-post-content .wp-block-image {
	margin: 1.75em 0;
	text-align: left;
}

.htm-single-content .wp-block-post-content .wp-block-image img {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
}

.htm-single-content .wp-block-post-content .wp-block-image.aligncenter,
.htm-single-content .wp-block-post-content .wp-block-image.alignwide,
.htm-single-content .wp-block-post-content .wp-block-image.alignfull {
	margin-left: 0;
	margin-right: 0;
	max-width: 100%;
	text-align: left;
}

.htm-single-content .wp-block-post-content .wp-block-image.aligncenter img {
	margin-left: 0;
	margin-right: 0;
}

.htm-single-content .wp-block-post-content figure {
	margin-left: 0;
	margin-right: 0;
}

/* -------------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------------- */

.htm-sidebar {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.htm-sidebar-module__title {
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--htm-color-muted);
	margin-bottom: 16px;
	padding-left: 10px;
	border-left: 3px solid var(--htm-color-accent);
}

.htm-sidebar-item {
	display: flex;
	gap: 10px;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--htm-color-border);
}

.htm-sidebar-item:last-child {
	border-bottom: none;
}

.htm-sidebar-item .wp-block-post-featured-image img {
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.htm-sidebar-item .wp-block-post-title {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
}

.htm-sidebar-item .wp-block-post-title a {
	color: var(--htm-color-text);
	text-decoration: none;
}

.htm-ad-slot {
	min-height: 250px;
	border: 1px dashed var(--htm-color-border);
	background: #fff;
}

/* -------------------------------------------------------------------------
   Footer — multi-column dark
   ------------------------------------------------------------------------- */

.htm-footer {
	background: var(--htm-color-dark);
	color: #fff;
	padding: 48px 0 32px;
	margin-top: 0;
}

.htm-footer__columns {
	gap: 32px;
	margin-bottom: 32px;
}

.htm-footer__logo .wp-block-site-title {
	font-size: 1.25rem;
	font-weight: 800;
	text-transform: uppercase;
}

.htm-footer__logo .wp-block-site-title a {
	color: #fff;
	text-decoration: none;
}

.htm-footer__about {
	color: var(--htm-color-dark-muted);
	margin-top: 12px;
	line-height: 1.6;
}

.htm-footer__heading {
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}

.htm-footer__nav .wp-block-navigation-item__content {
	color: var(--htm-color-dark-muted);
	font-size: 0.875rem;
	text-decoration: none;
}

.htm-footer__nav .wp-block-navigation-item__content:hover {
	color: #fff;
}

.htm-footer__categories {
	list-style: none;
	padding: 0;
	margin: 0;
}

.htm-footer__categories li {
	margin-bottom: 8px;
}

.htm-footer__categories a {
	color: var(--htm-color-dark-muted);
	font-size: 0.875rem;
	text-decoration: none;
}

.htm-footer__categories a:hover {
	color: #fff;
}

.htm-footer__divider {
	border-color: #333 !important;
	margin: 24px 0;
	opacity: 1;
}

.htm-footer__copyright {
	color: var(--htm-color-dark-muted);
	font-size: 0.75rem;
	margin: 0;
}

/* -------------------------------------------------------------------------
   Prose
   ------------------------------------------------------------------------- */

.htm-prose,
.wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.htm-prose p,
.wp-block-post-content p {
	margin-bottom: 1.5em;
}

.htm-prose h2,
.wp-block-post-content h2 {
	font-size: 1.625rem;
	font-weight: 800;
	margin-top: 2.25em;
	margin-bottom: 0.85em;
}

.htm-prose h3,
.wp-block-post-content h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-top: 1.75em;
	margin-bottom: 0.65em;
}

.htm-prose a,
.wp-block-post-content a {
	color: var(--htm-color-accent);
}

.htm-prose blockquote,
.wp-block-post-content blockquote {
	border-left: 3px solid var(--htm-color-accent);
	padding-left: 20px;
	margin: 1.75em 0;
	font-style: italic;
}

.htm-prose table,
.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.htm-prose th,
.wp-block-post-content th {
	background: var(--htm-color-surface);
	padding: 10px 14px;
	border: 1px solid var(--htm-color-border);
}

.htm-prose td,
.wp-block-post-content td {
	padding: 10px 14px;
	border: 1px solid var(--htm-color-border);
}

.htm-prose code:not(.wp-block-code),
.wp-block-post-content code:not(.wp-block-code) {
	background: var(--htm-color-surface);
	padding: 2px 5px;
	font-size: 0.9em;
}

.wp-block-code {
	background: #1a1a1a;
	color: #e5e7eb;
	padding: 20px;
	overflow-x: auto;
}

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */

.htm-pagination,
.htm-pagination.is-layout-flex,
.wp-block-query-pagination.htm-pagination {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center !important;
	gap: 8px 16px;
	padding: 40px 0 0;
	border-top: 1px solid var(--htm-color-border);
	margin-top: 24px;
}

.htm-pagination a,
.htm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	padding: 6px 12px;
	color: var(--htm-color-text);
	background: #fff;
	border: 1px solid var(--htm-color-border);
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.htm-pagination a:hover {
	color: var(--htm-color-accent);
	border-color: var(--htm-color-accent);
}

.htm-pagination .page-numbers.current {
	color: #fff;
	background: var(--htm-color-accent);
	border-color: var(--htm-color-accent);
}

.htm-pagination .wp-block-query-pagination-previous,
.htm-pagination .wp-block-query-pagination-next {
	border: none;
	background: transparent;
	min-width: auto;
	padding: 6px 0;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

/* Archive list — mobile: image, title, excerpt, date stacked */
@media (max-width: 782px) {
	.htm-archive .htm-archive-item,
	.htm-archive .htm-archive-item.is-layout-flex,
	.htm-archive .htm-feed-item.htm-archive-item {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 12px;
		padding: 20px 0;
	}

	.htm-archive .htm-feed-item__thumb,
	.htm-archive .wp-block-post-featured-image.htm-feed-item__thumb {
		flex: none !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
	}

	.htm-archive .htm-feed-item__thumb img,
	.htm-archive .wp-block-post-featured-image.htm-feed-item__thumb img {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 16 / 9;
	}

	.htm-archive .htm-feed-item__body,
	.htm-archive .htm-feed-item__body.is-layout-flex {
		width: 100% !important;
		gap: 6px;
	}

	.htm-archive .htm-feed-item__body .wp-block-post-title {
		font-size: 1.0625rem;
	}

	.htm-archive .htm-feed-item__body .wp-block-post-excerpt,
	.htm-archive .htm-feed-item__body .wp-block-post-date {
		order: unset;
	}
}

@media (max-width: 1024px) {
	.htm-grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.htm-grid-latest {
		grid-template-columns: repeat(2, 1fr);
	}

	.htm-feed-2col {
		grid-template-columns: 1fr;
	}

	.htm-hero__side {
		border-left: none;
		padding-left: 0;
		margin-top: 20px;
	}

	.htm-single-layout {
		grid-template-columns: 1fr;
	}

	.htm-sidebar {
		border-top: 1px solid var(--htm-color-border);
		padding-top: 32px;
	}

}

@media (max-width: 782px) {
	.htm-grid-4,
	.htm-grid-latest {
		grid-template-columns: 1fr;
	}

	.htm-hero__columns {
		flex-direction: column;
		gap: 20px;
	}

	.htm-hero-band {
		padding: 16px 0 24px;
	}

	.htm-highlights {
		flex-direction: column;
	}

	.htm-feed-item__thumb img {
		width: 100px;
		height: 68px;
	}

	.htm-footer__columns {
		flex-direction: column;
	}

	.htm-section {
		padding: 28px 0;
	}
}
