/*
 * Shared mobile finishing layer. Content-specific components keep their data
 * and behaviour; this file only makes comparable interactive surfaces read as
 * one product on small screens.
 */

:where(.ke-discovery-navigation__primary,.ke-card-grid .wp-block-post a,.ke-guide-card a,.ke-goodie-card a):focus-visible {
	outline:2px solid var(--ke-orange);
	outline-offset:3px;
}

.ke-discovery-navigation__primary {
	border-radius:var(--ke-card-radius);
}

.ke-discovery-navigation__primary:focus-visible,
.ke-discovery-navigation__primary:hover {
	background:var(--ke-soft);
}

.ke-place-explorer__quick a,
.ke-place-explorer__active a,
.ke-account__tabs a,
.ke-account__company-tabs a {
	transition:border-color .16s ease,background-color .16s ease,color .16s ease;
}

@media (max-width:599px) {
	/* Archive cards become one complete, readable object. This also fixes
	 * taxonomy result lists which had inherited a narrow two-column grid. */
	.ke-card-grid .wp-block-post-template {
		grid-template-columns:1fr;
		gap:.9rem;
	}
	.ke-card-grid .wp-block-post {
		overflow:hidden;
		padding:0 0 .9rem;
		border:1px solid var(--ke-hairline);
		border-radius:var(--ke-card-radius);
		background:var(--ke-paper);
	}
	.ke-card-grid .wp-block-post-featured-image {
		aspect-ratio:16 / 9;
		margin:0 0 .78rem;
		background:var(--ke-soft);
	}
	.ke-card-grid .wp-block-post-featured-image img {
		display:block;
		width:100%;
		height:100%;
		object-fit:cover;
	}
	.ke-card-grid .wp-block-post-title,
	.ke-card-grid .wp-block-post-excerpt,
	.ke-card-grid .ke-place-card-meta {
		margin-right:.9rem;
		margin-left:.9rem;
		padding:0;
	}
	.ke-card-grid .wp-block-post-title { font-size:1.13rem; }
	.ke-card-grid .wp-block-post-excerpt { max-width:56ch; font-size:.88rem; }
	.ke-card-grid .ke-place-card-meta { font-size:.65rem; }

	/* Explorer cards already own their markup; retain the full-card link while
	 * making image, text and metadata breathe like the shared archive cards. */
	.ke-place-explorer { padding:1.45rem 0 2.5rem; }
	.ke-place-explorer__intro h1 { font-size:clamp(2rem,10vw,2.65rem); }
	.ke-place-explorer__cards .wp-block-post-featured-image { aspect-ratio:16 / 9; }
	.ke-place-explorer__cards .wp-block-post-title { margin:.8rem .9rem .22rem; font-size:1.2rem; }
	.ke-place-explorer__cards .ke-place-card-meta { margin:0 .9rem .5rem; }
	.ke-place-explorer__cards .wp-block-post-excerpt__excerpt { margin:0 .9rem .8rem; font-size:.92rem; }
	.ke-place-explorer__tags { margin:0 .9rem .9rem; }
	.ke-place-explorer__quick a,
	.ke-place-explorer__active a { min-height:2.65rem; padding:.38rem .65rem; }
	.ke-place-explorer__filter-actions { gap:.7rem; }

	/* Personal cards use the same generous, single-content-axis pattern. */
	.ke-personal-card-grid { grid-template-columns:1fr; gap:.75rem; }
	.ke-personal-card { min-height:0; }
	.ke-personal-card>a { display:grid; grid-template-columns:minmax(7.25rem,.48fr) minmax(0,1fr); align-items:stretch; }
	.ke-personal-card__image { aspect-ratio:auto; min-height:6.4rem; }
	.ke-personal-card>a>span:last-child { align-content:center; padding:.75rem .85rem; }
	.ke-personal-card-grid--editable .ke-personal-card>a { grid-template-columns:minmax(6.6rem,.42fr) minmax(0,1fr); }
	.ke-personal-dashboard { margin:1rem 0; }
	.ke-personal-section { margin:1rem 0; }

	/* Controls retain their separate role from content cards and get reliable
	 * touch targets without turning ordinary text links into buttons. */
	.ke-account__tabs a { min-height:44px; }
	.ke-account__company-tabs a { min-height:42px; }
	.ke-event-card__link { width:2.75rem; height:2.75rem; }
}

@media (min-width:600px) and (max-width:899px) {
	.ke-card-grid .wp-block-post-template { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
