/*
Theme Name: The King's Choice
Theme URI: https://thekingschoice.com/
Author: B Realtors, Inc.
Description: Custom block theme for thekingschoice.com. Requires the TKC Core must-use plugin (entities and schema).
Requires at least: 6.6
Requires PHP: 8.1
Version: 0.3.0
License: Proprietary
Text Domain: kingschoice
*/

/* Design tokens beyond theme.json: one place for the system. */
:root {
	--tkc-ox: var(--wp--preset--color--oxblood);
	--tkc-ch: var(--wp--preset--color--charcoal);
	--tkc-iv: var(--wp--preset--color--ivory);
	--tkc-ink-soft: #5c5751;
	--tkc-on-dark: #d8d2c9;
	--tkc-on-dark-soft: #b5ada3;
	--tkc-line: color-mix(in srgb, var(--tkc-ch) 16%, transparent);
	--tkc-line-dark: color-mix(in srgb, var(--tkc-iv) 16%, transparent);
	--tkc-card: #fbf8f3;
	--tkc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--tkc-radius: 14px;
	--tkc-bleed: 0 0 0 100vmax;
}

/* Visible keyboard focus everywhere (WCAG 2.2 AA 2.4.7 / 2.4.11). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--tkc-ox);
	outline-offset: 3px;
}

body { text-rendering: optimizeLegibility; }

/* ---------- Header: sticky, logo lockup, compact nav ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--tkc-iv) 94%, transparent);
	border-bottom: 1px solid var(--tkc-line);
	padding-block: 0.75rem;
}
.tkc-logo { display: inline-flex; line-height: 0; }
.tkc-logo img { height: 5.25rem; width: auto; } /* about 300px wide: the full name reads (design A) */
.site-header .wp-block-navigation { gap: 1.5rem; }
.site-header .wp-block-button__link { font-size: var(--wp--preset--font-size--small); padding: 0.6rem 1rem; }

/* ---------- Page title band (interior pages) ---------- */
.tkc-page { padding-top: var(--wp--preset--spacing--50); }
.tkc-page-title { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.01em; margin-bottom: 0; }

/* ---------- Interior page hero image ---------- */
.tkc-page-hero { margin: var(--wp--preset--spacing--40) 0 0; }
.tkc-page-hero img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 34rem;
	object-fit: cover;
	border-radius: var(--tkc-radius);
}

/* Portrait (a person's photo): first inside the intro section, so it floats beside the
   opening answer on desktop and the next section clears it; above the answer on phones. */
.tkc-page-hero--portrait {
	float: right;
	width: min(20rem, 38%);
	margin: 0 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
}
.tkc-page-hero--portrait img { max-height: none; aspect-ratio: 4 / 5; border: 1px solid var(--tkc-line); }
.tkc-page .tkc-section:not(.tkc-intro) { clear: both; }
@media (max-width: 781px) {
	.tkc-page-hero--portrait { float: none; width: min(18rem, 100%); margin: 0 0 var(--wp--preset--spacing--30); }
}

/* ---------- Sections: numbered, technical eyebrow ---------- */
.entry-content, .wp-block-post-content { counter-reset: tkc-sec; }
.tkc-section { padding-block: var(--wp--preset--spacing--50); }
.tkc-section:not(.tkc-intro) { counter-increment: tkc-sec; border-top: 1px solid var(--tkc-line); }

.tkc-section > h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); letter-spacing: -0.01em; max-width: 22ch; }
.tkc-answer { font-size: clamp(1.15rem, 1.6vw, 1.375rem); line-height: 1.55; max-width: 60ch; }

