/*
 * HRTechnologies — main stylesheet.
 * Implements docs/design-system.md (source of truth).
 * Tokens live in theme.json; these are the component and layout rules.
 * Mobile-first: breakpoints at 768px (tablet), 1024px (desktop), 1280px (wide).
 */

/* ------------------------------------------------------------------
   1. Custom properties (mirroring theme.json palette)
------------------------------------------------------------------ */

:root {
	--ht-bg: #ffffff;
	--ht-surface: #f8fafc;
	--ht-surface-strong: #f1f5f9;
	--ht-text: #14213d;
	--ht-text-muted: #475569;
	--ht-text-subtle: #64748b;
	--ht-border: #e2e8f0;
	--ht-brand: #1f3a5f;
	--ht-brand-hover: #14273f;
	--ht-brand-subtle: #eef2f7;
	--ht-accent: #b5532c;
	--ht-success: #15803d;
	--ht-danger: #b91c1c;
	--ht-focus: #1f3a5f;

	--ht-container: 1240px;
	--ht-article: 720px;
	--ht-radius: 6px;
	--ht-header-h: 64px;
	--ht-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08);
	--ht-shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.1);
	--ht-shadow-menu: 0 8px 24px rgba(15, 23, 42, 0.12);

	--ht-space-1: 8px;
	--ht-space-2: 12px;
	--ht-space-3: 16px;
	--ht-space-4: 24px;
	--ht-space-5: 32px;
	--ht-space-6: 48px;
	--ht-space-7: 64px;
	--ht-space-8: 80px;
	--ht-space-9: 96px;
}

@media (min-width: 1024px) {
	:root {
		--ht-header-h: 72px;
	}
}

/* ------------------------------------------------------------------
   2. Base and resets
------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--ht-bg);
	color: var(--ht-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
	body {
		font-size: 17px;
	}
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--ht-brand);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--ht-brand-hover);
	text-decoration: underline;
}

:focus-visible {
	outline: 2px solid var(--ht-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

hr {
	border: 0;
	border-top: 1px solid var(--ht-border);
	margin: var(--ht-space-6) 0;
}

/* ----------------------------------------------------
   3. Accessibility helpers
------------------------------------------------------------------ */

.ht-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--ht-brand);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 var(--ht-radius) 0;
}

.ht-skip-link:focus {
	left: 0;
	color: #fff;
}

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

.ht-screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

/* ------------------------------------------------------------------
   4. Layout: containers, sections, grids, stacks
------------------------------------------------------------------ */

.ht-container {
	width: 100%;
	max-width: var(--ht-container);
	margin-inline: auto;
	padding-inline: 24px;
}

@media (min-width: 1024px) {
	.ht-container {
		padding-inline: 32px;
	}
}

/* Article reading column */
.ht-article-width {
	width: 100%;
	max-width: var(--ht-article);
	margin-inline: auto;
	padding-inline: 24px;
}

.ht-section {
	padding-block: 48px;
}

@media (min-width: 768px) {
	.ht-section {
		padding-block: 64px;
	}
}

@media (min-width: 1024px) {
	.ht-section {
		padding-block: 96px;
	}
}

.ht-section--tight {
	padding-block: 32px;
}

@media (min-width: 768px) {
	.ht-section--tight {
		padding-block: 48px;
	}
}

@media (min-width: 1024px) {
	.ht-section--tight {
		padding-block: 64px;
	}
}

.ht-section--surface {
	background: var(--ht-surface);
}

/* Hub pages: a light masthead under the header, then full-width sections */
.ht-page-head {
	background:
		linear-gradient(180deg, var(--ht-brand-subtle) 0, var(--ht-surface) 120px);
	border-bottom: 1px solid var(--ht-border);
	padding-block: 24px 40px;
}

@media (min-width: 768px) {
	.ht-page-head {
		padding-block: 32px 48px;
	}
}

@media (min-width: 1024px) {
	.ht-page-head {
		padding-block: 40px 56px;
	}
}

.ht-page-head .ht-entry-title {
	margin: 0;
	max-width: 820px;
}

/* Decorative band inside hub pages */
.ht-figure {
	margin: 0 0 32px;
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	overflow: hidden;
}

.ht-figure img {
	display: block;
	width: 100%;
	height: auto;
}

