/**
 * Kim and Spine — main stylesheet.
 *
 * Sections:
 *   1. Tokens
 *   2. Base + typography
 *   3. Layout helpers
 *   4. Header / navigation
 *   5. Buttons + links
 *   6. Hero + sections
 *   7. Cards, specs, gallery
 *   8. Forms
 *   9. Practitioners
 *  10. Footer
 *  11. Utilities + WordPress core classes
 *  12. Responsive
 */

/* ---------------------------------- 1. Tokens ---------------------------------- */

:root {
	--ks-ink: #10222f;
	--ks-deep: #17384a;
	--ks-teal: #22707f;
	--ks-teal-dark: #185764;
	--ks-warm: #c08a4e;
	/* Warm accent at text-safe contrast: -ink on light grounds, -light on dark. */
	--ks-warm-ink: #8f6329;
	--ks-warm-light: #dcae7c;
	--ks-warm-soft: #f0e2d1;
	--ks-sand: #f7f3ee;
	--ks-paper: #ffffff;
	--ks-line: #e2dcd4;
	--ks-muted: #5b6b76;

	--ks-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ks-font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

	--ks-wrap: 1200px;
	--ks-wrap-narrow: 760px;
	--ks-radius: 10px;
	--ks-shadow: 0 2px 4px rgba(16, 34, 47, 0.06), 0 12px 28px rgba(16, 34, 47, 0.08);
	--ks-shadow-sm: 0 1px 2px rgba(16, 34, 47, 0.06), 0 4px 12px rgba(16, 34, 47, 0.06);
}

/* ------------------------------ 2. Base + type -------------------------------- */

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

body {
	margin: 0;
	overflow-wrap: break-word;
	background: var(--ks-paper);
	color: var(--ks-ink);
	font-family: var(--ks-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
	font-family: var(--ks-font-head);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ks-deep);
	margin: 0 0 0.6em;
	letter-spacing: -0.01em;
}

h1 {
	font-size: clamp(2rem, 4.4vw, 3.05rem);
}

h2 {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
	font-size: 1.25rem;
}

h4 {
	font-size: 1.05rem;
}

p {
	margin: 0 0 1.15rem;
}

a {
	color: var(--ks-teal-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover,
a:focus {
	color: var(--ks-ink);
}

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

ul,
ol {
	padding-left: 1.25rem;
}

li {
	margin-bottom: 0.4rem;
}

hr {
	border: 0;
	border-top: 1px solid var(--ks-line);
	margin: 2.5rem 0;
}

blockquote {
	margin: 1.5rem 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-left: 3px solid var(--ks-warm);
	color: var(--ks-muted);
	font-style: italic;
}

:focus-visible {
	outline: 3px solid var(--ks-warm);
	outline-offset: 2px;
	/* Second ring so the indicator survives on dark and warm backgrounds alike. */
	box-shadow: 0 0 0 6px rgba(16, 34, 47, 0.35);
	border-radius: 3px;
}

.ks-section--deep :focus-visible,
.ks-hero :focus-visible,
.ks-footer :focus-visible,
.ks-topbar :focus-visible {
	outline-color: #ffffff;
	box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.45);
}

/* ------------------------------- 3. Layout ------------------------------------ */

.ks-wrap {
	width: 100%;
	max-width: var(--ks-wrap);
	margin: 0 auto;
	padding: 0 1.25rem;
}

/*
 * Narrow reading column. The wrapper keeps the page's normal width so its left
 * edge lines up with the full-width sections above and below it; the children
 * carry the reading measure.
 */
.ks-wrap--narrow > * {
	max-width: var(--ks-wrap-narrow);
}

.ks-section {
	padding: 4.5rem 0;
}

.ks-section--tight {
	padding: 3rem 0;
}

.ks-section--sand {
	background: var(--ks-sand);
}

.ks-section--deep {
	background: var(--ks-deep);
	color: #e8eef1;
}

.ks-section--deep h2,
.ks-section--deep h3 {
	color: #ffffff;
}

.ks-section--deep a {
	color: var(--ks-warm-soft);
}

.ks-section-head {
	max-width: 42rem;
	margin-bottom: 2.5rem;
}

.ks-section-head--center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.ks-eyebrow {
	display: block;
	font-family: var(--ks-font-body);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ks-warm-ink);
	margin-bottom: 0.6rem;
}