/* ---------- Home hero: cinematic + data-forward ---------- */
.tkc-front { padding-top: 0; }
.wp-site-blocks > .tkc-front { margin-block-start: 0; } /* hero meets the header with no gap */
.tkc-section > .tkc-reviewed { grid-column: 1 / -1; } /* reviewer line spans grid sections */
.tkc-hero {
	position: relative;
	background: var(--tkc-ch);
	color: var(--tkc-iv);
	margin-top: 0;
	overflow: hidden;
}
.tkc-hero.has-photo {
	background: linear-gradient(rgb(30 20 22 / 0.68), rgb(30 20 22 / 0.68)), var(--tkc-hero-photo) center / cover no-repeat; /* a flat tint (one colour, both stops equal), not a gradient */
}
@media (max-width: 781px) {
	.tkc-hero.has-photo {
		background: linear-gradient(rgb(30 20 22 / 0.74), rgb(30 20 22 / 0.74)), var(--tkc-hero-photo-sm) center / cover no-repeat;
	}
}
.tkc-hero__inner {
	max-width: 72rem;
	margin-inline: auto;
	padding: clamp(3.5rem, 9vw, 7rem) var(--wp--preset--spacing--40);
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}
.tkc-hero .wp-block-post-title {
	color: var(--tkc-iv);
	font-size: clamp(2.9rem, 6.4vw, 5.25rem);
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
}
.tkc-hero .tkc-answer { color: var(--tkc-on-dark); margin: 0 0 2rem; }
.tkc-hero .tkc-answer a { color: var(--tkc-iv); }
.tkc-hero__visual { margin: 0; }
.tkc-hero__visual img { width: 100%; height: auto; border-radius: var(--tkc-radius); }

/* ---------- Home: "Chosen on proof" as a dark full-bleed band ---------- */
.tkc-section--chosen-on-proof-not-on-who-pays {
	background: var(--tkc-ch);
	box-shadow: var(--tkc-bleed) var(--tkc-ch);
	clip-path: inset(0 -100vmax);
	color: var(--tkc-on-dark);
	border-top: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem clamp(2rem, 5vw, 4rem);
	align-items: start;
}
.tkc-section--chosen-on-proof-not-on-who-pays > h2 { color: var(--tkc-iv); margin-top: 0; }
.tkc-section--chosen-on-proof-not-on-who-pays p { font-size: var(--wp--preset--font-size--large); margin-top: 0; }
.tkc-section--chosen-on-proof-not-on-who-pays a { color: var(--tkc-iv); }

/* ---------- Home: "How it works" as a numbered band (bold, ends in oxblood) ---------- */
.tkc-section--how-it-works > ol {
	list-style: none;
	counter-reset: tkc-step;
	padding: 0;
	margin: 2rem 0 1rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 3px solid var(--tkc-ox);
}
.tkc-section--how-it-works > ol > li {
	counter-increment: tkc-step;
	padding: 1.5rem 1.25rem 1.75rem;
	border-right: 1px solid var(--tkc-line);
	line-height: 1.5;
}
.tkc-section--how-it-works > ol > li::before {
	content: counter(tkc-step, decimal-leading-zero);
	display: block;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--tkc-ox);
	margin-bottom: 1rem;
}
.tkc-section--how-it-works > ol > li:last-child { background: var(--tkc-ox); color: var(--tkc-iv); border-right: 0; }
.tkc-section--how-it-works > ol > li:last-child::before,
.tkc-section--how-it-works > ol > li:last-child a { color: var(--tkc-iv); }

/* ---------- Home: "What you can count on" as a bento grid ---------- */
.tkc-section--what-you-can-count-on > ul {
	list-style: none;
	padding: 0;
	margin: 2rem 0 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.875rem;
}
.tkc-section--what-you-can-count-on > ul > li {
	/* Normal text flow (not flex), so links and highlights stay inline with the sentence. */
	background: var(--tkc-card);
	border: 1px solid var(--tkc-line);
	border-radius: var(--tkc-radius);
	padding: 4.25rem 1.5rem 1.5rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.35;
	font-family: var(--wp--preset--font-family--serif);
}
.tkc-section--what-you-can-count-on > ul > li a { color: inherit; }

/* ---------- Home: "Who is behind it" as a signed card ---------- */
.tkc-section--who-is-behind-it {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 1rem clamp(2rem, 5vw, 4rem);
}
.tkc-section--who-is-behind-it > h2 { grid-row: span 2; margin-top: 0; }
.tkc-section--who-is-behind-it > p:first-of-type {
	background: var(--tkc-card) url("assets/img/crown.svg") right 1.5rem bottom 1.5rem / 4.5rem auto no-repeat;
	border: 1px solid var(--tkc-line);
	border-radius: var(--tkc-radius);
	padding: 1.75rem 1.75rem 4.5rem;
	margin-top: 0;
}