/* Hub pages run a wide container for card grids, so prose keeps its own measure */
.ht-entry-content > p,
.ht-entry-content > h2,
.ht-entry-content > h3,
.ht-entry-content > h4,
.ht-entry-content > ul,
.ht-entry-content > ol,
.ht-entry-content > blockquote,
.ht-entry-content > .ht-callout {
	max-width: 760px;
}

/* Core adds a 24px top margin to each top-level block (header, main, footer),
   which opened a white band under the header on every page. */
:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

/* Sections carry their own padding, so block-gap margins between them only
   open white bands (seen above the hiring band and the footer). */
.ht-main > * {
	margin-block: 0;
}

/* Responsive grid: auto-fit, min 280px columns, 24px gap */
.ht-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 640px) {
	.ht-grid {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}
}

.ht-grid > * + * {
	margin-block-start: 0;
}

.ht-grid--2 {
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.ht-grid--2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

.ht-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ht-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* Self-contained space-between so the header row does not depend on core's
   `is-content-justification-*` classes being present */
.ht-row--between {
	justify-content: space-between;
}

/* ------------------------------------------------------------------
   5. Typography helpers
------------------------------------------------------------------ */

.ht-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-accent);
	margin: 0 0 12px;
}

.ht-eyebrow::before {
	content: "";
	width: 24px;
	height: 3px;
	border-radius: 2px;
	background: var(--ht-accent);
	flex-shrink: 0;
}

.ht-section-title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0 0 8px;
}

@media (min-width: 1024px) {
	.ht-section-title {
		font-size: 30px;
	}
}

.ht-section-intro {
	font-size: 17px;
	color: var(--ht-text-muted);
	margin: 0 0 32px;
	max-width: 640px;
}

.ht-meta {
	font-size: 14px;
	color: var(--ht-text-subtle);
}

.ht-deck {
	font-size: 19px;
	line-height: 1.6;
	color: var(--ht-text-muted);
	margin: 0 0 24px;
	max-width: 640px;
}

/* ------------------------------------------------------------------
   6. Buttons
------------------------------------------------------------------ */

.wp-element-button,
.ht-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 10px 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background: var(--ht-brand);
	border: 1px solid var(--ht-brand);
	border-radius: var(--ht-radius);
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.15s ease, border-color 0.15s ease,
		color 0.15s ease;
}

.wp-element-button:hover,
.ht-button:hover {
	background: var(--ht-brand-hover);
	border-color: var(--ht-brand-hover);
	color: #fff;
	text-decoration: none;
}

.wp-element-button:focus-visible,
.ht-button:focus-visible {
	outline: 2px solid var(--ht-focus);
	outline-offset: 2px;
}

.ht-button--lg {
	min-height: 44px;
	padding: 12px 24px;
	font-size: 16px;
}

/* Block markup puts the modifier on the wrapper; spacing belongs on the link
   so the wrapper does not inset the button or show as a stray box */
.wp-block-button.ht-button--lg {
	min-height: 0;
	padding: 0;
}

.ht-button--lg .wp-block-button__link {
	min-height: 44px;
	padding: 12px 24px;
	font-size: 16px;
}

.ht-button--secondary {
	background: var(--ht-bg);
	border-color: var(--ht-border);
	color: var(--ht-text);
}

.ht-button--secondary:hover {
	background: var(--ht-surface);
	border-color: var(--ht-border);
	color: var(--ht-text);
}

/* Block markup puts the variant class on the wrapper, so paint the link, not
   the wrapper — otherwise the wrapper's background shows as a white frame */
.wp-block-button.ht-button--secondary {
	background: transparent;
	border: 0;
	padding: 0;
}

.ht-button--secondary .wp-block-button__link {
	background: var(--ht-bg);
	border: 1px solid var(--ht-border);
	color: var(--ht-text);
}

.ht-button--secondary .wp-block-button__link:hover {
	background: var(--ht-surface);
	border-color: var(--ht-border);
	color: var(--ht-text);
}

.ht-button--ghost {
	background: transparent;
	border-color: transparent;
	color: var(--ht-brand);
	padding-inline: 8px;
}

.ht-button--ghost:hover {
	background: transparent;
	color: var(--ht-brand-hover);
	text-decoration: underline;
}