.ks-section--deep .ks-eyebrow,
.ks-hero .ks-eyebrow {
	color: var(--ks-warm-light);
}

.ks-lede {
	font-size: 1.15rem;
	color: var(--ks-muted);
}

.ks-section--deep .ks-lede {
	color: #c4d3da;
}

/* --------------------------- 4. Header / navigation --------------------------- */

.ks-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ks-ink);
	color: #fff;
	padding: 0.75rem 1rem;
	z-index: 999;
}

.ks-skip-link:focus {
	left: 0;
}

.ks-topbar {
	background: var(--ks-deep);
	color: #d7e3e8;
	font-size: 0.875rem;
}

.ks-topbar .ks-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding-top: 0.55rem;
	padding-bottom: 0.55rem;
}

.ks-topbar a {
	color: #ffffff;
	text-decoration: none;
}

.ks-topbar a:hover,
.ks-topbar a:focus {
	text-decoration: underline;
}

.ks-topbar__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ks-topbar__list li {
	margin: 0;
}

.ks-header {
	background: var(--ks-paper);
	border-bottom: 1px solid var(--ks-line);
	position: sticky;
	top: 0;
	z-index: 40;
}

.ks-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.ks-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--ks-deep);
}

.ks-brand__mark {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
}

.ks-brand__name {
	font-family: var(--ks-font-head);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.1;
	display: block;
}

.ks-brand__tag {
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--ks-muted);
}

.ks-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	background: var(--ks-sand);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	color: var(--ks-deep);
	font: inherit;
	font-size: 0.9rem;
	padding: 0.55rem 0.85rem;
	cursor: pointer;
}

.ks-nav {
	display: flex;
	align-items: center;
	gap: 1.15rem;
}

.ks-nav ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

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

.ks-nav a {
	color: var(--ks-deep);
	text-decoration: none;
	font-size: 0.95rem;
	white-space: nowrap;
	font-weight: 500;
	padding: 0.35rem 0;
	display: inline-block;
	border-bottom: 2px solid transparent;
}

.ks-nav a:hover,
.ks-nav a:focus,
.ks-nav .current-menu-item > a,
.ks-nav .current_page_item > a {
	color: var(--ks-teal-dark);
	border-bottom-color: var(--ks-warm);
}

.ks-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 13rem;
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	box-shadow: var(--ks-shadow-sm);
	padding: 0.5rem;
	flex-direction: column;
	gap: 0;
	z-index: 50;
}

.ks-nav li:hover > .sub-menu,
.ks-nav li:focus-within > .sub-menu {
	display: flex;
}

.ks-nav .sub-menu a {
	display: block;
	padding: 0.4rem 0.6rem;
	border-bottom: 0;
}

/* --------------------------- 5. Buttons and links ----------------------------- */

.ks-btn {
	display: inline-block;
	padding: 0.8rem 1.5rem;
	border-radius: var(--ks-radius);
	border: 2px solid transparent;
	background: var(--ks-teal);
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ks-btn:hover,
.ks-btn:focus {
	background: var(--ks-teal-dark);
	color: #ffffff;
}

.ks-btn--warm {
	background: var(--ks-warm);
	color: var(--ks-ink);
}

.ks-btn--warm:hover,
.ks-btn--warm:focus {
	background: #ac7940;
	color: var(--ks-ink);
}

.ks-btn--ghost {
	background: transparent;
	border-color: currentColor;
	color: var(--ks-deep);
}

.ks-btn--ghost:hover,
.ks-btn--ghost:focus {
	background: var(--ks-deep);
	color: #ffffff;
}

/* Ghost buttons invert on any dark ground — the hero included. */
.ks-section--deep .ks-btn--ghost,
.ks-hero .ks-btn--ghost {
	color: #ffffff;
}

.ks-section--deep .ks-btn--ghost:hover,
.ks-section--deep .ks-btn--ghost:focus,
.ks-hero .ks-btn--ghost:hover,
.ks-hero .ks-btn--ghost:focus {
	background: #ffffff;
	color: var(--ks-deep);
}

.ks-nav > .ks-btn {
	padding: 0.6rem 1.05rem;
	font-size: 0.92rem;
	white-space: nowrap;
	color: #ffffff;
}

/*
 * .ks-nav a and .ks-section--deep a are more specific than the button
 * modifiers, so buttons in those contexts need their colours restated or the
 * label washes out against the button fill. The warm rule must follow the
 * generic one: same specificity, so source order decides.
 */
.ks-section--deep .ks-btn {
	color: #ffffff;
}

.ks-nav > .ks-btn--warm,
.ks-section--deep .ks-btn--warm {
	color: var(--ks-ink);
}

.ks-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 1.75rem;
}