/* ---------- Steps (How it works page): vertical timeline ---------- */
.tkc-intro > ol {
	list-style: none;
	counter-reset: tkc-step;
	padding: 0;
	margin: 2.5rem 0 0;
	border-left: 2px solid var(--tkc-ox);
}
.tkc-intro > ol > li {
	counter-increment: tkc-step;
	position: relative;
	padding: 0 0 1.75rem 3.25rem;
	max-width: 62ch;
}
.tkc-intro > ol > li::before {
	content: counter(tkc-step);
	position: absolute;
	left: -1.1rem;
	top: -0.2rem;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	background: var(--tkc-iv);
	border: 2px solid var(--tkc-ox);
	color: var(--tkc-ox);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.1rem;
	display: grid;
	place-items: center;
}

/* ---------- The Crown Standard: pillar cards ---------- */
.tkc-section:has(> .tkc-term) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
	gap: 1rem;
}
.tkc-section:has(> .tkc-term) > :not(.tkc-term) { grid-column: 1 / -1; }
.tkc-term {
	background: var(--tkc-card);
	border: 1px solid var(--tkc-line);
	border-top: 3px solid var(--tkc-ox);
	border-radius: 0 0 var(--tkc-radius) var(--tkc-radius);
	padding: 1.5rem;
}
.tkc-term > h3 { margin-top: 0; font-size: 1.35rem; }
.tkc-term > p { font-size: 0.95rem; margin: 0.6rem 0 0; color: var(--tkc-ink-soft); }
.tkc-term > p strong { display: block; font-family: var(--tkc-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tkc-ox); font-weight: 500; }

/* ---------- FAQ items ---------- */
.tkc-faq { border-left: 3px solid var(--tkc-ox); padding: 0.25rem 0 0.25rem 1.25rem; margin-block: 1.25rem; }
.tkc-faq > h3 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.tkc-faq > p { margin: 0; }