.ht-button:disabled,
.ht-button[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Core button block: layout we control, so it does not depend on block-library
   load order (and matches editor preview) */
.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.wp-block-buttons .wp-block-button {
	margin: 0;
}

.wp-block-buttons .wp-block-button__link {
	width: 100%;
}

/* Below the tablet breakpoint a button row becomes a stack of full-width
   buttons: easier to hit, and it stops two CTAs fighting for 320px */
@media (max-width: 767px) {
	.wp-block-buttons {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.wp-block-buttons .wp-block-button {
		width: 100%;
	}
}

@media (min-width: 768px) {
	.wp-block-buttons .wp-block-button__link {
		width: auto;
	}
}

/* ------------------------------------------------------------------
   7. Forms (mirrors docs/design-system.md §8)
------------------------------------------------------------------ */

.ht-form label,
.ht-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--ht-text);
	margin-bottom: 6px;
}

.ht-form input:not([type="checkbox"]):not([type="radio"]),
.ht-form select,
.ht-form textarea,
.ht-field input:not([type="checkbox"]):not([type="radio"]),
.ht-field select,
.ht-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ht-text);
	background: var(--ht-bg);
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	transition: border-color 0.15s ease;
}

.ht-form textarea,
.ht-field textarea {
	min-height: 120px;
	resize: vertical;
}

.ht-form input:focus,
.ht-form select:focus,
.ht-form textarea:focus,
.ht-field input:focus,
.ht-field select:focus,
.ht-field textarea:focus {
	border-color: var(--ht-brand);
	outline: 2px solid var(--ht-focus);
	outline-offset: 1px;
}

.ht-form input[aria-invalid="true"],
.ht-form select[aria-invalid="true"],
.ht-form textarea[aria-invalid="true"] {
	border-color: var(--ht-danger);
}

.ht-form__hint {
	display: block;
	font-size: 14px;
	color: var(--ht-text-muted);
	margin-top: 6px;
}

.ht-form__error {
	display: block;
	font-size: 14px;
	color: var(--ht-danger);
	margin-top: 6px;
}

.ht-form__field {
	margin-bottom: 20px;
}

.ht-form__field--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.ht-form__field--checkbox input {
	min-height: auto;
	margin-top: 4px;
	accent-color: var(--ht-brand);
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.ht-form__field--checkbox label {
	margin-bottom: 0;
	font-weight: 400;
	font-size: 15px;
	line-height: 1.5;
}

.ht-form__banner {
	padding: 14px 18px;
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	font-size: 15px;
	margin-bottom: 24px;
}

.ht-form__banner--success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: var(--ht-success);
}

.ht-form__banner--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: var(--ht-danger);
}

.ht-form__submit {
	width: 100%;
	min-height: 44px;
}

@media (min-width: 768px) {
	.ht-form__submit {
		width: auto;
	}
}

/* ------------------------------------------------------------------
   7b. Calculators (docs/wordpress-spec.md §6)
------------------------------------------------------------------ */

.ht-calculator {
	max-width: 760px;
	margin: 40px 0 8px;
}

.ht-calculator__result {
	padding: 24px;
	margin-bottom: 32px;
	background: var(--ht-brand-subtle);
	border: 1px solid #c9d3e0;
	border-radius: var(--ht-radius);
}

.ht-calculator__result-title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ht-brand);
}

.ht-calculator__rows {
	margin: 0;
}

.ht-calculator__row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	align-items: baseline;
	justify-content: space-between;
	padding: 12px 0;
	margin: 0;
	border-bottom: 1px solid #d5dde8;
}

.ht-calculator__row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.ht-calculator__label {
	margin: 0;
	font-size: 15px;
	color: var(--ht-text-muted);
}

.ht-calculator__value {
	margin: 0;
	text-align: right;
	font-weight: 600;
}

.ht-calculator__amount {
	display: block;
	font-size: 17px;
	font-variant-numeric: tabular-nums;
}

.ht-calculator__row--primary .ht-calculator__amount {
	font-size: 26px;
	line-height: 1.25;
	color: var(--ht-brand);
}

.ht-calculator__hint {
	display: block;
	max-width: 340px;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ht-text-subtle);
}

.ht-calculator__form {
	padding: 24px;
	background: var(--ht-surface);
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
}

.ht-calculator__form-title,
.ht-calculator__notes h3 {
	margin: 0 0 16px;
	font-size: 18px;
}

.ht-calculator__input {
	position: relative;
}

.ht-calculator__prefix {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	font-size: 16px;
	color: var(--ht-text-subtle);
	pointer-events: none;
}

.ht-calculator__input input {
	padding-left: 34px;
}

.ht-calculator__notes {
	margin-top: 32px;
	font-size: 15px;
	color: var(--ht-text-muted);
}