.ks-arrow-link {
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.ks-arrow-link::after {
	content: "\2192";
	transition: transform 0.15s ease;
}

.ks-arrow-link:hover::after,
.ks-arrow-link:focus::after {
	transform: translateX(3px);
}

/* ---------------------------- 6. Hero and sections ---------------------------- */

.ks-hero {
	background: linear-gradient(160deg, #123344 0%, #17384a 45%, #1d4a5c 100%);
	color: #eaf1f4;
	padding: 4.5rem 0 4rem;
	position: relative;
	overflow: hidden;
}

.ks-hero::after {
	content: "";
	position: absolute;
	right: -12%;
	top: -35%;
	width: 46rem;
	height: 46rem;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(192, 138, 78, 0.28) 0%, rgba(192, 138, 78, 0) 68%);
	pointer-events: none;
}

.ks-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 3rem;
	align-items: center;
}

.ks-hero h1 {
	color: #ffffff;
	margin-bottom: 1rem;
}

.ks-hero p {
	color: #cfdde3;
	font-size: 1.15rem;
	max-width: 34rem;
}

.ks-hero__meta {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	font-size: 0.95rem;
	color: #cfdde3;
}

.ks-hero__meta strong {
	display: block;
	color: #ffffff;
	font-size: 1.05rem;
}

/* A framed, shadowed image block — used in the hero and beside body sections. */
.ks-framed-figure {
	border-radius: var(--ks-radius);
	overflow: hidden;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
	background: #0d1c26;
}

.ks-framed-figure img,
.ks-framed-figure svg {
	width: 100%;
	height: auto;
	display: block;
}

/* Two-column text/media split used on interior pages. */
.ks-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.ks-split--wide-text {
	grid-template-columns: 1.15fr 0.85fr;
}

/* ----------------------- 7. Cards, specs and gallery -------------------------- */

.ks-grid {
	display: grid;
	gap: 1.5rem;
}

.ks-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ks-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ks-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ks-card {
	background: var(--ks-paper);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	padding: 1.75rem;
	box-shadow: var(--ks-shadow-sm);
	display: flex;
	flex-direction: column;
}

.ks-card h3 {
	margin-bottom: 0.5rem;
}

.ks-card p:last-child {
	margin-bottom: 0;
}

.ks-card__icon {
	width: 40px;
	height: 40px;
	margin-bottom: 1rem;
	color: var(--ks-teal);
}

.ks-card--audience {
	border-top: 4px solid var(--ks-teal);
}

.ks-card--audience.ks-card--warm {
	border-top-color: var(--ks-warm);
}

.ks-card--audience .ks-btn-row {
	margin-top: auto;
	padding-top: 1.25rem;
}

.ks-specs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.ks-specs--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 2.5rem;
}

@media (max-width: 600px) {
	.ks-specs--two {
		grid-template-columns: 1fr;
	}
}

.ks-specs li {
	margin: 0;
	padding-left: 1.9rem;
	position: relative;
}

.ks-specs li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5rem;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	border: 3px solid var(--ks-warm);
}

.ks-specs strong {
	display: block;
	color: var(--ks-deep);
}