/* ---------- Tables: editorial comparison, our column highlighted ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.wp-block-table th, .wp-block-table td { text-align: left; vertical-align: top; padding: 0.9rem 1rem; border-bottom: 1px solid var(--tkc-line); }
.wp-block-table thead th { font-family: var(--tkc-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tkc-ink-soft); font-weight: 500; }
.wp-block-table thead th:last-child { background: var(--tkc-ox); color: var(--tkc-iv); }
.wp-block-table tbody td:last-child { background: color-mix(in srgb, var(--tkc-ox) 6%, var(--tkc-iv)); font-weight: 500; }
.wp-block-table tbody td:first-child { font-weight: 500; }

/* ---------- Sources and reviewer line: quiet, technical ---------- */
.tkc-section--sources > ul { font-size: 0.85rem; color: var(--tkc-ink-soft); padding-left: 1.1rem; }
.tkc-reviewed {
	font-family: var(--tkc-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	color: var(--tkc-ink-soft);
	border-top: 1px solid var(--tkc-line);
	padding-top: var(--wp--preset--spacing--30);
}

/* ---------- Footer: dark band with the endorsed lockup ---------- */
.site-footer {
	background: var(--tkc-ch);
	color: var(--tkc-on-dark-soft);
	margin-top: var(--wp--preset--spacing--60);
	padding-block: var(--wp--preset--spacing--50);
}
.site-footer a { color: var(--tkc-iv); }
.tkc-footer-logo img { height: 4.5rem; width: auto; }

/* ---------- Staging only: drafts carry a banner and highlighted open items ---------- */
.tkc-draft-banner {
	background: var(--tkc-ox);
	color: var(--tkc-iv);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	font-family: var(--tkc-mono);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	margin-top: var(--wp--preset--spacing--30);
}
mark.tkc-verify {
	background: color-mix(in srgb, var(--tkc-ox) 15%, var(--tkc-iv));
	color: var(--tkc-ch);
	outline: 1px dashed var(--tkc-ox);
}

/* ---------- The enquiry form (Start page) ---------- */
.tkc-enquiry { max-width: 40rem; margin-block: var(--wp--preset--spacing--40); }
.tkc-enquiry__form { display: grid; gap: var(--wp--preset--spacing--30); }
.tkc-step { border: 1px solid var(--tkc-line); border-radius: var(--tkc-radius); background: var(--tkc-card); padding: var(--wp--preset--spacing--30); margin: 0; }
.tkc-step > legend { font-size: 1.35rem; font-weight: 600; padding: 0 0.4rem; }
.tkc-step > legend:focus { outline: 2px solid var(--tkc-ox); outline-offset: 4px; }
.tkc-choice { border: 0; padding: 0; margin: 0 0 1rem; }
.tkc-choice > legend { font-weight: 600; margin-bottom: 0.4rem; }
.tkc-option { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 1.1rem 0.5rem 0; min-height: 2.75rem; }
.tkc-option input { width: 1.25rem; height: 1.25rem; accent-color: var(--tkc-ox); }
.tkc-field { display: grid; gap: 0.35rem; margin: 0 0 1rem; }
.tkc-field label { font-weight: 600; }
.tkc-field input, .tkc-field select, .tkc-field textarea {
	font: inherit; color: var(--tkc-ch); background: #fff; border: 1px solid var(--tkc-ink-soft); border-radius: 8px;
	padding: 0.65rem 0.75rem; min-height: 2.75rem; width: 100%; box-sizing: border-box;
}
.tkc-field input:focus-visible, .tkc-field select:focus-visible, .tkc-field textarea:focus-visible, .tkc-option input:focus-visible { outline: 2px solid var(--tkc-ox); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--tkc-ox); }
.tkc-error { color: var(--tkc-ox); font-weight: 600; margin: 0.25rem 0 0; }
.tkc-errors { border: 2px solid var(--tkc-ox); border-radius: var(--tkc-radius); padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30); margin-bottom: var(--wp--preset--spacing--30); }
.tkc-errors a { color: var(--tkc-ox); }
.tkc-progress { font-family: var(--tkc-mono); font-size: 0.85rem; letter-spacing: 0.06em; margin: 0; }
.tkc-nav, .tkc-actions { display: flex; gap: 0.75rem; margin: var(--wp--preset--spacing--20) 0 0; }
.tkc-button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 0.7rem 1.4rem; min-height: 2.75rem; border: 2px solid var(--tkc-ox); background: var(--tkc-ox); color: var(--tkc-iv); }
.tkc-button--quiet { background: transparent; color: var(--tkc-ox); }
.tkc-button:focus-visible { outline: 2px solid var(--tkc-ch); outline-offset: 3px; }
.tkc-enquiry--sent p { font-size: 1.2rem; font-weight: 600; }
.tkc-enquiry mark.tkc-verify { display: block; padding: 0.5rem 0.75rem; border-radius: 8px; }
.tkc-enquiry [hidden] { display: none !important; }
.tkc-note { margin: 0; color: var(--tkc-ink-soft); }

/* ---------- Motion: CSS scroll reveal, only where supported and wanted ---------- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.tkc-section > *, .tkc-term, .tkc-section--what-you-can-count-on > ul > li {
			animation: tkc-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 35%;
		}
	}
	.tkc-hero__copy, .tkc-hero__visual { animation: tkc-rise 0.8s cubic-bezier(.2, .7, .2, 1) both; }
	.tkc-hero__visual { animation-delay: 0.15s; }
}
/* Never on Start: the form must be fully opaque from the first paint (it sat at 0.57 opacity on load, 2026-11-29). */
.tkc-page--start .tkc-section > * { animation: none; }
@keyframes tkc-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.tkc-hero__inner,
	.tkc-section--chosen-on-proof-not-on-who-pays,
	.tkc-section--who-is-behind-it { grid-template-columns: minmax(0, 1fr); }
	.tkc-section--who-is-behind-it > h2 { grid-row: auto; }
	.tkc-section--how-it-works > ol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.tkc-section--what-you-can-count-on > ul { grid-template-columns: minmax(0, 1fr); }
	.tkc-logo img { height: 3.75rem; }
	.wp-block-table { overflow-x: auto; }
}