.ht-calculator__notes h4 {
	margin: 20px 0 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ht-text);
}

.ht-calculator__notes ul {
	margin: 0 0 16px;
	padding-left: 20px;
}

.ht-calculator__notes li + li {
	margin-top: 6px;
}

.ht-form__field--checkbox {
	flex-wrap: wrap;
}

.ht-form__field--checkbox .ht-form__hint {
	flex-basis: 100%;
	margin-left: 28px;
}

@media (max-width: 600px) {
	.ht-calculator__form {
		padding: 20px 16px;
	}

	.ht-calculator__row {
		flex-direction: column;
		align-items: flex-start;
	}

	.ht-calculator__value {
		text-align: left;
	}

	.ht-calculator__hint {
		max-width: none;
	}
}

/* ------------------------------------------------------------------
   8. Header and navigation (docs/design-system.md §5)
------------------------------------------------------------------ */

.ht-header {
	position: relative;
	z-index: 100;
	background: var(--ht-bg);
	border-bottom: 1px solid var(--ht-border);
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 4px 12px -8px rgba(15, 23, 42, 0.18);
}

.ht-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--ht-header-h);
}

.ht-header__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	text-decoration: none;
}

.ht-header__brand:hover {
	text-decoration: none;
}

/* Site title block renders as p.wp-block-site-title (level:0) */
.ht-header .wp-block-site-title {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0;
	white-space: nowrap;
}

.ht-header .wp-block-site-title a {
	color: var(--ht-text);
	text-decoration: none;
}

.ht-header .wp-block-site-title a:hover {
	color: var(--ht-brand);
	text-decoration: none;
}

.ht-header__brand .custom-logo {
	max-height: 40px;
	width: auto;
}

.ht-header__title::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 8px;
	border-radius: 2px;
	background: var(--ht-accent);
	vertical-align: 1px;
}

.ht-header__title {
	font-size: 20px;
	font-weight: 700;
	color: var(--ht-text);
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.ht-header__brand:hover .ht-header__title {
	color: var(--ht-brand);
}

.ht-nav {
	display: none;
}

@media (min-width: 1024px) {
	.ht-header__inner {
		gap: 48px;
	}

	.ht-nav {
		display: block;
		flex: 1 1 auto;
		margin-left: 40px;
	}

	.ht-nav ul {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.ht-nav li {
		position: relative;
		margin: 0;
	}

	.ht-nav a {
		display: block;
		padding: 8px 12px;
		font-size: 15px;
		font-weight: 500;
		color: var(--ht-text);
		border-radius: var(--ht-radius);
		text-decoration: none;
		white-space: nowrap;
		transition: color 0.15s ease, background-color 0.15s ease;
	}

	.ht-nav a:hover {
		color: var(--ht-brand);
		background: var(--ht-brand-subtle);
		text-decoration: none;
	}

	.ht-nav a[aria-current="page"],
	.ht-nav .current-menu-item > a,
	.ht-nav .current_page_item > a {
		color: var(--ht-brand);
		background: var(--ht-brand-subtle);
	}

	/* Dropdown trigger caret: real menus, page-list fallback, and custom items. */
	.ht-nav li.menu-item-has-children > a::after,
	.ht-nav li.page_item_has_children > a::after,
	.ht-nav li.has-children > a::after {
		content: "";
		display: inline-block;
		width: 0;
		height: 0;
		margin-left: 6px;
		vertical-align: middle;
		border: 4px solid transparent;
		border-top-color: currentColor;
		transform: translateY(2px);
	}

	.ht-nav .sub-menu,
	.ht-nav .children {
		position: absolute;
		top: calc(100% + 4px);
		left: 0;
		display: none;
		min-width: 200px;
		padding: 4px;
		margin: 0;
		list-style: none;
		background: var(--ht-bg);
		border: 1px solid var(--ht-border);
		border-radius: var(--ht-radius);
		box-shadow: var(--ht-shadow-menu);
	}

	.ht-nav li:hover > .sub-menu,
	.ht-nav li:focus-within > .sub-menu,
	.ht-nav li:hover > .children,
	.ht-nav li:focus-within > .children {
		display: block;
	}

	.ht-nav .sub-menu a,
	.ht-nav .children a {
		padding: 8px 12px;
		border-radius: 4px;
		white-space: nowrap;
	}

	.ht-nav .sub-menu a:hover,
	.ht-nav .children a:hover {
		background: var(--ht-surface);
	}
}

/* Tablet landscape and small laptops have to hold up to eight labels plus the
   header CTA. Tighten the nav rather than letting it wrap onto a second line. */
@media (min-width: 1024px) and (max-width: 1279px) {
	.ht-nav ul {
		gap: 0;
	}

	.ht-nav a {
		padding: 8px;
		font-size: 14px;
	}
}

.ht-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.ht-header__cta {
	display: none;
}

/* Core gives .wp-block-button its own display, which wins on equal specificity —
   scope the header CTA so it is genuinely hidden on small screens */
.ht-header .ht-header__cta {
	display: none;
}

@media (min-width: 768px) {
	.ht-header__cta {
		display: inline-flex;
	}

	.ht-header .ht-header__cta {
		display: inline-flex;
	}
}

/* Mobile menu toggle — only shown when html.js (set in <head> before paint)
   confirms JS can control the panel; no-JS users get the open panel instead */
.ht-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	color: var(--ht-text);
	cursor: pointer;
}

html.js .ht-nav-toggle {
	display: inline-flex;
}

@media (min-width: 1024px) {
	.ht-nav-toggle,
	html.js .ht-nav-toggle {
		display: none;
	}
}

.ht-nav-toggle:hover {
	background: var(--ht-surface);
}

.ht-nav-toggle__icon {
	position: relative;
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: background-color 0.15s ease;
}

.ht-nav-toggle__icon::before,
.ht-nav-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease;
}