.ks-section--deep .ks-specs strong {
	color: #ffffff;
}

.ks-stat-row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	margin-top: 2.5rem;
}

.ks-stat {
	border-left: 3px solid var(--ks-warm);
	padding-left: 1rem;
}

.ks-stat__value {
	font-family: var(--ks-font-head);
	font-size: 1.85rem;
	color: var(--ks-deep);
	display: block;
	line-height: 1.1;
}

.ks-section--deep .ks-stat__value {
	color: #ffffff;
}

.ks-stat__label {
	font-size: 0.9rem;
	color: var(--ks-muted);
}

.ks-section--deep .ks-stat__label {
	color: #b9cbd3;
}

.ks-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.ks-gallery__item {
	margin: 0;
	background: var(--ks-paper);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	overflow: hidden;
	box-shadow: var(--ks-shadow-sm);
	display: flex;
	flex-direction: column;
}

.ks-gallery__media {
	background: var(--ks-sand);
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.ks-gallery__media img,
.ks-gallery__media svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ks-gallery__caption {
	padding: 1rem 1.15rem 1.25rem;
	font-size: 0.95rem;
	color: var(--ks-muted);
}

.ks-gallery__caption strong {
	display: block;
	color: var(--ks-deep);
	font-family: var(--ks-font-head);
	font-size: 1.08rem;
	margin-bottom: 0.2rem;
}

.ks-gallery__caption p {
	margin: 0;
}

.ks-note {
	background: var(--ks-warm-soft);
	border-left: 4px solid var(--ks-warm);
	border-radius: 0 var(--ks-radius) var(--ks-radius) 0;
	padding: 1.15rem 1.35rem;
	margin: 2rem 0;
	font-size: 0.98rem;
}

.ks-note p:last-child {
	margin-bottom: 0;
}

.ks-steps {
	list-style: none;
	counter-reset: ks-step;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.5rem;
}

.ks-steps li {
	counter-increment: ks-step;
	position: relative;
	padding-left: 3.5rem;
	margin: 0;
}

.ks-steps li::before {
	content: counter(ks-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--ks-teal);
	color: #fff;
	font-family: var(--ks-font-head);
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ks-steps h3 {
	margin-bottom: 0.35rem;
}

.ks-faq {
	border-top: 1px solid var(--ks-line);
}

.ks-faq details {
	border-bottom: 1px solid var(--ks-line);
	padding: 1.15rem 0;
}

.ks-faq summary {
	cursor: pointer;
	font-family: var(--ks-font-head);
	font-size: 1.12rem;
	color: var(--ks-deep);
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: baseline;
}

.ks-faq summary::-webkit-details-marker {
	display: none;
}

.ks-faq summary::after {
	content: "+";
	color: var(--ks-warm-ink);
	font-size: 1.4rem;
	line-height: 1;
}

.ks-faq details[open] summary::after {
	content: "\2013";
}

.ks-faq details > *:not(summary) {
	margin-top: 0.9rem;
}


/* --------------------------------- Carousel ---------------------------------- */

/*
 * Before JavaScript runs, .ks-carousel is a plain stacked list of figures. The
 * .is-enhanced class switches it to a single-slide view, so a script failure
 * degrades to readable content rather than an empty box.
 */
.ks-carousel {
	position: relative;
}

.ks-carousel__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.5rem;
}

.ks-carousel__slide figure {
	margin: 0;
	background: var(--ks-paper);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	overflow: hidden;
	box-shadow: var(--ks-shadow-sm);
}

.ks-carousel__media {
	background: var(--ks-sand);
	aspect-ratio: 16 / 9;
}

.ks-carousel__media img,
.ks-carousel__media svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ks-carousel__caption {
	padding: 1.15rem 1.35rem 1.4rem;
	color: var(--ks-muted);
}

.ks-carousel__caption strong {
	display: block;
	font-family: var(--ks-font-head);
	font-size: 1.2rem;
	color: var(--ks-deep);
	margin-bottom: 0.25rem;
}

.ks-carousel__caption p {
	margin: 0;
}

.ks-carousel.is-enhanced .ks-carousel__track {
	display: block;
}

.ks-carousel.is-enhanced .ks-carousel__slide {
	display: none;
}

.ks-carousel.is-enhanced .ks-carousel__slide.is-active {
	display: block;
	animation: ks-fade 0.4s ease;
}

@keyframes ks-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/*
 * The controls are markup-hidden until the script enhances the carousel. The
 * display rule below would otherwise beat the browser's own [hidden] styling
 * and show controls that do nothing.
 */
.ks-carousel__controls[hidden] {
	display: none;
}

.ks-carousel__controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.25rem;
}