/* ==========================================================================
   Design A (2026-11-28): calls to action everywhere and a bolder use of the
   three brand colours. Spec: docs/superpowers/specs/2026-11-28-site-design-a-design.md.
   Contrast for every pair: docs/design-a-contrast.md. No gradients, no shadows.
   ========================================================================== */
:root {
	--tkc-iv-tint: #ebe3d8;
	--tkc-step-card: #353333;
	--tkc-form-card: #fffdf9;
	--tkc-selected: #f8eef0;
	--tkc-on-ox: #ecdcdf;
	--tkc-band: 0 0 0 100vmax;
}

/* Buttons: one system for every call to action. */
.tkc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0.95rem 1.6rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font: 600 1.0625rem/1 var(--wp--preset--font-family--sans);
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.tkc-btn--primary { background: var(--tkc-ox); color: var(--tkc-iv); }
.tkc-btn--primary:hover { background: var(--tkc-ch); color: var(--tkc-iv); }
.tkc-btn--light { background: var(--tkc-iv); color: var(--tkc-ox); }
.tkc-btn--light:hover { background: #fff; color: var(--tkc-ox); }
.tkc-btn--outline { border-color: var(--tkc-ox); color: var(--tkc-ox); }
.tkc-btn--outline:hover { background: var(--tkc-ox); color: var(--tkc-iv); }
.tkc-btn--outline-light { border-color: var(--tkc-iv); color: var(--tkc-iv); }
.tkc-btn--outline-light:hover { background: var(--tkc-iv); color: var(--tkc-ox); }

/* Focus on dark backgrounds: ivory, since oxblood on charcoal is 1.19:1. */
:where(.tkc-hero, .tkc-strip, .tkc-cta-band, .tkc-section--how-it-works, .tkc-path, .tkc-section--what-happens-next, .tkc-page--start .tkc-answer) :where(a, button, input):focus-visible {
	outline-color: var(--tkc-iv);
}

/* Header: the bigger logo needs a taller bar; the button keeps the header's own size. */
.site-header { padding-block: 0.9rem; }
.site-header .tkc-header-cta { padding: 0.85rem 1.4rem; font-size: 1rem; }

/* Home hero: two buttons and three trust points. */
.tkc-hero__buttons { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0; }
.tkc-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 1.8rem 0 0; padding: 0; font-size: 0.95rem; color: var(--tkc-on-dark); }
.tkc-chips li::before { content: "✓"; color: var(--tkc-on-ox); font-weight: 700; margin-right: 0.45rem; }