.ht-nav-toggle__icon::before {
	top: -6px;
}

.ht-nav-toggle__icon::after {
	top: 6px;
}

.ht-nav-toggle[aria-expanded="true"] .ht-nav-toggle__icon {
	background: transparent;
}

.ht-nav-toggle[aria-expanded="true"] .ht-nav-toggle__icon::before {
	transform: translateY(6px) rotate(45deg);
}

.ht-nav-toggle[aria-expanded="true"] .ht-nav-toggle__icon::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav panel — open by default (no-JS fallback); html.js collapses
   it before first paint so there is no flash of the open menu */
.ht-nav--mobile {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--ht-bg);
	border-bottom: 1px solid var(--ht-border);
	box-shadow: var(--ht-shadow-menu);
	max-height: calc(100vh - var(--ht-header-h));
	overflow-y: auto;
}

html.js .ht-nav--mobile:not(.is-open) {
	display: none;
}

@media (min-width: 1024px) {
	.ht-nav--mobile {
		display: none !important;
	}
}

.ht-nav--mobile ul {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.ht-nav--mobile li {
	margin: 0;
}

.ht-nav--mobile a {
	display: block;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 500;
	color: var(--ht-text);
	text-decoration: none;
	min-height: 44px;
	box-sizing: border-box;
}

.ht-nav--mobile a:hover,
.ht-nav--mobile a[aria-current="page"],
.ht-nav--mobile .current-menu-item > a,
.ht-nav--mobile .current_page_item > a {
	background: var(--ht-brand-subtle);
	color: var(--ht-brand);
	text-decoration: none;
}

.ht-nav--mobile .sub-menu a,
.ht-nav--mobile .children a {
	padding-left: 40px;
	font-size: 15px;
	font-weight: 400;
}

.ht-nav--mobile .ht-nav__cta {
	padding: 16px 24px;
	border-top: 1px solid var(--ht-border);
}

/* ------------------------------------------------------------------
   9. Hero (docs/design-system.md §6 — compact, not SaaS)
------------------------------------------------------------------ */

.ht-hero {
	padding-block: 24px 40px;
	background: var(--ht-text);
	border-top: 3px solid var(--ht-accent);
}

.ht-hero .ht-eyebrow {
	color: #e9eef5;
}

.ht-hero .ht-hero__title {
	color: #ffffff;
}

.ht-hero .ht-hero__deck {
	color: #c9d3e0;
}

.ht-hero .wp-element-button {
	background: #ffffff;
	color: var(--ht-text);
	border-color: #ffffff;
}

.ht-hero .wp-element-button:hover {
	background: #e9eef5;
	border-color: #e9eef5;
}

.ht-hero .ht-button--secondary .wp-element-button {
	background: transparent;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.55);
}

.ht-hero .ht-button--secondary .wp-element-button:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: #ffffff;
}

.ht-hero .ht-button--secondary:hover .wp-element-button {
	background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
	.ht-hero {
		padding-block: 32px 48px;
	}
}

