/*
 * Thistle Surveying - responsive layer.
 *
 * ADDITIVE ONLY. Every rule in this file sits inside
 * @media (max-width: 1099px) or @media (max-width: 767px).
 * Desktop rendering at >=1100px is never touched from here.
 *
 * Breakpoints, from the design export's responsive.md:
 *   desktop  >= 1100px
 *   tablet   768px - 1099px
 *   mobile   < 768px
 *
 * Section styles ship inline, so overrides use !important with attribute
 * selectors matching the inline values, e.g. [style*="grid-template-columns: repeat(4"].
 * Checked with bin/extract/responsive_check.py at 900 and 390px.
 */

/* =========================================================================
   TABLET AND BELOW (<= 1099px)
   ========================================================================= */
@media (max-width: 1099px) {

	/* ---- Global ---------------------------------------------------------- */

	/* clip, not hidden: hidden would make this a scroll container and break the sticky header. */
	.tsv-site { min-width: 0 !important; overflow-x: clip; }

	.tsv-site img,
	.tsv-site video,
	.tsv-site iframe { max-width: 100%; }

	/* Container gutters 28px -> 20px. */
	.tsv-site [style*="max-width: 1280px"],
	.tsv-site [style*="max-width: 1000px"],
	.tsv-site [style*="padding: 0px 28px"] {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	/* Section rhythm 64-96px -> 56px. */
	.tsv-site section[style*="padding: 64px"],
	.tsv-site section[style*="padding: 72px"],
	.tsv-site section[style*="padding: 80px"],
	.tsv-site section[style*="padding: 96px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 64px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 72px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 74px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 80px"] {
		padding-top: 56px !important;
		padding-bottom: 56px !important;
	}

	/* ---- Grids: fewer columns ------------------------------------------- */

	.tsv-site [style*="grid-template-columns: repeat(5"],
	.tsv-site [style*="grid-template-columns: repeat(6"],
	.tsv-site [style*="grid-template-columns: repeat(7"],
	.tsv-site [style*="grid-template-columns: repeat(8"] {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	.tsv-site [style*="grid-template-columns: repeat(4"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* Two-column splits with uneven or fixed tracks stack (heroes, story panels, sidebars). */
	.tsv-site [style*="grid-template-columns: 1fr 1.02fr 322px"],
	.tsv-site [style*="grid-template-columns: 1.04fr 0.96fr"],
	.tsv-site [style*="grid-template-columns: 1fr 1.08fr"],
	.tsv-site [style*="grid-template-columns: 1fr 1.15fr"],
	.tsv-site [style*="grid-template-columns: 1fr 340px"],
	.tsv-site [style*="grid-template-columns: 1.55fr 1fr"],
	.tsv-site [style*="grid-template-columns: 1.3fr 1fr"],
	.tsv-site [style*="grid-template-columns: 1.15fr 1fr"],
	.tsv-site [style*="grid-template-columns: 0.92fr 1.08fr"],
	.tsv-site [style*="grid-template-columns: 1.12fr 0.88fr"],
	.tsv-site [style*="grid-template-columns: 1.1fr 0.9fr"],
	.tsv-site [style*="grid-template-columns: 1.08fr 0.92fr"],
	.tsv-site [style*="grid-template-columns: 0.82fr 1.18fr"],
	.tsv-site [style*="grid-template-columns: 0.9fr 1.1fr"],
	.tsv-site [style*="grid-template-columns: 0.85fr 1.15fr"],
	.tsv-site [style*="grid-template-columns: 0.72fr 1.28fr"],
	.tsv-site [style*="grid-template-columns: 0.85fr 1px 1.3fr 1px 0.85fr"] {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.tsv-site [style*="grid-template-columns: 0.85fr 0.85fr 1.1fr 1.1fr"],
	.tsv-site [style*="grid-template-columns: auto 1fr 1fr auto"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* Dividers inside stacked three-column bands. */
	.tsv-site [style*="align-self: stretch; width: 1px"] { display: none !important; }

	/* ---- Header ---------------------------------------------------------- */

	.tsv-header > div:first-child { height: 80px !important; }
	.tsv-header > div:first-child > a:first-child img { height: 60px !important; }
	.tsv-header .tsv-nav,
	.tsv-header .tsv-mega { display: none !important; }
	.tsv-header__phone { margin-left: auto; }

	/* ---- Footer ---------------------------------------------------------- */

	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		row-gap: 40px !important;
	}
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] > div:first-child {
		grid-column: 1 / -1;
	}
}

/* =========================================================================
   MOBILE (<= 767px)
   ========================================================================= */
@media (max-width: 767px) {

	/* ---- Global ---------------------------------------------------------- */

	.tsv-site [style*="max-width: 1280px"],
	.tsv-site [style*="max-width: 1000px"],
	.tsv-site [style*="padding: 0px 28px"] {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.tsv-site section[style*="padding: 48px"],
	.tsv-site section[style*="padding: 56px"],
	.tsv-site section[style*="padding: 64px"],
	.tsv-site section[style*="padding: 72px"],
	.tsv-site section[style*="padding: 80px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 48px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 56px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 64px"],
	.tsv-site [style*="max-width: 1280px"][style*="padding: 74px"] {
		padding-top: 40px !important;
		padding-bottom: 40px !important;
	}

	.tsv-site h1 { font-size: 30px !important; line-height: 1.15 !important; }
	.tsv-site h2[style*="clamp("],
	.tsv-site h2[style*="font-size: 3"],
	.tsv-site h2[style*="font-size: 4"] { font-size: 26px !important; }

	/* Every grid is one column unless listed below. */
	.tsv-site [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }

	/* Small repeated items stay two-up. */
	.tsv-site [style*="grid-template-columns: repeat(8"],
	.tsv-site [style*="grid-template-columns: repeat(7"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* Flex rows that must not overflow. */
	.tsv-site [style*="flex-wrap: nowrap"] { flex-wrap: wrap !important; }

	/* Forms: 16px text so iOS does not zoom, 44px tall. */
	.tsv-site input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
	.tsv-site select,
	.tsv-site textarea { font-size: 16px !important; }
	.tsv-site input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
	.tsv-site select { min-height: 44px; }

	/* ---- Header ---------------------------------------------------------- */

	.tsv-header > div:first-child { height: 64px !important; gap: 12px !important; }
	.tsv-header > div:first-child > a:first-child img { height: 48px !important; }
	.tsv-header__phone > span:last-child { display: none !important; }

	/* ---- Footer ---------------------------------------------------------- */

	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 32px !important;
	}
	.tsv-footer [style*="padding: 22px 28px"] {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center;
		gap: 16px !important;
	}
	.tsv-footer [style*="padding: 22px 28px"] > * { flex-wrap: wrap; justify-content: center; }

}

/* =========================================================================
   MOBILE NAVIGATION DRAWER (built by assets/js/navigation.js)
   navigation.js keeps the toggle's hidden attribute set at >= 1100px, so
   nothing here is needed on desktop.
   ========================================================================= */
@media (max-width: 1099px) {

	/* mobile-guide.md section 2: 44x44 hamburger, three 2px lines 22px wide; it becomes the close (x) button. */
	.tsv-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		flex: 0 0 auto;
		margin-left: 4px;
		padding: 0;
		border: 0;
		border-radius: 6px;
		background: transparent;
		color: rgb(13, 13, 13);
		cursor: pointer;
		font-family: inherit;
	}

	.tsv-drawer-open,
	.tsv-drawer-open body { overflow: hidden; }
	/* The header stays visible above the drawer and its backdrop. */
	.tsv-drawer-open .tsv-header { z-index: 2002 !important; }

	.tsv-drawer-backdrop {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 2000;
		background: rgba(13, 13, 13, 0.45);
		opacity: 0;
		transition: opacity .25s ease;
	}
	.tsv-drawer-backdrop.is-open { opacity: 1; }

	.tsv-drawer {
		position: fixed;
		top: 64px;
		right: 0;
		bottom: 0;
		z-index: 2001;
		width: 100%;
		max-width: 400px;
		display: flex;
		flex-direction: column;
		background: rgb(255, 255, 255);
		font-family: Montserrat, sans-serif;
		box-shadow: rgba(0, 0, 0, 0.18) -16px 0 48px;
		transform: translateX(100%);
		transition: transform .25s ease;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.tsv-drawer.is-open { transform: translateX(0); }

	.tsv-drawer__list { list-style: none; margin: 0; padding: 0; }
	.tsv-drawer__item { border-bottom: 1px solid rgb(241, 239, 234); }

	.tsv-drawer__link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 56px;
		padding: 0 16px;
		border: 0;
		background: none;
		color: rgb(13, 13, 13);
		font-family: inherit;
		font-size: 15px;
		font-weight: 600;
		text-align: left;
		text-decoration: none;
		cursor: pointer;
	}
	/* Active page and the open accordion: yellow with the desktop's 2px underline. */
	.tsv-drawer__link[aria-current="page"],
	.tsv-drawer__link.is-current,
	.tsv-drawer__expand[aria-expanded="true"] .tsv-drawer__label { color: rgb(240, 192, 64); }
	.tsv-drawer__link[aria-current="page"],
	.tsv-drawer__link.is-current .tsv-drawer__label,
	.tsv-drawer__expand[aria-expanded="true"] .tsv-drawer__label {
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 6px;
	}
	.tsv-drawer__expand svg { flex: 0 0 auto; width: 44px; transition: transform .2s ease; color: rgb(13, 13, 13); margin-right: -14px; }
	.tsv-drawer__expand[aria-expanded="true"] svg { transform: rotate(180deg); color: rgb(240, 192, 64); }

	.tsv-drawer__sub { padding: 0 16px 12px; background: rgb(250, 249, 246); }
	.tsv-drawer__group { padding-top: 8px; }
	.tsv-drawer__group-title {
		margin: 8px 0 0;
		padding-bottom: 6px;
		border-bottom: 2px solid rgb(240, 192, 64);
		display: inline-block;
		font-size: 13px;
		font-weight: 800;
		letter-spacing: 0.6px;
		text-transform: uppercase;
		color: rgb(13, 13, 13);
	}
	.tsv-drawer__group ul { list-style: none; margin: 0; padding: 0; }
	.tsv-drawer__sublink {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding-left: 16px;
		color: rgb(46, 46, 46);
		font-size: 14px;
		font-weight: 500;
		text-decoration: none;
	}
	.tsv-drawer__overview { padding-left: 0; font-weight: 700; color: rgb(13, 13, 13); }
	.tsv-drawer__service { padding-left: 0; font-weight: 600; color: rgb(13, 13, 13); }
	.tsv-drawer__viewall { color: rgb(201, 150, 14); font-weight: 700; }

	.tsv-drawer__foot {
		position: sticky;
		bottom: 0;
		margin-top: auto;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 16px 16px 20px;
		background: rgb(255, 255, 255);
		border-top: 1px solid rgb(241, 239, 234);
	}
	.tsv-drawer__quote {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		border-radius: 6px;
		background: rgb(31, 138, 76);
		color: rgb(255, 255, 255);
		font-size: 15px;
		font-weight: 700;
		text-decoration: none;
	}
	.tsv-drawer__phone {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		text-decoration: none;
		color: rgb(13, 13, 13);
	}
	.tsv-drawer__phone-number { font-size: 16px; font-weight: 700; }
	.tsv-drawer__phone-hours { font-size: 12.5px; color: rgb(107, 107, 107); margin-top: 2px; }

	@media (prefers-reduced-motion: reduce) {
		.tsv-drawer,
		.tsv-drawer-backdrop,
		.tsv-drawer__expand svg { transition: none; }
	}
}

/* =========================================================================
   SECTION FIXES, TABLET AND BELOW (<= 1099px)
   ========================================================================= */
@media (max-width: 1099px) {

	/* Home hero: the RICS lockup leaves its absolute corner and follows the content. */
	.tsv-hero-video { display: flex; flex-direction: column; }
	.tsv-hero-video > [aria-label="Regulated by RICS"] {
		position: relative !important;
		order: 3;
		right: auto !important;
		bottom: auto !important;
		width: 150px !important;
		height: 56px !important;
		margin: 0 20px 32px;
		background-position: left center !important;
	}
	.tsv-hero-video > div[style*="padding: 74px 28px 170px"] { padding-bottom: 32px !important; order: 2; }

	/* Home "Why Thistle": the photo panel would sit over the copy. */
	.tsv-site [style*="position: absolute"][style*="width: 46%"] { display: none !important; }

	/* Survey hero: fee card under the copy, photo below it at 16:9. */
	.tsv-site [style*="grid-template-columns: 1fr 1.02fr 322px"] > [style*="height: 440px"] {
		order: 2;
		height: auto !important;
		aspect-ratio: 16 / 9;
	}
	.tsv-site [style*="grid-template-columns: 1fr 1.02fr 322px"] > [style*="box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 20px"] { order: 1; }

	/* Landing heroes: the copy column's desktop gutter. */
	.tsv-site [style*="padding: 34px 44px 44px 28px"] { padding: 32px 20px !important; }
	.tsv-site [style*="min-height: 430px"] { min-height: 320px !important; }

	/* Consultancy: the yellow four-column panel wraps two-up with room between rows. */
	.tsv-site [style*="grid-template-columns: 0.85fr 0.85fr 1.1fr 1.1fr"] { row-gap: 28px !important; }
	.tsv-site [style*="grid-template-columns: 0.85fr 0.85fr 1.1fr 1.1fr"] > div { border-right: 0 !important; }

	/* About: tall discipline strips become short tiles. */
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] > a > div[style*="height: 560px"] { height: 260px !important; }
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] > a > div[style*="min-height: 98px"] { min-height: 0 !important; }
}

/* =========================================================================
   SECTION FIXES, MOBILE (<= 767px)
   ========================================================================= */
@media (max-width: 767px) {

	/* Flex children sized for desktop take the full row. */
	.tsv-site [style*="flex: 1 1 4"],
	.tsv-site [style*="flex: 1 1 3"],
	.tsv-site [style*="flex: 1 1 2"] { flex-basis: 100% !important; min-width: 0 !important; }

	/* Home hero: no video on phones, the poster frame instead. */
	.tsv-hero-video { background-image: var(--tsv-poster) !important; background-size: cover !important; background-position: center !important; }
	.tsv-hero-video > video { display: none !important; }
	.tsv-hero-video > [aria-label="Regulated by RICS"] { margin: 0 16px 28px; }

	/* Home "Why Thistle" four points: no column rules once stacked. */
	.tsv-site [style*="grid-template-columns: repeat(4, 1fr); gap: 0px; margin-bottom: 42px"] { row-gap: 24px !important; }
	.tsv-site [style*="grid-template-columns: repeat(4, 1fr); gap: 0px; margin-bottom: 42px"] > div { padding: 0 !important; border-right: 0 !important; }

	/* Photo-backed CTA panels. */
	.tsv-site [style*="padding: 42px 56px"] { padding: 24px !important; gap: 20px !important; }
	.tsv-site [style*="padding: 42px 56px"] > div:last-child { width: 100%; }
	.tsv-site [style*="padding: 42px 56px"] a { width: 100%; justify-content: center; box-sizing: border-box; }

	/* Testimonials carousel: card full width, arrows below it. */
	.tsv-carousel { flex-wrap: wrap !important; gap: 12px !important; }
	.tsv-carousel__slide {
		order: 1;
		flex: 1 1 100% !important;
		max-width: 100% !important;
		padding: 56px 24px 28px !important;
		min-height: 0 !important;
		box-sizing: border-box;
	}
	.tsv-carousel__slide > span[aria-hidden="true"][style*="font-size: 120px"] { font-size: 72px !important; top: 16px !important; }
	.tsv-carousel__slide > p { font-size: 17px !important; }
	.tsv-carousel__prev,
	.tsv-carousel__next { order: 2; }

	/* Comparison block: the two cards stack either side of the VS disc. */
	.tsv-site div[style*="display: flex; gap: 14px; align-items: center"]:has(> span[style*="width: 40px; height: 40px"]) { flex-direction: column !important; align-items: stretch !important; }
	.tsv-site div[style*="display: flex; gap: 14px; align-items: center"]:has(> span[style*="width: 40px; height: 40px"]) > span { align-self: center; }

	/* Consultancy process row becomes a vertical sequence. */
	.tsv-site [style*="display: flex; align-items: stretch; gap: 0px"] { flex-direction: column !important; gap: 8px !important; }
	.tsv-site [style*="display: flex; align-items: stretch; gap: 0px"] > div { flex-direction: column !important; align-items: stretch !important; }
	.tsv-site [style*="display: flex; align-items: stretch; gap: 0px"] > div > span { align-self: center; transform: rotate(90deg); margin: 4px 0; }
	.tsv-site [style*="grid-template-columns: 0.85fr 0.85fr 1.1fr 1.1fr"] > div { padding: 0 !important; }
	.tsv-site [style*="padding: 36px 34px"] { padding: 24px 20px !important; }

	/* Landing "side" cards: image above. */
	.tsv-site div[style*="display: flex; border: 1px solid rgb(234, 231, 224)"] { flex-direction: column !important; }
	.tsv-site div[style*="display: flex; border: 1px solid rgb(234, 231, 224)"] > div[style*="width: 185px"] { width: 100% !important; height: 180px; }

	/* Landing "Why choose" rows stay two-up. */
	.tsv-site section[style*="background: rgb(247, 246, 242); border-top"] [style*="grid-template-columns: repeat("] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 28px !important; }

	/* About: discipline tiles two-up; Trustpilot panel wraps. */
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] > a > div[style*="height: 560px"] { height: 180px !important; }
	.tsv-site [style*="padding: 46px 40px 38px"] { padding: 24px 16px !important; }
	.tsv-site div:has(> span > span[style*="width: 34px; height: 34px; background: rgb(0, 182, 122)"]) { flex-wrap: wrap !important; }

	/* Footer link stacks: 44px targets without extra gaps. */
	.tsv-footer [style*="flex-direction: column"][style*="gap: 11px"] { gap: 0 !important; }
}

