/* ================================================================
   HARCHI KOLO — Compact Desktop System 1.0
   Global foundation for 1025–1399px only.

   SAFETY CONTRACT
   1) every rule is inside the approved media range;
   2) every rule also requires html.hk-compact-desktop;
   3) mobile <=1024px and standard desktop >=1400px are therefore isolated.
   ================================================================ */
@media (min-width: 1025px) and (max-width: 1399px) {
	html.hk-compact-desktop body {
		--hk-cd-max: 1240px;
		--hk-cd-gutter: 18px;
		--hk-cd-gap: 18px;
		--hk-cd-section-gap: 20px;
		--hk-cd-radius: 16px;
		--hk-cd-control-height: 42px;
	}

	/* One centered content axis for ordinary pages. Full-bleed branded sections
	 * keep their own module geometry and are not forced into this container. */
	html.hk-compact-desktop body :is(.site-main, #main) > .ct-container {
		width: min(calc(100% - (var(--hk-cd-gutter) * 2)), var(--hk-cd-max)) !important;
		max-width: var(--hk-cd-max) !important;
		margin-right: auto !important;
		margin-left: auto !important;
	}

	/* Prevent grid/flex children from producing horizontal overflow on 1366px. */
	html.hk-compact-desktop body main :is(.hp-page, .hp-page__content, .hp-page__sidebar, .hp-row, .hp-col, .elementor-widget-container) {
		min-width: 0;
	}

	html.hk-compact-desktop body main :is(img, video, iframe) {
		max-width: 100%;
	}

	/* Compact typography baseline. Module-specific brand headings may override it. */
	html.hk-compact-desktop body main h1 {
		font-size: clamp(31px, 2.8vw, 40px);
		line-height: 1.08;
	}

	html.hk-compact-desktop body main h2 {
		font-size: clamp(25px, 2.2vw, 32px);
		line-height: 1.12;
	}

	html.hk-compact-desktop body main h3 {
		font-size: clamp(19px, 1.65vw, 24px);
		line-height: 1.18;
	}

	/* Shared form density. No widths are forced, only control rhythm. */
	html.hk-compact-desktop body main :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
		max-width: 100%;
		font-size: 14px;
	}

	html.hk-compact-desktop body main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) {
		min-height: var(--hk-cd-control-height);
	}

	html.hk-compact-desktop body main textarea {
		min-height: 108px;
	}

	html.hk-compact-desktop body main :is(.hp-form__field, .hk-field, .form-field) {
		margin-bottom: 14px;
	}

	/* Tables stay usable instead of widening the entire page. */
	html.hk-compact-desktop body main :is(.wp-block-table, .hp-table, .hk-table) {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	html.hk-compact-desktop body main table {
		font-size: 13px;
	}
}