@media (min-width: 1024px) {
	.ht-hero {
		padding-block: 40px 64px;
	}
}

.ht-hero__inner {
	max-width: 760px;
}

.ht-hero + .ht-section {
	padding-top: 40px;
}

@media (min-width: 1024px) {
	.ht-hero + .ht-section {
		padding-top: 56px;
	}
}

.ht-hero__title {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
	color: var(--ht-text);
}

@media (min-width: 1024px) {
	.ht-hero__title {
		font-size: 40px;
	}
}

.ht-hero__deck {
	font-size: 17px;
	line-height: 1.65;
	color: var(--ht-text-muted);
	margin: 0 0 28px;
	max-width: 640px;
}

@media (min-width: 1024px) {
	.ht-hero__deck {
		font-size: 19px;
	}
}

.ht-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ------------------------------------------------------------------
   10. Cards (docs/design-system.md §9 — restrained)
------------------------------------------------------------------ */

.ht-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
	background: var(--ht-brand-subtle);
	border: 1px solid var(--ht-border);
	border-top: 3px solid var(--ht-brand);
	border-radius: var(--ht-radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease,
		transform 0.15s ease;
}

a.ht-card {
	color: inherit;
	text-decoration: none;
}

a.ht-card:hover {
	border-color: var(--ht-brand);
	border-top-color: var(--ht-accent);
	background: var(--ht-bg);
	box-shadow: var(--ht-shadow-card);
	transform: translateY(-1px);
	text-decoration: none;
}

a.ht-card:focus-visible {
	outline: 2px solid var(--ht-focus);
	outline-offset: 2px;
}

.ht-card--plain {
	box-shadow: none;
}

.ht-card__eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-accent);
	margin: 0;
}

.ht-card__title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	color: var(--ht-text);
}

/* Card headlines stay in body colour so a grid of cards reads as a directory,
   not a wall of blue links; the colour arrives on hover */
.ht-card__title a {
	color: inherit;
	text-decoration: none;
}

.ht-card__title a:hover {
	color: var(--ht-brand);
	text-decoration: underline;
}

a.ht-card:hover .ht-card__title {
	color: var(--ht-brand);
}

.ht-card__text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ht-text-muted);
	margin: 0;
}

.ht-card__meta {
	font-size: 14px;
	color: var(--ht-text-subtle);
	margin-top: auto;
	padding-top: 8px;
}

.ht-card__link {
	font-size: 15px;
	font-weight: 600;
	margin-top: auto;
	padding-top: 8px;
}

/* ------------------------------------------------------------------
   11. Article / editorial typography (docs/design-system.md §10)
------------------------------------------------------------------ */

.ht-entry-header {
	margin-bottom: 32px;
}

.ht-breadcrumb {
	font-size: 14px;
	color: var(--ht-text-subtle);
	margin-bottom: 16px;
}

.ht-breadcrumb a {
	color: var(--ht-text-muted);
}

.ht-breadcrumb a:hover {
	color: var(--ht-brand);
}

.ht-breadcrumb__sep {
	margin-inline: 6px;
	color: var(--ht-border);
}

.ht-entry-category {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-brand);
	background: var(--ht-brand-subtle);
	padding: 4px 10px;
	border-radius: var(--ht-radius);
	margin-bottom: 16px;
	text-decoration: none;
}

.ht-entry-category:hover {
	background: #d5dde8;
	text-decoration: none;
}

.ht-entry-title {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
	color: var(--ht-text);
}

@media (min-width: 1024px) {
	.ht-entry-title {
		font-size: 40px;
	}
}

.ht-entry-deck {
	font-size: 19px;
	line-height: 1.6;
	color: var(--ht-text-muted);
	margin: 0 0 20px;
}

.ht-entry-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ht-text-subtle);
	margin-bottom: 24px;
}

.ht-entry-byline a {
	color: var(--ht-text-muted);
	font-weight: 500;
}

.ht-entry-byline a:hover {
	color: var(--ht-brand);
}

.ht-entry-byline__sep {
	color: var(--ht-border);
}

.ht-entry-thumb {
	margin-bottom: 32px;
	border-radius: var(--ht-radius);
	overflow: hidden;
}

.ht-entry-thumb img {
	width: 100%;
	border-radius: var(--ht-radius);
}

.ht-entry-thumb figcaption {
	font-size: 14px;
	color: var(--ht-text-subtle);
	padding-top: 8px;
}