.ks-carousel__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 44px minimum target, per WCAG 2.5.5. */
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	background: var(--ks-paper);
	color: var(--ks-deep);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.ks-carousel__btn:hover,
.ks-carousel__btn:focus-visible {
	background: var(--ks-deep);
	color: #ffffff;
	border-color: var(--ks-deep);
}

.ks-carousel__dots {
	display: flex;
	align-items: center;
	/* Wraps rather than overflowing once there are more dots than room. */
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
	list-style: none;
	margin: 0 0 0 auto;
	padding: 0;
	max-width: 100%;
}

.ks-carousel__dots li {
	margin: 0;
}

.ks-carousel__dot {
	display: block;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	position: relative;
}

.ks-carousel__dot::before {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	border: 2px solid var(--ks-deep);
	background: transparent;
}

.ks-carousel__dot.is-current::before,
.ks-carousel__dot:hover::before {
	background: var(--ks-deep);
}

@media (max-width: 600px) {
	.ks-carousel__dots {
		margin-left: 0;
		width: 100%;
		justify-content: center;
	}
}

/* --------------------------------- 8. Forms ----------------------------------- */

.ks-form {
	background: var(--ks-paper);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	padding: 2rem;
	box-shadow: var(--ks-shadow);
}

.ks-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.ks-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ks-field--full {
	grid-column: 1 / -1;
}

.ks-field label {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--ks-deep);
}

/* Required is stated in words, never by colour or a bare asterisk alone. */
.ks-required {
	color: #8a3524;
	font-weight: 500;
	font-size: 0.85em;
}

.ks-field__error {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	color: #8a3524;
	font-size: 0.9rem;
	font-weight: 600;
}

.ks-field__error span[aria-hidden] {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: #8a3524;
	color: #fff;
	font-size: 0.8rem;
	line-height: 1;
}

.ks-field input[aria-invalid="true"],
.ks-field select[aria-invalid="true"],
.ks-field textarea[aria-invalid="true"] {
	border-color: #8a3524;
	border-width: 2px;
}

.ks-fieldset {
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	padding: 1rem 1.15rem 1.15rem;
	margin: 0;
}

.ks-fieldset legend {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--ks-deep);
	padding: 0 0.35rem;
}

.ks-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400;
	line-height: 1.45;
	/* Comfortable target for anyone using a touch screen or a head pointer. */
	min-height: 44px;
	padding: 0.35rem 0;
	cursor: pointer;
}

.ks-choice input {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0.1rem 0 0;
	flex: 0 0 auto;
	accent-color: var(--ks-teal);
}

/*
 * Flex items default to min-width:auto, so a long label would push past the
 * form on a narrow screen instead of wrapping inside it.
 */
.ks-choice > span {
	flex: 1 1 auto;
	min-width: 0;
}

.ks-note--urgent {
	background: #fbeeea;
	border-left-color: #8a3524;
}

/*
 * Text inputs fill their field. Checkboxes and radios must be excluded: a
 * full-width checkbox pushes its own label out of the form.
 */
.ks-field input:not([type="checkbox"]):not([type="radio"]),
.ks-field select,
.ks-field textarea {
	font: inherit;
	font-size: 1rem;
	color: var(--ks-ink);
	background: #fff;
	border: 1px solid #c8c1b8;
	border-radius: 8px;
	padding: 0.65rem 0.75rem;
	width: 100%;
}