@media (max-width: 1099px) {

	/* Home "Why Thistle" points: the desktop grid has no row gap. */
	.tsv-site [style*="grid-template-columns: repeat(4, 1fr); gap: 0px; margin-bottom: 42px"] { row-gap: 28px !important; }

	/* Home: the feature strip's desktop overlap into the hero. */
	.tsv-site [style*="margin: -52px auto 0px"] { margin-top: 24px !important; }

	/* Split heroes whose copy column hugs the centre line (consultancy, housing disrepair). */
	.tsv-site [style*="padding: 54px 0px 54px 28px"],
	.tsv-site [style*="padding: 44px 0px 54px 28px"] { padding: 40px 20px !important; }
	.tsv-site [style*="max-width: 600px; margin-left: auto; padding-right: 44px"] { margin-left: 0 !important; padding-right: 0 !important; max-width: none !important; }
	.tsv-site section > [style*="display: grid; grid-template-columns: 1fr 1fr;"]:not([style*="gap"]) { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 767px) {
	.tsv-site [style*="padding: 54px 0px 54px 28px"],
	.tsv-site [style*="padding: 44px 0px 54px 28px"] { padding: 32px 16px !important; }
}

@media (max-width: 1099px) {
	/* Article sidebar: no sticky once it stacks under the article. */
	.tsv-site aside[style*="position: sticky"] { position: static !important; }
}

@media (max-width: 767px) {
	/* Contact: details before the form, so the phone number is visible straight away. */
	.tsv-site [style*="grid-template-columns: 1.15fr 1fr"] > div:last-child { order: -1; }
}

/* =========================================================================
   TAP TARGETS (<= 1099px, tablets are touch devices too): 44px minimum on
   standalone links and buttons.
   Padding is offset with negative margin where the visual spacing should
   stay as designed.
   ========================================================================= */
@media (max-width: 1099px) {

	.tsv-site nav[aria-label="Breadcrumb"] a,
	.tsv-site section nav:not(.tsv-nav) a,
	.tsv-site nav:not(.tsv-nav) a,
	.tsv-site .tsv-crumb {
		display: inline-block;
		padding: 14px 4px;
		margin: -14px -4px;
	}
	.tsv-site nav[aria-label="Breadcrumb"] { row-gap: 20px !important; }

	.tsv-card-link,
	.tsv-mega__link { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }

	.tsv-landing-link,
	.tsv-card-link-cta,
	.tsv-viewall,
	.tsv-hd-link,
	.tsv-footer__viewall,
	.tsv-quote-form__manual,
	.tsv-footer a[style*="display: flex; gap: 11px"] {
		min-height: 44px;
		display: inline-flex !important;
		align-items: center;
	}

	/* Area card "View all areas" style links and footer text links. */
	.tsv-site a[style*="font-size: 13.5px; font-weight: 800"][style*="display: inline-flex"],
	.tsv-site div > a[style*="color: inherit; text-decoration: none"],
	.tsv-site a[style*="display: inline-flex"][style*="font-size: 12px"],
	.tsv-site a[style*="display: inline-flex"][style*="font-size: 13px"],
	.tsv-site a[style*="font-size: 13.5px"][style*="display: inline-flex"] { min-height: 44px; }
	.tsv-site input[type="search"] { min-height: 44px; }
	.tsv-site div > a[style*="color: inherit; text-decoration: none"] { display: inline-flex; align-items: center; }
}

@media (max-width: 1099px) {
	/* Column rules between steps and stat cells read as stray lines once columns wrap. */
	.tsv-site [style*="grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 0px"] { row-gap: 32px !important; }
	.tsv-site [style*="grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 0px"] > div { border-left: 0 !important; }
}

@media (max-width: 767px) {
	/* Breadcrumbs wrap between items instead of squeezing each item onto two lines. */
	.tsv-site section nav:not(.tsv-nav),
	.tsv-site nav[aria-label="Breadcrumb"] { flex-wrap: wrap !important; }
	.tsv-site section nav:not(.tsv-nav) > *,
	.tsv-site nav[aria-label="Breadcrumb"] > * { flex: 0 0 auto; }
}

@media (max-width: 1099px) {
	.tsv-footer__link,
	.tsv-footer__legal { display: inline-block; padding: 12px 0; }
	.tsv-hero-review-link { display: inline-flex; padding: 11px 0; }
	.tsv-footer__social { width: 44px !important; height: 44px !important; }
	.tsv-footer [style*="flex-direction: column"][style*="gap: 11px"] { gap: 0 !important; }
}

/* Legal pages: sidebar stacks under the text; the contents list is dropped on phones. */
@media (max-width: 1099px) {
	.tsv-legal { grid-template-columns: minmax(0, 1fr) !important; gap: 40px !important; }
	.tsv-legal__aside { position: static !important; }
	.tsv-legal article a { display: inline-block; padding: 13px 0; margin: -13px 0; word-break: break-word; }
}
@media (max-width: 767px) {
	.tsv-legal { padding-top: 32px !important; }
	.tsv-legal__toc { display: none !important; }
	.tsv-legal__lead { font-size: 16px !important; padding-left: 16px !important; }
}

/* Phones only: hero, "why us" and testimonial buttons, and the area cards, span the full width. */
@media (max-width: 767px) {
	.tsv-hero-video .tsv-btn--hero-green,
	.tsv-hero-video .tsv-btn--hero-outline,
	.tsv-why-cta,
	.tsv-review-cta {
		box-sizing: border-box;
		flex: 0 0 100% !important;
		width: 100% !important;
	}
	.tsv-hero-video .tsv-btn--hero-green,
	.tsv-hero-video .tsv-btn--hero-outline {
		justify-content: center !important;
	}
	.tsv-review-cta { text-align: center; padding-left: 20px !important; padding-right: 20px !important; }
	.tsv-areas-grid__panel { padding: 36px 16px !important; }
	.tsv-areas-grid__panel .tsv-area-card { box-sizing: border-box; width: 100%; }
}

/*
 * 1100-1279px. The design is drawn at 1280 and the header bar needs 1267px of
 * it, so on a smaller desktop window the phone number was cut off the right
 * edge. This band only tightens the header's own spacing; every section below
 * it, and the header itself at 1280 and wider, is untouched.
 */
@media (min-width: 1100px) and (max-width: 1279px) {
	.tsv-header > div { padding: 0 16px !important; gap: 12px !important; }
	.tsv-header > div > a:first-child img { height: 66px !important; }
	.tsv-nav { gap: 0 !important; }
	.tsv-nav__link { padding: 10px 6px !important; font-size: 12.5px !important; }
	.tsv-header__phone { gap: 8px !important; }
	.tsv-header__phone > span:first-child { width: 38px !important; height: 38px !important; }
	.tsv-header__phone-number { font-size: 16.5px !important; }
}

/* Design v2: grouped footer columns, office labels, Contact office badges, Complaints page. */
@media (max-width: 1099px) {
	/* The grouped columns stack at 9px; the links carry their own 44px padding. */
	.tsv-footer [style*="flex-direction: column"][style*="gap: 9px"] { gap: 0 !important; }
	.tsv-footer__group { margin-top: 12px !important; }
	.tsv-footer__col .tsv-footer__group:first-child { margin-top: 0 !important; }
	.tsv-complaints nav[aria-label="Breadcrumb"] a { display: inline-flex; align-items: center; min-height: 44px; }
	.tsv-complaints nav[aria-label="Breadcrumb"] { margin-bottom: 6px !important; }
}
@media (max-width: 767px) {
	/* 10.5px labels (and the 9.5px Contact badges) read too small on a phone. */
	.tsv-footer__group,
	.tsv-footer__office-label { font-size: 11.5px !important; }
	.page-template-page-contact .tsv-main span[style*="font-size: 9.5px"][style*="text-transform: uppercase"] { font-size: 11px !important; }
	/* Service process band "STEP n" labels (Red Line, Party Wall, Snagging). */
	.tsv-site div[style*="font-size: 10.5px; font-weight: 800; color: rgb(13, 13, 13); letter-spacing: 0.8px"] { font-size: 11.5px !important; }
}

/* Legal Matters (design v2): three photo-topped cards. responsive.md, "Category cards": a 3-up row stays
   3-up on tablets 900px and wider, otherwise it goes to one column. Nested so it stays inside the tablet layer. */
@media (max-width: 1099px) {
	@media (max-width: 899px) {
		.tsv-site [style*="grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 24px; align-items: stretch"] {
			grid-template-columns: minmax(0, 1fr) !important;
		}
		/* One wide column: a 2:1 photo band instead of 16:10, so each photo is not ~450px tall. */
		.tsv-site [style*="grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 24px; align-items: stretch"] > div > div[style*="aspect-ratio: 16 / 10"] {
			aspect-ratio: 2 / 1 !important;
		}
	}
}
@media (max-width: 767px) {
	/* Phones: back to the design's 16:10 band at card width. */
	.tsv-site [style*="grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 24px; align-items: stretch"] > div > div[style*="aspect-ratio: 16 / 10"] {
		aspect-ratio: 16 / 10 !important;
	}
}

/* =========================================================================
   MOBILE GUIDE (Thistle-Surveying-WP-Export-v2/mobile-guide.md), PHONES ONLY.
   Desktop and tablet are unchanged by everything below.
   ========================================================================= */
@media (max-width: 767px) {

	/* ---- 2. Header: 64px bar, 40px logo, 44x44 phone and menu buttons ---- */
	.tsv-header > div:first-child > a:first-child img { height: 40px !important; }
	.tsv-header__phone > span:first-child { width: 44px !important; height: 44px !important; }
	.tsv-header__phone > span:first-child svg { width: 20px; height: 20px; }
}

@media (max-width: 767px) {

	/* ---- 1. Global ---------------------------------------------------------- */

	/* Anchor jumps and the first invalid form field land below the 64px sticky header (11, 10). */
	html { scroll-padding-top: 80px; }

	/* Phone-width images (12): tsv_bg() and the dark heroes carry an 828px copy. */
	.tsv-site [style*="--tsv-img-m"] { background-image: var(--tsv-img-m) !important; }
	/* Dark photo heroes (4.1): flat overlay instead of the left-to-right gradient. */
	.tsv-site [style*="--tsv-hero-m"] {
		background: linear-gradient(rgba(13, 13, 13, 0.78), rgba(13, 13, 13, 0.78)), var(--tsv-hero-m) center center / cover no-repeat rgb(13, 13, 13) !important;
	}
	.tsv-site [style*="position: absolute; inset: 0px; background: linear-gradient(90deg, rgba(13, 13, 13"] { background: rgba(13, 13, 13, 0.78) !important; }

	/* Section rhythm: 40px top / 44px bottom. */
	.tsv-site main > section[style*="padding: "],
	.tsv-site main > section > [style*="max-width: 1280px"][style*="padding: "] {
		padding-top: 40px !important;
		padding-bottom: 44px !important;
	}
	.tsv-site main > section[style*="padding: 0px 28px"],
	.tsv-site main > section[style*="padding: 0px 0px"] { padding-top: 0 !important; }

	/* Type scale. */
	.tsv-site h1 { letter-spacing: -0.5px !important; }
	.tsv-site h2 { font-size: 26px !important; line-height: 1.2 !important; font-weight: 800 !important; }
	/* H2s the design sets under 20px are panel headings: 16px, as accordion titles (5.8). */
	.tsv-site [style*="background: rgb(240, 192, 64)"] h2[style*="font-size: 1"] { font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; }
	/* Uppercase, letter-spaced H2s are styled as labels in the design: 20px rather than 26px. */
	.tsv-site h2[style*="text-transform: uppercase"] { font-size: 20px !important; }
	.tsv-site h3 { font-size: 17px !important; line-height: 1.3 !important; font-weight: 700 !important; }
	/* Card and panel titles set as spans inside toggles. */
	.tsv-accordion__toggle > span[style*="font-size: 19px"],
	.tsv-accordion__toggle > span[style*="font-size: 2"] { font-size: 16px !important; font-weight: 700 !important; }
	/* Lead paragraphs 16px, body 15px / 1.65, nothing descriptive under 14px. */
	.tsv-site p:is([style*="font-size: 17"], [style*="font-size: 18"], [style*="font-size: 19"], [style*="font-size: clamp(1"]) { font-size: 16px !important; line-height: 1.6 !important; }
	.tsv-site p:is([style*="font-size: 15"], [style*="font-size: 16"]) { font-size: 15px !important; line-height: 1.65 !important; }
	.tsv-site :is(p, div, span, li):is([style*="font-size: 11"], [style*="font-size: 12"], [style*="font-size: 13"]):is([style*="line-height: 1.4"], [style*="line-height: 1.5"], [style*="line-height: 1.6"], [style*="line-height: 1.7"]) { font-size: 14px !important; }
	.tsv-site p:is([style*="font-size: 11"], [style*="font-size: 12"], [style*="font-size: 13"]) { font-size: 14px !important; }
	/* Eyebrow labels 11.5px / 2px tracking. */
	.tsv-site [style*="text-transform: uppercase"]:is([style*="letter-spacing: 2px"], [style*="letter-spacing: 2.5px"], [style*="letter-spacing: 3px"]) { font-size: 11.5px !important; letter-spacing: 2px !important; }

	/* Buttons: full width, 48px, 15px, stacked 12px apart. */
	.tsv-site :is(.tsv-btn, .tsv-landing-primary, .tsv-landing-call, .tsv-con-outline, .tsv-val-outline, .tsv-hd-primary, .tsv-hd-call,
		.tsv-art-dark-call, .tsv-complaints-cta, .tsv-areas-cta, .tsv-why-cta, .tsv-review-cta, .tsv-landing-cta-call, .tsv-newsletter__submit, .tsv-con-phone),
	.tsv-site a[style*="font-weight: 700"][style*="border-radius"]:is([style*="background: rgb(31, 138, 76)"], [style*="border: 1.5px solid rgb(216, 213, 204)"], [style*="background: rgb(240, 192, 64); border-radius: 7px"]),
	.tsv-site a[style*="background: rgb(255, 255, 255)"][style*="padding: 13px 22px"],
	.tsv-site a[style*="border: 1.5px solid rgb(240, 192, 64); background: rgb(240, 192, 64)"],
	.tsv-site a[style*="border: 1.5px solid rgb(216, 213, 204)"][style*="padding: 13px 24px"] {
		display: flex !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		min-height: 48px !important;
		box-sizing: border-box !important;
		justify-content: center !important;
		align-items: center !important;
		font-size: 15px !important;
		padding-top: 12px !important;
		padding-bottom: 12px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		white-space: normal !important;
		text-align: center;
	}
	.tsv-site :is(div, p):has(> :is(.tsv-btn, .tsv-landing-primary, .tsv-landing-call, .tsv-con-outline, .tsv-val-outline, .tsv-hd-primary, .tsv-hd-call, .tsv-art-dark-call, .tsv-complaints-cta, .tsv-why-cta, .tsv-review-cta, .tsv-landing-cta-call)),
	.tsv-site div:has(> a[style*="font-weight: 700"][style*="background: rgb(31, 138, 76)"]):not(:has(> :not(a))),
	.tsv-site div:has(> .tsv-con-phone) {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 12px !important;
		/* A button stack spans the row, whatever flex row it sits in. */
		flex: 1 1 100% !important;
		width: 100%;
		box-sizing: border-box;
	}
	/* The phone "card" buttons keep their two-line number and hours. */
	.tsv-site a[style*="padding: 13px 22px"] > span { align-items: flex-start; }

	/* Forms (10): 48px fields, 16px text, 14px between fields. */
	.tsv-site input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
	.tsv-site select { min-height: 48px !important; height: 48px !important; border-radius: 5px !important; box-sizing: border-box; }
	.tsv-site textarea { min-height: 140px !important; border-radius: 5px !important; }

	/* Every grid child can shrink (1). */
	.tsv-site [style*="display: grid"] > * { min-width: 0; }

	/* Touch devices: no hover lifts (11). */
	@media (hover: none) {
		.tsv-site a:hover,
		.tsv-site button:hover { transform: none !important; }
	}
}

@media (max-width: 767px) {

	/* ---- 3. Home ------------------------------------------------------------- */

	/* 3.1 Hero: vertical overlay, 32px / 40px padding, quote card 20px padding. */
	.tsv-hero-video > div[style*="position: absolute; inset: 0px; z-index: 1"] {
		background: linear-gradient(180deg, rgba(13, 20, 16, 0.85) 0%, rgba(13, 20, 16, 0.7) 100%) !important;
	}
	.tsv-hero-video > div[style*="padding: 74px 28px 170px"] { padding: 32px 16px 0 !important; gap: 28px !important; }
	.tsv-hero-video > [aria-label="Regulated by RICS"] { margin: 20px 16px 40px !important; height: 56px !important; }
	#tsv-quote-form { border-radius: 12px !important; padding: 20px !important; }
	#tsv-quote-form form > div:first-of-type > span:first-child { width: 44px !important; height: 44px !important; }
	#tsv-quote-form h3 { font-size: 20px !important; }

	/* 3.2 Feature strip: two columns, the fifth item across both; compact and left-aligned. */
	.tsv-site .tsv-feature-strip > div[style] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
	}
	.tsv-feature-strip > div > div {
		padding: 16px !important;
		align-items: flex-start !important;
		text-align: left !important;
		gap: 8px !important;
		border: 1px solid rgb(242, 240, 236) !important;
		border-radius: 12px;
		background: rgb(255, 255, 255);
		box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 14px;
	}
	.tsv-feature-strip > div > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.tsv-feature-strip > div > div > span[aria-hidden="true"] { width: 40px !important; height: 40px !important; background-position: left center !important; }
	.tsv-feature-strip h4 { font-size: 14px !important; font-weight: 700 !important; }
	.tsv-feature-strip p { font-size: 12.5px !important; line-height: 1.5 !important; }

	/* 3.3 Category cards: 20px padding, 40px icon, 20px title, 44px link rows, 48px foot button. */
	.tsv-category-card__body { padding: 20px !important; }
	.tsv-category-card__body > div:first-child > span:first-child { width: 40px !important; height: 40px !important; }
	.tsv-category-card__body h3 { font-size: 20px !important; }
	.tsv-site .tsv-category-card__body .tsv-card-link { display: flex !important; align-items: center; min-height: 44px; font-size: 14px !important; }
	.tsv-category-card__body ul { gap: 0 !important; flex-shrink: 0 !important; }
	/* The card body is a flex column: without this the rows shrink under their 44px links. */
	.tsv-category-card__body ul > li { flex-shrink: 0 !important; min-height: 44px; }
	.tsv-category-card__body ul > li { align-items: center !important; }
	.tsv-category-card__body ul > li > span { margin-top: 0 !important; }
	.tsv-card-cta { min-height: 48px; box-sizing: border-box; margin-left: -20px !important; margin-right: -20px !important; margin-bottom: -20px !important; }

	/* 3.4 Why Thistle: photo first (16:9, radius 8), then the copy; points as icon-left rows. */
	.tsv-site .tsv-why-photo[style] {
		position: relative !important;
		display: block !important;
		width: auto !important;
		margin: 40px 16px 0;
		aspect-ratio: 16 / 9;
		border-radius: 8px;
		background: var(--tsv-why-img) center center / cover no-repeat rgb(21, 23, 26) !important;
	}
	.tsv-why-photo + div { padding: 24px 16px 44px !important; }
	.tsv-why-points { grid-template-columns: minmax(0, 1fr) !important; row-gap: 18px !important; }
	.tsv-why-points > div {
		display: grid !important;
		grid-template-columns: 20px minmax(0, 1fr);
		column-gap: 12px;
		align-items: start;
		padding: 0 !important;
		border-right: 0 !important;
	}
	.tsv-why-points > div > span { grid-row: 1 / span 2; margin: 2px 0 0 !important; }
	.tsv-why-points > div > span svg { width: 20px; height: 20px; }
	.tsv-why-points > div > h4 { margin: 0 0 4px !important; }
	.tsv-why-points > div > p { font-size: 14.5px !important; }

	/* 3.5 Testimonials: card padding 28/20/24, radius 4; arrows 44px below the card, centred. */
	.tsv-carousel { justify-content: center !important; }
	.tsv-carousel__slide { padding: 28px 20px 24px !important; border-radius: 4px !important; }
	.tsv-carousel__slide > span[aria-hidden="true"][style*="font-size: 120px"] { position: static !important; display: block; line-height: 0.6 !important; height: 40px; margin-bottom: 8px; }
	.tsv-carousel__slide > p { font-size: 17px !important; line-height: 1.6 !important; }
	.tsv-carousel__prev,
	.tsv-carousel__next {
		width: 44px !important;
		height: 44px !important;
		border-radius: 50% !important;
		border: 1px solid rgb(226, 223, 216) !important;
		background: rgb(255, 255, 255) !important;
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		position: static !important;
		transform: none !important;
	}

	/* 3.6 Split-photo CTA: one photo, 420px minimum, full-width panel, stacked buttons. */
	.tsv-split-cta { min-height: 420px; display: flex; align-items: center; }
	.tsv-split-cta > div { width: 100%; padding: 16px !important; }
	.tsv-split-cta__panel { padding: 24px !important; }
	.tsv-split-cta__panel [style*="width: 1px"] { display: none !important; }
	.tsv-split-cta__panel h2 { font-size: 24px !important; }
	.tsv-split-cta__panel > div { flex-basis: 100% !important; }

	/* ---- 4.2 Trust strips: one column. ------------------------------------------ */
	.tsv-trust-strip { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
	.tsv-trust-strip > div { flex: 0 0 auto !important; width: 100%; box-sizing: border-box; border-right: 0 !important; padding-right: 0 !important; }
	.tsv-trust-strip--cards > div { padding: 16px 18px !important; }
	.tsv-trust-strip--cards > div svg { width: 22px; height: 22px; }
	.tsv-trust-strip > div > div > div:first-child { font-size: 15px !important; font-weight: 700 !important; }
	.tsv-trust-strip > div > div > div + div { font-size: 13px !important; }

	/* ---- 5. Service pages ---------------------------------------------------- */

	/* Breadcrumbs: one line, scrolls sideways if long. */
	.tsv-site section nav:not(.tsv-nav),
	.tsv-site nav[aria-label="Breadcrumb"] {
		flex-wrap: nowrap !important;
		white-space: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		font-size: 12.5px !important;
		margin-bottom: 12px !important;
	}
	.tsv-site section nav:not(.tsv-nav)::-webkit-scrollbar,
	.tsv-site nav[aria-label="Breadcrumb"]::-webkit-scrollbar { display: none; }

	/* "Known as ..." 15px italic. */
	.tsv-site p[style*="font-style: italic"][style*="font-size: 18px"] { font-size: 15px !important; }

	/* Price card: full width, 20px padding, price 34px. Photo: 16:9, radius 8, top of the frame. */
	.tsv-survey-hero__card { padding: 20px !important; border-radius: 12px !important; }
	.tsv-survey-hero__card span[style*="font-size: 30px"],
	.tsv-survey-hero__card span[style*="font-size: 3"] { font-size: 34px !important; font-weight: 800 !important; }
	.tsv-survey-hero__photo { border-radius: 8px !important; background-position: center top !important; }

	/* Content accordions: 56px header rows, 16px/700 titles, 44px chevron area. */
	.tsv-site .tsv-accordion__toggle { min-height: 56px; box-sizing: border-box; align-items: center !important; }
	.tsv-site .tsv-accordion__toggle[style*="padding: 0px"] { min-height: 44px; }
	.tsv-site .tsv-accordion__sign { min-width: 24px; text-align: center; }
	/* Two-column tick lists inside panels become one column. */
	.tsv-site .tsv-accordion__body [style*="grid-template-columns: 1fr 1fr"]:not([style*="gap: 18px 14px"]) { grid-template-columns: minmax(0, 1fr) !important; }

	/* "What we look for" / issues icon grids: two columns (6). */
	.tsv-site .tsv-accordion__body [style*="grid-template-columns: 1fr 1fr; gap: 18px 14px"],
	.tsv-site [style*="grid-template-columns: 1fr 1fr; gap: 18px 14px"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.tsv-site [style*="grid-template-columns: 1fr 1fr; gap: 18px 14px"] div[style*="font-size: 12px"] { font-size: 13px !important; }

	/* FAQs (5.10): question 15px/600, answer 14.5px/1.65. */
	.tsv-site .tsv-accordion__toggle > span:first-child:not([style*="font-size: 19px"]):not([style*="font-size: 2"]) { font-size: 15px !important; font-weight: 600 !important; line-height: 1.4 !important; }
	.tsv-site .tsv-accordion__body { font-size: 14.5px !important; line-height: 1.65 !important; }

	/* Related services: a sideways snap-scroll row, each card 80% wide (5.11, 7). */
	.tsv-related-grid,
	.tsv-site div[style*="grid-template-columns: repeat(6, 1fr); gap: 16px"]:has(> a) {
		display: flex !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		gap: 12px !important;
		margin: 0 -16px;
		padding: 0 16px 8px;
		scrollbar-width: none;
	}
	.tsv-related-grid::-webkit-scrollbar,
	.tsv-site div[style*="grid-template-columns: repeat(6, 1fr); gap: 16px"]:has(> a)::-webkit-scrollbar { display: none; }
	.tsv-related-grid > *,
	.tsv-site div[style*="grid-template-columns: repeat(6, 1fr); gap: 16px"]:has(> a) > * { flex: 0 0 80% !important; scroll-snap-align: start; box-sizing: border-box; }

	/* CTA band (as 3.6): heading 24px, buttons stacked full width. */
	:is(.tsv-cta-panel, .tsv-site div[style*="background: rgb(240, 192, 64); border: 1px solid rgb(226, 223, 216); border-radius: 14px"][style*="justify-content: space-between"]) { padding: 24px 20px !important; flex-direction: column !important; align-items: stretch !important; gap: 20px !important; }
	:is(.tsv-cta-panel, .tsv-site div[style*="background: rgb(240, 192, 64); border: 1px solid rgb(226, 223, 216); border-radius: 14px"][style*="justify-content: space-between"]) > div:first-child { flex-basis: auto !important; align-items: flex-start !important; }
	:is(.tsv-cta-panel, .tsv-site div[style*="background: rgb(240, 192, 64); border: 1px solid rgb(226, 223, 216); border-radius: 14px"][style*="justify-content: space-between"]) h3 { font-size: 24px !important; line-height: 1.2 !important; }
	:is(.tsv-cta-panel, .tsv-site div[style*="background: rgb(240, 192, 64); border: 1px solid rgb(226, 223, 216); border-radius: 14px"][style*="justify-content: space-between"]) > div:first-child > span:first-child { width: 48px !important; height: 48px !important; }
	:is(.tsv-cta-panel, .tsv-site div[style*="background: rgb(240, 192, 64); border: 1px solid rgb(226, 223, 216); border-radius: 14px"][style*="justify-content: space-between"]) > div:last-child { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
}

@media (max-width: 767px) {

	/* ---- 4. Landing pages ------------------------------------------------------ */

	/* 4.1 Photo heroes: auto height, 40px 16px 44px, left-aligned. */
	.tsv-site section[style*="--tsv-hero-m"] { min-height: 0 !important; }
	.tsv-site section[style*="--tsv-hero-m"] > div[style*="max-width: 1280px"] { padding: 40px 16px 44px !important; text-align: left !important; }
	.tsv-site section[style*="--tsv-hero-m"] > div[style*="max-width: 1280px"] p { margin-left: 0 !important; margin-right: 0 !important; }
	.tsv-site [style*="min-height: 430px"] { min-height: 0 !important; }
	/* Hero side box (fee box, "valuations for" checklist) below the buttons, full width, 20px padding. */
	.tsv-site section[style*="--tsv-hero-m"] [style*="border-radius: 14px"][style*="padding: 2"],
	.tsv-site section[style*="--tsv-hero-m"] [style*="border-radius: 12px"][style*="padding: 2"] { padding: 20px !important; }

	/* 4.3 Card grids: gap 16px; photo cards with a translucent panel get a minimum height. */
	.tsv-site [style*="display: grid"][style*="gap: 2"]:not(.tsv-feature-strip > div) { row-gap: 16px !important; }
	.tsv-site [style*="height: 240px"][style*="background"] { height: auto !important; min-height: 220px; }

	/* 4.4 Consultancy intro box and numbered steps: numeral left, text right. */
	.tsv-site [style*="grid-template-columns: 0.85fr 0.85fr 1.1fr 1.1fr"] { padding: 20px !important; }

	/* 4.5 Areas We Cover: the two region buttons stay side by side at 48px; search 48px. */
	.tsv-site div[style*="grid-template-columns: 1fr 1fr; gap: 14px"]:has(> .tsv-region-jump) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.tsv-region-jump { min-height: 48px; padding: 12px 14px !important; box-sizing: border-box; }
	.tsv-region-jump > span:last-child { display: none !important; }
	.tsv-area-filter__btn { flex: 1 1 0; min-height: 48px; font-size: 13px !important; }
	.tsv-site input[type="search"] { height: 48px !important; }

	/* 4.6 Knowledge Hub: article images 16:9; newsletter field and button stacked, 48px. */
	.tsv-site a[href*="/knowledge-hub/"] [style*="height: 1"][style*="background"],
	.tsv-site article [style*="height: 1"][style*="background: url"] { height: auto !important; aspect-ratio: 16 / 9; }
	.tsv-newsletter form,
	.tsv-site form[data-tsv-form="newsletter"] > div { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
	.tsv-site form[data-tsv-form="newsletter"] input[type="email"] { width: 100% !important; box-sizing: border-box; }
	.tsv-site form[data-tsv-form="newsletter"] h3,
	.tsv-site aside h3 { font-size: 24px !important; }

	/* 4.7 About: story panels image first; timeline with a 12px dot on a left line; stats two-up. */
	.tsv-site [style*="grid-template-columns: 0.9fr 1.1fr"] > div:last-child:has([style*="background: url"]),
	.tsv-site [style*="grid-template-columns: 0.72fr 1.28fr"] > div:first-child:has([style*="background: url"]) { order: -1; }
	.tsv-site [style*="grid-template-columns: 0.85fr 1.15fr"] [style*="grid-template-columns: auto 1fr; gap: 22px"] {
		grid-template-columns: 12px minmax(0, 1fr) !important;
		column-gap: 16px !important;
	}
	.tsv-site [style*="grid-template-columns: auto 1fr; gap: 22px"] > div:first-child > span:first-child {
		width: 12px !important;
		height: 12px !important;
		margin-top: 26px;
		font-size: 0 !important;
		background: rgb(13, 13, 13) !important;
	}
	.tsv-site [style*="grid-template-columns: auto 1fr; gap: 22px"] > div:first-child > span:last-child { width: 2px !important; }
	.tsv-site [style*="grid-template-columns: auto 1fr; gap: 22px"] > div:last-child { margin-bottom: 20px !important; }
	.tsv-trustpilot-banner { flex-direction: column !important; align-items: center !important; text-align: center; gap: 20px !important; padding: 24px 20px !important; }
	.tsv-trustpilot-banner > div { flex-direction: column !important; align-items: center !important; gap: 12px !important; flex-basis: auto !important; }
	/* Six discipline tiles: one column, image band 16:9. */
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] { grid-template-columns: minmax(0, 1fr) !important; }
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] > a > div[style*="background"] { height: auto !important; aspect-ratio: 16 / 9; margin-top: 0 !important; }
	.tsv-site [style*="grid-template-columns: repeat(6, minmax(0px, 1fr))"] > a > div[style*="min-height: 98px"] { min-height: 0 !important; margin-top: 12px !important; }
	/* "Plain English / named surveyor / advice" points: stacked, no column rules. */
	.tsv-site [style*="grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 0px; border-top"] { row-gap: 28px !important; }
	.tsv-site [style*="grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 0px; border-top"] > div { border-left: 0 !important; padding: 0 !important; }

	/* 4.8 Contact: phone 20px at the top; map 16:9 below the offices. */
	.page-template-page-contact [style*="grid-template-columns: 1.15fr 1fr"] a[href^="tel:"][style*="color: inherit"] { font-size: 20px !important; font-weight: 700 !important; }
	.tsv-site iframe[src*="google.com/maps"] { aspect-ratio: 16 / 9; height: auto !important; }
	.tsv-site div:has(> iframe[src*="google.com/maps"]) { height: auto !important; }

	/* ---- 6. Valuations and other detail pages --------------------------------- */

	/* Valuation types: the tab set is an accordion on phones (tabs.js), rows 56px. */
	[data-tabs].is-accordion > [style*="flex-wrap: wrap"],
	[data-tabs].is-accordion div:has(> .tsv-tab) { flex-direction: column !important; flex-wrap: nowrap !important; gap: 8px !important; }
	[data-tabs].is-accordion .tsv-tab {
		width: 100% !important;
		min-height: 56px;
		border-radius: 10px !important;
		box-sizing: border-box;
		justify-content: flex-start;
		font-size: 15px !important;
	}
	[data-tabs].is-accordion .tsv-tab + [id^="tsv-tabpanel"] { margin: 4px 0 12px; }
	[data-tabs].is-accordion [id^="tsv-tabpanel"] [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }

	/* ---- 7. Area pages ----------------------------------------------------------- */

	/* Property types two-up, image 4:3, label 14px. */
	.tsv-site .tsv-accordion__body[style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; padding: 0 16px 16px !important; }
	.tsv-site .tsv-accordion__body[style*="grid-template-columns: repeat(4, 1fr)"] > div > [style*="height"] { height: auto !important; aspect-ratio: 4 / 3; }
	.tsv-site .tsv-accordion__body[style*="grid-template-columns: repeat(4, 1fr)"] > div > div[style*="padding"] { padding: 10px !important; }
	.tsv-site .tsv-accordion__body[style*="grid-template-columns: repeat(4, 1fr)"] > div > div > div:first-child { font-size: 14px !important; }
	.tsv-site .tsv-accordion__body[style*="grid-template-columns: repeat(4, 1fr)"] > div > div > div + div { font-size: 12.5px !important; }

	/* Town and area chips: wrapping row, 36px tall, 13px, 8px apart. */
	.tsv-site div:has(> .tsv-area-pill) { gap: 8px !important; flex-wrap: wrap !important; }
	.tsv-area-pill { min-height: 36px !important; padding: 0 12px !important; font-size: 13px !important; gap: 6px !important; box-sizing: border-box; }
	.tsv-area-pill span,
	.tsv-area-pill div { font-size: 13px !important; }
	.tsv-area-pill svg { width: 13px; height: 13px; }

	/* ---- 8. Knowledge Hub articles ------------------------------------------------ */
	.single-post .tsv-site article p,
	.single-post .tsv-site article li { font-size: 16px !important; line-height: 1.7 !important; }
	.single-post .tsv-site article h2 { font-size: 22px !important; }
	.single-post .tsv-site article h3 { font-size: 18px !important; }
	.single-post .tsv-site [style*="border-left: 4px solid"] { padding: 20px !important; }
	.single-post .tsv-site [style*="border-left: 4px solid"] p { font-size: 15px !important; }
	.single-post .tsv-site [style*="aspect-ratio"][style*="background"],
	.single-post .tsv-site [style*="height: 4"][style*="background: url"] { height: auto !important; aspect-ratio: 16 / 9; border-radius: 8px !important; }

	/* ---- 9. Footer ------------------------------------------------------------------ */
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] { padding-top: 40px !important; row-gap: 32px !important; }
	/* Logo panel 56px tall; social icons 44px in a row. */
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] > div:first-child span[style*="background: rgb(255, 255, 255)"] { padding: 8px 12px !important; }
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"] > div:first-child img { height: 40px !important; }
	/* Link columns are accordions (footer.js): 48px heading rows with a chevron, 44px link rows. */
	.tsv-footer__heading--toggle { margin: 0 !important; }
	.tsv-footer__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 48px;
		padding: 0;
		border: 0;
		border-bottom: 1px solid rgb(42, 42, 42);
		background: none;
		color: rgb(255, 255, 255);
		font-family: inherit;
		font-size: 14px;
		font-weight: 700;
		letter-spacing: 0.3px;
		cursor: pointer;
	}
	.tsv-footer__toggle svg { transition: transform .2s ease; color: rgb(240, 192, 64); }
	.tsv-footer__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.tsv-footer__heading--toggle + div { padding-top: 6px; }
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"]:has(.tsv-footer__toggle) { row-gap: 0 !important; }
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"]:has(.tsv-footer__toggle) > div:first-child { margin-bottom: 24px; }
	.tsv-footer [style*="grid-template-columns: 1.5fr 1fr 1.2fr 1fr 1.4fr"]:has(.tsv-footer__toggle) > div:last-child { margin-top: 32px; }
	/* Get in Touch: phone 16px/700. */
	.tsv-footer a[href^="tel:"] span[style*="font-size: 14px"] { font-size: 16px !important; font-weight: 700 !important; }
	/* Bottom bar, centred: RICS badge (40px), legal links in one wrapping row, then the company line. */
	.tsv-footer [style*="padding: 22px 28px"] > div:last-child { order: 1; }
	.tsv-footer [style*="padding: 22px 28px"] > div:last-child img { height: 40px !important; }
	.tsv-footer [style*="padding: 22px 28px"] > div:nth-child(2) { order: 2; gap: 0 16px !important; flex-wrap: wrap; justify-content: center; }
	.tsv-footer [style*="padding: 22px 28px"] > .tsv-footer__copyright { order: 3; }

	@media (prefers-reduced-motion: reduce) {
		.tsv-footer__toggle svg { transition: none; }
	}
}