/* Author box and reviewed date */
.ht-author {
	margin-top: 40px;
	padding: 24px;
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	background: var(--ht-surface);
}

.wp-block-group.ht-author__head {
	align-items: center;
	gap: 16px;
	margin-bottom: 12px;
}

.ht-author__head .wp-block-avatar,
.ht-author__avatar {
	flex-shrink: 0;
}

.ht-author__head .wp-block-avatar img,
.ht-author__avatar img {
	border-radius: 50%;
	display: block;
}

.ht-author__name {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 2px;
}

.ht-author__name a {
	color: var(--ht-text);
	text-decoration: none;
}

.ht-author__name a:hover {
	color: var(--ht-brand);
}

.wp-block-group.ht-author__meta {
	gap: 6px;
}

.ht-author__bio {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ht-text-muted);
	margin: 0;
}

.ht-search {
	max-width: 520px;
	margin-top: 8px;
}

/* Long-form content inside the 720px reading column */
.ht-entry-content {
	font-size: 17px;
	line-height: 1.7;
}

.ht-entry-content > * {
	margin-block: 0 20px;
}

.ht-entry-content > *:last-child {
	margin-bottom: 0;
}

.ht-entry-content h2 {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin-top: 48px;
	margin-bottom: 16px;
	scroll-margin-top: calc(var(--ht-header-h) + 16px);
}

.ht-entry-content h3 {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	margin-top: 32px;
	margin-bottom: 12px;
	scroll-margin-top: calc(var(--ht-header-h) + 16px);
}

@media (max-width: 767px) {
	.ht-entry-content h2 {
		font-size: 24px;
		margin-top: 32px;
	}

	.ht-entry-content h3 {
		font-size: 20px;
		margin-top: 24px;
	}
}

.ht-entry-content h4 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	margin-top: 24px;
	margin-bottom: 8px;
}

.ht-entry-content ul,
.ht-entry-content ol {
	padding-left: 24px;
	margin-block: 0 20px;
}

.ht-entry-content li {
	margin-bottom: 8px;
}

.ht-entry-content li::marker {
	color: var(--ht-brand);
}

.ht-entry-content blockquote {
	margin: 32px 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--ht-brand);
	font-style: italic;
	color: var(--ht-text-muted);
}

.ht-entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.ht-entry-content pre {
	background: var(--ht-surface-strong);
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	padding: 16px;
	overflow-x: auto;
	font-size: 14px;
}

.ht-entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
		"Liberation Mono", monospace;
	font-size: 0.9em;
	background: var(--ht-surface-strong);
	padding: 2px 6px;
	border-radius: 4px;
}

.ht-entry-content pre code {
	background: none;
	padding: 0;
}

.ht-entry-content .wp-block-table {
	overflow-x: auto;
	display: block;
}

.ht-entry-content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 15px;
}

.ht-entry-content .wp-block-table th,
.ht-entry-content .wp-block-table td {
	border: 1px solid var(--ht-border);
	padding: 10px 14px;
	text-align: left;
}

.ht-entry-content .wp-block-table th {
	background: var(--ht-surface-strong);
	font-weight: 600;
}

.ht-entry-content figure {
	margin-block: 32px;
}

.ht-entry-content figcaption {
	font-size: 14px;
	color: var(--ht-text-subtle);
	padding-top: 8px;
}

.ht-entry-content img {
	border-radius: var(--ht-radius);
}

/* Internal info callout (used for notes, sources, effective dates) */
.ht-callout {
	background: var(--ht-brand-subtle);
	border: 1px solid #d5dde8;
	border-radius: var(--ht-radius);
	padding: 16px 20px;
	font-size: 15px;
	line-height: 1.6;
	margin-block: 24px;
}

.ht-callout strong {
	color: var(--ht-brand);
}

/* Table of contents (inline, restrained) */
.ht-toc {
	border: 1px solid var(--ht-border);
	border-radius: var(--ht-radius);
	padding: 20px 24px;
	margin-block: 32px;
	background: var(--ht-surface);
}

.ht-toc__title {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ht-text-muted);
	margin: 0 0 12px;
}

.ht-toc ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: ht-toc;
}

.ht-toc li {
	margin-bottom: 8px;
}

.ht-toc li:last-child {
	margin-bottom: 0;
}

.ht-toc a {
	font-size: 15px;
	color: var(--ht-text);
}