.ks-field input:focus,
.ks-field select:focus,
.ks-field textarea:focus {
	border-color: var(--ks-teal);
	outline: 3px solid rgba(34, 112, 127, 0.18);
	outline-offset: 0;
}

.ks-field textarea {
	min-height: 9rem;
	resize: vertical;
}

.ks-field__hint {
	font-size: 0.85rem;
	color: var(--ks-muted);
}

.ks-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ks-alert {
	border-radius: var(--ks-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border-left: 4px solid;
}

.ks-alert p:last-child,
.ks-alert ul:last-child {
	margin-bottom: 0;
}

.ks-alert--success {
	background: #e8f3ee;
	border-color: #2c7a5b;
	color: #17442f;
}

.ks-alert--error {
	background: #fbeeea;
	border-color: #a2412f;
	color: #6d2618;
}

/* ----------------------------- 9. Practitioners ------------------------------- */

.ks-practitioner {
	background: var(--ks-paper);
	border: 1px solid var(--ks-line);
	border-radius: var(--ks-radius);
	overflow: hidden;
	box-shadow: var(--ks-shadow-sm);
	display: grid;
	grid-template-columns: 260px 1fr;
}

.ks-practitioner + .ks-practitioner {
	margin-top: 2rem;
}

.ks-practitioner__media {
	background: var(--ks-sand);
	min-height: 100%;
}

.ks-practitioner__media img,
.ks-practitioner__media svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ks-practitioner__body {
	padding: 2rem;
}

.ks-practitioner__name {
	margin-bottom: 0.15rem;
}

.ks-practitioner__role {
	color: var(--ks-warm-ink);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	margin-bottom: 1rem;
}

.ks-practitioner__meta {
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid var(--ks-line);
	display: grid;
	gap: 0.5rem;
	font-size: 0.95rem;
}

.ks-practitioner__meta li {
	margin: 0;
}

.ks-practitioner__meta span {
	color: var(--ks-muted);
	display: inline-block;
	min-width: 6.5rem;
}

.ks-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 2.5rem;
}

/* --------------------------------- 10. Footer --------------------------------- */

.ks-footer {
	background: var(--ks-ink);
	color: #b9c8d1;
	padding: 3.5rem 0 2rem;
	font-size: 0.95rem;
}

.ks-footer h2,
.ks-footer h3 {
	color: #ffffff;
	font-size: 1.05rem;
	margin-bottom: 0.85rem;
}

.ks-footer a {
	color: #ffffff;
	text-decoration: none;
}

.ks-footer a:hover,
.ks-footer a:focus {
	text-decoration: underline;
}

.ks-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 2rem;
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.ks-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2.5rem;
}

.ks-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ks-footer li {
	margin-bottom: 0.5rem;
}

.ks-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-top: 2rem;
}

.ks-footer__bottom {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
	font-size: 0.86rem;
	color: #8ba0ad;
}

.ks-footer__disclaimer {
	max-width: 46rem;
	font-size: 0.86rem;
	color: #8ba0ad;
	margin-top: 1.25rem;
}

/* ------------------------- 11. Utilities + WP core ---------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	display: block;
	padding: 0.75rem 1rem;
	background: #fff;
	z-index: 100;
}

.ks-entry {
	padding: 3.5rem 0;
}

.ks-entry__header {
	margin-bottom: 2rem;
}

.ks-entry__meta {
	color: var(--ks-muted);
	font-size: 0.92rem;
}

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

/*
 * Links in running text are underlined rather than distinguished by colour
 * alone (WCAG 1.4.1). Buttons and arrow links carry their own affordance.
 */
.ks-content a:not(.ks-btn):not(.ks-arrow-link),
.ks-card p a:not(.ks-btn):not(.ks-arrow-link),
.ks-faq a,
.ks-note a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ks-content img,
.wp-caption img {
	border-radius: var(--ks-radius);
}