@media (max-width: 767px) {
	/* Area hero: the copy column's desktop right gutter. */
	.tsv-site div[style*="padding: 18px 40px 30px 0px"] { padding: 0 0 24px !important; }
}

@media (max-width: 767px) {
	/* 4.6 Knowledge Hub article rows: image 16:9 above, title 18px, "Read" link area 44px. */
	.tsv-article-row > div:first-child { height: auto !important; aspect-ratio: 16 / 9; }
	.tsv-article-row h3 { font-size: 18px !important; }

	/* 4.8 Contact: hero points full width; form card 20px padding; action cards without column rules. */
	.page-template-page-contact .tsv-main section:first-child [style*="max-width: 200px"],
	.tsv-complaints section:first-child [style*="max-width: 230px"] { max-width: none !important; }
	.page-template-page-contact [style*="border-radius: 14px; padding: 38px"] { padding: 24px 20px !important; }
	.page-template-page-contact [style*="grid-template-columns: repeat(3, 1fr); gap: 30px"] { padding: 24px 20px !important; row-gap: 28px !important; }
	.page-template-page-contact [style*="grid-template-columns: repeat(3, 1fr); gap: 30px"] > div { border-right: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 767px) {
	/* Category landing heroes: the copy column sits inside the 16px container gutter already. */
	.tsv-site [style*="padding: 34px 44px 44px 28px"] { padding: 32px 0 40px !important; }
	/* Trust rows with desktop column rules. */
	.tsv-site [style*="border-right: 1px solid rgb(239, 235, 228); padding-right: 20px"] { border-right: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 767px) {
	/* Landing card bullet lists and subtitles: body text no smaller than 14px / 13.5px. */
	.tsv-site ul > li > span[style*="font-size: 12.5px"],
	.tsv-site ul > li > span[style*="font-size: 12px"] { font-size: 14px !important; }
	.tsv-site h3 + div[style*="font-size: 12.5px; font-weight: 700"] { font-size: 13.5px !important; }
}