.ht-toc a:hover {
	color: var(--ht-brand);
}

/* Related articles */
.ht-related {
	border-top: 1px solid var(--ht-border);
	margin-top: 48px;
	padding-top: 32px;
}

/* CTA band */
.ht-cta-band {
	background: var(--ht-brand-subtle);
	border-block: 1px solid #d5dde8;
	border-left: 6px solid var(--ht-accent);
}

.ht-cta-band__inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 768px) {
	.ht-cta-band__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 32px;
	}
}

.ht-cta-band__title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 6px;
}

.ht-cta-band__text {
	font-size: 16px;
	color: var(--ht-text-muted);
	margin: 0;
	max-width: 560px;
}

.ht-cta-band__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	flex-shrink: 0;
}

/* ------------------------------------------------------------------
   12. Ad slots (styling only; rendering is plugin-controlled)
------------------------------------------------------------------ */

.ht-ad-slot {
	margin-block: 32px;
	text-align: center;
	min-height: 0;
}

.ht-ad-slot__label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ht-text-subtle);
	margin-bottom: 8px;
}

.ht-ad-slot__reserver {
	min-height: 280px;
}

/* ------------------------------------------------------------------
   13. Footer (docs/design-system.md §12)
------------------------------------------------------------------ */

.ht-footer {
	background: var(--ht-surface);
	border-top: 3px solid var(--ht-accent);
	padding-top: 40px;
}

@media (min-width: 768px) {
	.ht-footer {
		padding-top: 64px;
	}
}

.ht-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

@media (min-width: 768px) {
	.ht-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.ht-footer__grid {
		grid-template-columns: 2fr 1fr 1fr 1fr;
		gap: 48px;
	}
}

.ht-footer__brand-name,
.ht-footer .wp-block-site-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--ht-text);
	margin: 0 0 8px;
}

.ht-footer .wp-block-site-title a {
	color: var(--ht-text);
	text-decoration: none;
}

.ht-footer .wp-block-site-title a:hover {
	color: var(--ht-brand);
	text-decoration: none;
}

.ht-footer__brand-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ht-text-muted);
	margin: 0;
	max-width: 320px;
}

.ht-footer__heading {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ht-text);
	margin: 0 0 16px;
}

.ht-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ht-footer__links li {
	margin-bottom: 10px;
}

.ht-footer__links a {
	font-size: 15px;
	color: var(--ht-text-muted);
	text-decoration: none;
}

.ht-footer__links a:hover {
	color: var(--ht-brand);
}

.ht-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 32px;
	padding-block: 24px;
	border-top: 1px solid var(--ht-border);
	font-size: 14px;
	color: var(--ht-text-subtle);
}

.ht-footer__bottom a {
	color: var(--ht-text-subtle);
}

.ht-footer__bottom a:hover {
	color: var(--ht-brand);
}

.ht-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

/* ------------------------------------------------------------------
   14. Utility classes
------------------------------------------------------------------ */

.ht-text-center {
	text-align: center;
}

.ht-mt-0 {
	margin-top: 0;
}

.ht-mb-0 {
	margin-bottom: 0;
}

.ht-hidden {
	display: none;
}

/* ------------------------------------------------------------------
   15. Hover and focus states
------------------------------------------------------------------ */

.ht-button,
.wp-element-button {
	transition: background-color 0.15s ease, border-color 0.15s ease,
		color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ht-button:hover,
.wp-element-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px -4px rgba(20, 33, 61, 0.35);
}

.ht-button--secondary:hover,
.ht-button--ghost:hover {
	box-shadow: none;
}

.ht-header .wp-block-site-title a,
.ht-header__brand:hover .ht-header__title {
	transition: color 0.15s ease;
}

.ht-nav a {
	position: relative;
	transition: color 0.15s ease;
}

.ht-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	background: var(--ht-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.ht-nav a:hover::after,
.ht-nav a:focus-visible::after,
.ht-nav a[aria-current="page"]::after {
	transform: scaleX(1);
}

.ht-footer__links a,
.ht-footer__bottom a {
	transition: color 0.15s ease;
}

.ht-footer__links a:hover,
.ht-footer__bottom a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ht-card,
.ht-cta-band {
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.ht-button,
	.wp-element-button,
	.ht-nav a::after,
	.ht-card,
	.ht-nav a {
		transition: none;
	}

	.ht-button:hover,
	.wp-element-button:hover,
	a.ht-card:hover {
		transform: none;
	}
}