/* The three-figure strip under the hero. */
.tkc-strip { background: var(--tkc-ox); color: var(--tkc-iv); }
.tkc-strip__inner { max-width: 72rem; margin-inline: auto; padding: 0 var(--wp--preset--spacing--40); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tkc-strip__item { margin: 0; padding: 2.1rem 1.5rem; border-left: 1px solid var(--tkc-line-dark); }
.tkc-strip__item:first-child { border-left: 0; padding-left: 0; }
.tkc-strip__item strong { display: block; font: 500 2.3rem/1.1 var(--wp--preset--font-family--serif); }
.tkc-strip__item span { font-size: 1rem; color: var(--tkc-on-ox); }

/* Home: "Chosen on proof" is light again, beside a photo (decorative, CSS only). */
.tkc-section--chosen-on-proof-not-on-who-pays {
	background: none;
	box-shadow: none;
	clip-path: none;
	color: inherit;
	border-top: 0;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	align-content: center;
}
.tkc-section--chosen-on-proof-not-on-who-pays > h2 { color: var(--tkc-ch); }
.tkc-section--chosen-on-proof-not-on-who-pays a { color: var(--tkc-ox); }
.tkc-section--chosen-on-proof-not-on-who-pays > * { grid-column: 1; }
.tkc-section--chosen-on-proof-not-on-who-pays::after {
	content: "";
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: stretch;
	min-height: 22rem;
	border-radius: 18px;
	background: url("assets/img/photos/crown-standard-detail-750.webp") center / cover no-repeat;
}

/* Home: How it works as four cards on a charcoal band, the last in oxblood with the crown. */
.tkc-section--how-it-works {
	background: var(--tkc-ch);
	box-shadow: var(--tkc-band) var(--tkc-ch);
	clip-path: inset(0 -100vmax);
	color: var(--tkc-on-dark);
	border-top: 0;
}
.tkc-section--how-it-works > h2 { color: var(--tkc-iv); }
.tkc-section--how-it-works a { color: var(--tkc-iv); }
.tkc-section--how-it-works > ol { gap: 1.2rem; border-top: 0; }
.tkc-section--how-it-works > ol > li {
	background: var(--tkc-step-card);
	border: 1px solid var(--tkc-line-dark);
	border-radius: 18px;
	padding: 1.8rem 1.5rem;
	color: #d9cfc4;
}
.tkc-section--how-it-works > ol > li strong { color: var(--tkc-iv); }
.tkc-section--how-it-works > ol > li::before { color: #c98b98; font-size: 3rem; }
.tkc-section--how-it-works > ol > li:last-child {
	background: var(--tkc-ox) url("assets/img/crown-ivory.svg") right 1.4rem top 1.6rem / 2.9rem auto no-repeat;
	border-color: var(--tkc-ox);
}

/* Home: selling and buying as two photo cards. */
.tkc-section--selling-buying-or-both { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; border-top: 0; }
.tkc-section--selling-buying-or-both > h2 { grid-column: 1 / -1; margin-bottom: 0; }
.tkc-path {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 25rem;
	padding: 2.2rem;
	border-radius: 22px;
	color: var(--tkc-iv);
	background: linear-gradient(rgb(25 18 20 / 0.7), rgb(25 18 20 / 0.7)), var(--tkc-path-photo) center / cover no-repeat; /* a flat tint, both stops equal */
}
.tkc-path h3 { color: var(--tkc-iv); font-size: 2.2rem; margin: 0 0 0.6rem; }
.tkc-path p { margin: 0 0 1.2rem; color: #eee4d9; }
.tkc-path a:not(.tkc-btn) { color: var(--tkc-iv); }
.tkc-path .tkc-path__cta { margin: 0.4rem 0 0; }

/* Home: the six commitments as equal cards with a check. */
.tkc-section--what-you-can-count-on > ul > li {
	position: relative;
	padding: 4.4rem 1.6rem 1.6rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.0625rem;
	line-height: 1.5;
}
.tkc-section--what-you-can-count-on > ul > li::before {
	content: "";
	position: absolute;
	top: 1.5rem;
	left: 1.6rem;
	width: 2.25rem;
	height: 2.25rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none' stroke='%235B2632' stroke-width='2'%3E%3Ccircle cx='18' cy='18' r='16'/%3E%3Cpath d='M11 18.5l5 5 9-11'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Home: Who is behind it, with Gary's photo. */
.tkc-section--who-is-behind-it { grid-template-columns: 21rem minmax(0, 1fr); align-items: start; }
.tkc-section--who-is-behind-it > * { grid-column: 2; }
.tkc-section--who-is-behind-it > h2 { grid-row: auto; }
.tkc-section--who-is-behind-it > p:first-of-type { background: none; border: 0; padding: 0; }
.tkc-who__photo { grid-column: 1; grid-row: 1 / span 4; margin: 0; }
.tkc-section--who-is-behind-it > .tkc-who__photo { grid-column: 1; }
.tkc-who__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.tkc-who__cta { margin: 0.4rem 0 0; }
.tkc-section--who-is-behind-it > .tkc-reviewed { grid-column: 2; }

/* Every other interior section on a slightly darker ivory band, for rhythm. */
body:not(.tkc-page--start) .tkc-page .tkc-section:not(.tkc-intro):nth-of-type(even),
.tkc-front .tkc-section--what-you-can-count-on {
	background: var(--tkc-iv-tint);
	box-shadow: var(--tkc-band) var(--tkc-iv-tint);
	clip-path: inset(0 -100vmax);
	border-top: 0;
}
.tkc-page .tkc-section:not(.tkc-intro), .tkc-front .tkc-section:not(.tkc-intro) { border-top: 0; }

/* The closing band on every page except Start. */
.tkc-cta-band {
	background: var(--tkc-ox);
	box-shadow: var(--tkc-band) var(--tkc-ox);
	clip-path: inset(0 -100vmax);
	color: var(--tkc-iv);
	text-align: center;
	padding: 5.5rem var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--50);
}
.tkc-cta-band h2 { color: var(--tkc-iv); font-size: clamp(2.2rem, 4vw, 3.1rem); margin: 0 auto 1rem; }
.tkc-cta-band p { max-width: 38rem; margin: 0 auto 2.2rem; color: var(--tkc-on-ox); font-size: 1.1875rem; }
body:has(.tkc-cta-band) .site-footer { margin-top: 0; }
.wp-site-blocks > footer { margin-block-start: 0; }
body.tkc-page--start .wp-site-blocks > main { margin-block-start: 0; }

/* Keyboard focus and in-page jumps land below the sticky header, not under it (WCAG 2.4.11). */
html { scroll-padding-top: 8rem; }

/* The phone bar: phones only. */
.tkc-phone-bar { display: none; }

/* Start: the title, the broker badge and the answer form one oxblood band; the form leads, the next steps sit beside it. */
.tkc-page--start .tkc-page-title,
.tkc-page--start .tkc-badge,
.tkc-page--start .tkc-draft-banner,
.tkc-page--start .tkc-answer {
	background: var(--tkc-ox);
	box-shadow: var(--tkc-band) var(--tkc-ox);
	clip-path: inset(-1px -100vmax);
	color: var(--tkc-iv);
	margin: 0;
}
.tkc-page--start .tkc-answer { max-width: none; }
.tkc-page--start .tkc-page { padding-top: 0; }
.tkc-page--start .tkc-page-title { padding-top: var(--wp--preset--spacing--50); }
.tkc-page--start .tkc-badge { display: flex; align-items: center; gap: 0.9rem; padding: 1.2rem 0 0.4rem; font-size: 0.95rem; color: var(--tkc-on-ox); }
.tkc-page--start .tkc-badge img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; object-position: top; }
.tkc-page--start .tkc-badge b { color: var(--tkc-iv); margin-right: 0.35rem; }
.tkc-page--start .tkc-draft-banner { padding: 0.75rem 0; }
.tkc-page--start .wp-block-post-content {
	margin-top: 0;
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 0 2rem;
	align-items: start;
}
.tkc-page--start .wp-block-post-content > * { grid-column: 1 / -1; margin-block: 0; width: 100%; max-width: none; }
.tkc-page--start .tkc-intro { display: contents; } /* its answer and form join the page grid */
.tkc-page--start .tkc-answer { padding: 1rem 0 6rem; font-size: 1.25rem; color: var(--tkc-on-ox); }
.tkc-page--start .tkc-intro > :not(.tkc-answer) { grid-column: 1; position: relative; margin-top: -4rem; }
.tkc-page--start .tkc-section--what-happens-next {
	grid-column: 2;
	position: relative;
	margin-top: -4rem;
	padding: 2.2rem;
	border-radius: 22px;
	background: var(--tkc-ch);
	color: #d6ccc1;
}
.tkc-page--start .tkc-section--what-happens-next h2 { color: var(--tkc-iv); font-size: 1.7rem; margin: 0 0 1.2rem; }
.tkc-page--start .tkc-section--what-happens-next a { color: #f0d9de; }
.tkc-page--start .tkc-section--what-happens-next ol { list-style: none; counter-reset: tkc-next; padding: 0; margin: 0 0 1.4rem; }
.tkc-page--start .tkc-section--what-happens-next ol li { counter-increment: tkc-next; position: relative; padding: 0 0 1.1rem 3rem; color: var(--tkc-iv); }
.tkc-page--start .tkc-section--what-happens-next ol li::before {
	content: counter(tkc-next);
	position: absolute;
	left: 0;
	top: -0.1rem;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	border: 1px solid #c98b98;
	color: var(--tkc-on-ox);
	display: grid;
	place-items: center;
	font: 500 1.1rem/1 var(--wp--preset--font-family--serif);
}
.tkc-page--start .tkc-section--what-happens-next p { font-size: 0.95rem; margin: 0 0 0.8rem; }
.tkc-page--start .tkc-section--what-happens-next mark.tkc-verify { display: inline-block; }
.tkc-page--start .tkc-section--what-we-will-ask { margin-top: var(--wp--preset--spacing--50); }

/* The form, as one card. */
.tkc-enquiry { max-width: none; background: var(--tkc-form-card); border: 1px solid var(--tkc-line); border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.6rem); }
.tkc-enquiry .tkc-step { border: 0; background: none; padding: 0; }
.tkc-enquiry .tkc-step > legend { font: 500 2rem/1.15 var(--wp--preset--font-family--serif); padding: 0; margin-bottom: 0.6rem; }
.tkc-progress { font: 600 0.95rem/1.4 var(--wp--preset--font-family--sans); letter-spacing: 0; color: var(--tkc-ox); }
.tkc-progress__bar { display: flex; gap: 6px; margin-top: 0.7rem; }
.tkc-progress__bar i { flex: 1; height: 6px; border-radius: 6px; background: var(--tkc-iv-tint); }
.tkc-progress__bar i.on { background: var(--tkc-ox); }
.tkc-choice--cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tkc-choice--cards > legend { grid-column: 1 / -1; }
.tkc-choice--cards > .tkc-error { grid-column: 1 / -1; }
.tkc-choice--cards .tkc-option {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
	margin: 0;
	padding: 1.1rem 1.2rem;
	border: 2px solid var(--tkc-line);
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
}
.tkc-choice--cards .tkc-option:hover { border-color: var(--tkc-ox); }
.tkc-choice--cards .tkc-option:has(input:checked) { border-color: var(--tkc-ox); background: var(--tkc-selected); }
.tkc-choice--cards .tkc-option input { margin-top: 0.3rem; flex: none; }
.tkc-choice--cards label { cursor: pointer; }
.tkc-option__name { display: block; font: 600 1.35rem/1.2 var(--wp--preset--font-family--serif); }
.tkc-option__hint { display: block; font-size: 0.95rem; color: var(--tkc-ink-soft); margin-top: 0.2rem; }
.tkc-enquiry .tkc-nav { border-top: 1px solid var(--tkc-line); padding-top: 1.4rem; }
.tkc-button { min-height: 3rem; padding: 0.9rem 1.6rem; }

/* Design A on small screens. */
@media (max-width: 781px) {
	.site-header .tkc-header-cta { display: none; } /* the phone bar carries it */
	html { scroll-padding-top: 6rem; scroll-padding-bottom: 5.5rem; } /* clear the header and the phone bar */
	.tkc-section--chosen-on-proof-not-on-who-pays { grid-template-columns: minmax(0, 1fr); }
	.tkc-strip__inner { grid-template-columns: minmax(0, 1fr); }
	.tkc-strip__item, .tkc-strip__item:first-child { border-left: 0; border-top: 1px solid var(--tkc-line-dark); padding: 1.3rem 0; }
	.tkc-strip__item:first-child { border-top: 0; }
	.tkc-section--chosen-on-proof-not-on-who-pays::after { grid-column: 1; grid-row: auto; min-height: 14rem; }
	.tkc-section--how-it-works > ol { grid-template-columns: minmax(0, 1fr); }
	.tkc-section--selling-buying-or-both { grid-template-columns: minmax(0, 1fr); }
	.tkc-path { min-height: 20rem; padding: 1.6rem; }
	.tkc-section--who-is-behind-it { grid-template-columns: minmax(0, 1fr); }
	.tkc-section--who-is-behind-it > *, .tkc-section--who-is-behind-it > .tkc-who__photo { grid-column: 1; grid-row: auto; }
	.tkc-who__photo { max-width: 16rem; }
	.tkc-cta-band { padding-block: 3.5rem; }
	.tkc-phone-bar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
		background: var(--tkc-iv);
		border-top: 1px solid var(--tkc-line);
	}
	.tkc-phone-bar .tkc-btn { width: 100%; justify-content: center; }
	body:has(.tkc-phone-bar) { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
	.tkc-page--start .wp-block-post-content { grid-template-columns: minmax(0, 1fr); }
	.tkc-page--start .tkc-section--what-happens-next { grid-column: 1; margin-top: 1.5rem; }
	.tkc-page--start .tkc-intro > :not(.tkc-answer) { margin-top: -3rem; }
	.tkc-choice--cards { grid-template-columns: minmax(0, 1fr); }
}