.alignleft {
	float: left;
	margin: 0.35rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.35rem 0 1rem 1.5rem;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.alignwide,
.alignfull {
	max-width: 100%;
}

.wp-caption-text,
.wp-element-caption {
	font-size: 0.88rem;
	color: var(--ks-muted);
}

.ks-pagination {
	margin-top: 2.5rem;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ks-pagination .page-numbers {
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--ks-line);
	border-radius: 6px;
	text-decoration: none;
}

.ks-pagination .current {
	background: var(--ks-deep);
	color: #fff;
	border-color: var(--ks-deep);
}

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

/* ------------------------------ 12. Responsive -------------------------------- */

@media (max-width: 960px) {
	.ks-hero__inner,
	.ks-split,
	.ks-split--wide-text {
		grid-template-columns: 1fr;
	}

	.ks-grid--3,
	.ks-grid--4,
	.ks-gallery,
	.ks-stat-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ks-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.ks-practitioner {
		grid-template-columns: 1fr;
	}

	.ks-practitioner__media {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 782px) {
	.ks-header--sticky-off .ks-header {
		position: static;
	}

	.ks-nav-toggle {
		display: inline-flex;
	}

	.ks-nav {
		display: none;
		width: 100%;
		order: 3;
		padding-bottom: 1rem;
	}

	.ks-nav.is-open {
		display: block;
	}

	.ks-header__inner {
		flex-wrap: wrap;
	}

	.ks-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.ks-nav li {
		border-bottom: 1px solid var(--ks-line);
	}

	.ks-nav a {
		display: flex;
		align-items: center;
		/* 44px minimum touch target, per WCAG 2.5.5. */
		min-height: 44px;
		padding: 0.75rem 0;
		border-bottom: 0;
	}

	.ks-nav .sub-menu {
		display: flex;
		position: static;
		border: 0;
		box-shadow: none;
		padding: 0 0 0.5rem 1rem;
	}
}

@media (max-width: 600px) {
	.ks-section {
		padding: 3rem 0;
	}

	.ks-grid--2,
	.ks-grid--3,
	.ks-grid--4,
	.ks-gallery,
	.ks-stat-row,
	.ks-columns,
	.ks-form__grid {
		grid-template-columns: 1fr;
	}

	.ks-footer__grid {
		grid-template-columns: 1fr;
	}

	.ks-form {
		padding: 1.25rem;
	}

	.ks-practitioner__body {
		padding: 1.5rem;
	}
}

@media (prefers-contrast: more) {
	:root {
		--ks-muted: #3b4a54;
		--ks-line: #9aa4ac;
		--ks-warm-ink: #7a5222;
		--ks-teal: #12525f;
		--ks-teal-dark: #0e414c;
	}

	.ks-card,
	.ks-form,
	.ks-gallery__item,
	.ks-carousel__slide figure,
	.ks-practitioner {
		border-width: 2px;
	}

	.ks-content a:not(.ks-btn) {
		text-decoration-thickness: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	.ks-carousel.is-enhanced .ks-carousel__slide.is-active {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.ks-topbar,
	.ks-nav,
	.ks-nav-toggle,
	.ks-framed-figure,
	.ks-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-top: 2rem;
}

.ks-footer__bottom {
		display: none !important;
	}

	body {
		color: #000;
	}
}

/* Scheduling system VPN notice
   ------------------------------------------------------------------ */

.ks-vpn-note {
	margin-top: 0.75rem;
	font-size: 0.92rem;
	color: var(--ks-muted);
}

/* The alert is revealed by removing [hidden], and a display rule elsewhere in
   this file would otherwise keep it visible while hidden — the same trap the
   carousel controls fell into. */
.ks-vpn-error[hidden] {
	display: none;
}

.ks-vpn-error {
	margin-top: 0.9rem;
	margin-bottom: 0;
}

.ks-vpn-error:focus-visible {
	outline: 3px solid var(--ks-teal-dark);
	outline-offset: 2px;
}

/* Inline caveat under a section intro — quieter than the body copy, so a
   "still in development" note reads as context rather than a headline. */
.ks-note-inline {
	font-size: 0.95rem;
	color: var(--ks-muted);
}

.ks-section--deep .ks-note-inline {
	color: var(--ks-warm-light);
}
