/* Kreilio Sites theme: products home and /products/ on kreilio.com (lane home-all-products). Loaded by inc/products.php only where the content has .ksp- markup.
   Sits on top of house Maison (house-base.css + house-maison.css): same tokens, same type. Light by default, dark through prefers-color-scheme.
   Accent indigo only for chips, links and focus. No shadows, radius 0, hairlines (design/v2-world-brand/00-DIRECTION.md). */

/* ---- dark theme: only the variables change, so header, footer and every section follow ---- */
body.ksp { color-scheme: light dark; --ksp-band-bg: #0b0b0b; --ksp-band-fg: #f5f2eb; --ksp-ind-1: #455ff1; --ksp-ind-2: #7088ff; --ksp-tone: var(--ks-surface-2); }
@media (prefers-color-scheme: dark) {
	body.ksp {
		--wp--preset--color--surface: #0e0f12; --wp--preset--color--surface-2: #17181d; --wp--preset--color--surface-inverse: #f5f2eb;
		--wp--preset--color--text: #f2efe9; --wp--preset--color--text-muted: #a9a69f; --wp--preset--color--border: #2a2c34; --wp--preset--color--border-strong: #6b6d78;
		--wp--preset--color--accent: #f2efe9; --wp--preset--color--accent-hover: #ffffff; --wp--preset--color--accent-text: #8da0ff; --wp--preset--color--on-accent: #0e0f12; --wp--preset--color--focus: #8da0ff;
		--ksp-band-bg: #1d2030; --ksp-band-fg: #f2efe9; --ks-success: #5fd6c0;
		background: var(--wp--preset--color--surface);
	}
}

/* ---- small parts ---- */
.ksp-label { font: var(--ks-m-label-w, 500) var(--ks-m-label-fs, 0.75rem)/1.4 var(--ks-m-font-ui); letter-spacing: var(--ks-m-track-caps, 0.08em); text-transform: uppercase; color: var(--ks-text-muted); }
.ksp-chip { display: inline-block; padding: 4px 10px; border: 1px solid currentColor; font: 500 0.75rem/1.3 var(--ks-m-font-ui); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.ksp-chip--now { color: var(--ks-success); }
.ksp-chip--soon { color: var(--ks-accent-text); }
.ksp-chip--plan { color: var(--ks-text-muted); border-style: dashed; }
.ksp-chip--dev { background: var(--ksp-ind-1); color: #fff; border-color: transparent; }
.ksp-lead { font-size: 1.125rem; line-height: 1.55; max-width: 62ch; margin: 0 0 20px; }
.ksp-note { margin: 20px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--ks-text-muted); max-width: 70ch; }
.ksp-price { margin: 20px 0 12px; font-size: 0.9375rem; line-height: 1.5; }
.ksp-price .ksp-label { margin-right: 8px; }
.ksp-open { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-height: 44px; align-content: center; color: var(--ks-text); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a.ksp-open:hover, .ksp-more:hover { text-decoration-thickness: 2px; }
.ksp-open--wait { text-decoration: none; }
.ksp-open--wait .ksp-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--ks-text); font-weight: 500; text-underline-offset: 4px; }
.ksp-open__host { font-weight: 400; font-size: 0.8125rem; color: var(--ks-text-muted); text-decoration: none; }
.ksp-feat { list-style: none; margin: 0 0 8px; padding: 0; max-width: 62ch; }
.ksp-feat li { position: relative; margin: 0; padding: 10px 0 10px 28px; border-top: 1px solid var(--ks-border); line-height: 1.45; }
.ksp-feat li:last-child { border-bottom: 1px solid var(--ks-border); }
.ksp-feat li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 14px; height: 1px; background: var(--ks-accent-text); }
.ksp-feat--cols { max-width: none; }
@media (min-width: 900px) { .ksp-feat--cols { columns: 2; column-gap: 40px; } .ksp-feat--cols li { break-inside: avoid; } }

/* ---- interface illustrations (decorative) ---- */
.ksp-plate, .ksp-plate * { box-sizing: border-box; }
.ksp-plate { display: grid; grid-template-rows: auto 1fr; aspect-ratio: 16 / 10; width: 100%; border: 1px solid var(--ks-border-strong); background: var(--ks-surface); overflow: hidden; }
.ksp-plate__bar { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--ks-border); grid-column: 1 / -1; }
.ksp-plate__bar b { width: 8px; height: 8px; border: 1px solid var(--ks-border-strong); border-radius: 50%; }
.ksp-plate--timeline { grid-template-rows: auto 1fr auto; }
.ksp-plate__view { padding: 10px; }
.ksp-plate__view i { display: block; height: 100%; min-height: 60px; background: var(--ksp-ind-1); }
.ksp-plate__tracks { padding: 0 10px 10px; display: grid; gap: 6px; }
.ksp-plate__tracks div { display: flex; gap: 6px; }
.ksp-plate__tracks i { display: block; flex: 0 0 30%; height: 12px; background: var(--ks-border-strong); opacity: 0.55; }
.ksp-plate__tracks div:nth-child(1) i:nth-child(1) { flex-basis: 38%; } .ksp-plate__tracks div:nth-child(1) i:nth-child(2) { flex-basis: 24%; }
.ksp-plate__tracks div:nth-child(2) i:nth-child(1) { flex-basis: 18%; } .ksp-plate__tracks div:nth-child(2) i:nth-child(2) { flex-basis: 52%; }
.ksp-plate__tracks div:nth-child(3) i:nth-child(1) { flex-basis: 70%; } .ksp-plate__tracks div:nth-child(3) i:nth-child(2) { flex-basis: 22%; }
.ksp-plate__tracks div:nth-child(2) i { background: var(--ks-accent-text); opacity: 0.7; }
.ksp-plate__shot { min-height: 0; overflow: hidden; }
.ksp-plate__shot :is(picture, img) { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ksp-plate--dash { grid-template-columns: 22% 1fr; }
.ksp-plate__rail { display: grid; align-content: start; gap: 8px; padding: 10px; border-right: 1px solid var(--ks-border); }
.ksp-plate__rail i { display: block; height: 8px; background: var(--ks-border-strong); opacity: 0.5; }
.ksp-plate__cards { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 8px; padding: 10px; }
.ksp-plate__cards > div { border: 1px solid var(--ks-border); padding: 8px; display: grid; gap: 6px; }
.ksp-plate__cards i { display: block; height: 10px; width: 50%; background: var(--ks-accent-text); opacity: 0.8; }
.ksp-plate__cards u { display: block; height: 6px; width: 80%; background: var(--ks-border-strong); opacity: 0.5; text-decoration: none; }
.ksp-plate__wide { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 6px; }
.ksp-plate__wide em { flex: 1; height: 40%; background: var(--ks-border-strong); opacity: 0.5; }
.ksp-plate__wide em:nth-child(2) { height: 65%; } .ksp-plate__wide em:nth-child(3) { height: 50%; } .ksp-plate__wide em:nth-child(4) { height: 82%; } .ksp-plate__wide em:nth-child(5) { height: 58%; } .ksp-plate__wide em:nth-child(6) { height: 90%; }
.ksp-plate__wide em:nth-child(even) { background: var(--ks-accent-text); opacity: 0.7; }
.ksp-plate__rows { display: grid; align-content: start; }
.ksp-plate__rows > div { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; gap: 4px 10px; padding: 8px 12px; border-bottom: 1px solid var(--ks-border); }
.ksp-plate__rows .is-on { background: var(--ks-surface-2); }
.ksp-plate__rows s { grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; background: var(--ks-border-strong); opacity: 0.5; }
.ksp-plate__rows i { display: block; height: 7px; width: 40%; background: var(--ks-text); opacity: 0.7; }
.ksp-plate__rows u { display: block; height: 6px; width: 75%; background: var(--ks-border-strong); opacity: 0.5; text-decoration: none; }
.ksp-plate__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; align-items: start; }
.ksp-plate__cols div { display: grid; gap: 6px; }
.ksp-plate__cols i { display: block; height: 28px; border: 1px solid var(--ks-border-strong); }
.ksp-plate__cols div:first-child i:first-child { background: var(--ks-accent-text); opacity: 0.75; border-color: transparent; }
.ksp-plate__area { display: block; margin: 14px; background: var(--ks-accent-text); opacity: 0.35; clip-path: polygon(0 78%, 15% 69%, 30% 73%, 45% 49%, 60% 53%, 75% 29%, 100% 15%, 100% 100%, 0 100%); }
.ksp-plate__tbl { display: grid; align-content: start; }
.ksp-plate__tbl > div { display: grid; grid-template-columns: 1fr 22% 16%; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--ks-border); }
.ksp-plate__tbl i, .ksp-plate__tbl u, .ksp-plate__tbl s { display: block; height: 6px; background: var(--ks-border-strong); opacity: 0.5; text-decoration: none; }
.ksp-plate__tbl s { background: var(--ks-accent-text); opacity: 0.7; }

/* ---- hero: one object ---- */
.ksp-hero-plates .ksp-plate { background: var(--ks-surface); }
body.ksp .ksites-m-hero.is-roomy { padding-bottom: clamp(48px, 6vw, 96px); }
.ksp-ln { display: block; }

/* ---- index ---- */
.ksp-index { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ks-border); max-width: none; }
.ksp-index > li { margin: 0; border-top: 1px solid var(--ks-border); max-width: none; }
.ksp-index__a { display: grid; grid-template-columns: 2.5rem 1fr; grid-template-areas: "n name" "n line" "n s"; gap: 4px 12px; align-items: center; min-height: 64px; padding: 14px 0; color: var(--ks-text); text-decoration: none; transition: background-color 160ms ease, transform 160ms ease; }
.ksp-index__a:hover { background: var(--ks-surface-2); transform: translateX(12px); text-decoration: none; }
.ksp-index__n { grid-area: n; font: 500 0.75rem/1.4 var(--ks-m-font-ui); letter-spacing: 0.08em; color: var(--ks-text-muted); }
.ksp-index__name { grid-area: name; font: 400 clamp(1.375rem, 1.1rem + 1vw, 2rem)/1.1 var(--ks-m-font-display); letter-spacing: -0.01em; }
.ksp-index__line { grid-area: line; font-size: 0.9375rem; color: var(--ks-text-muted); }
.ksp-index__s { grid-area: s; justify-self: start; margin-top: 6px; }
.ksp-index__go { display: none; }
@media (min-width: 900px) {
	.ksp-index__a { grid-template-columns: 4rem 17rem 1fr auto 2rem; grid-template-areas: "n name line s go"; gap: 0 20px; }
	.ksp-index__s { justify-self: end; margin-top: 0; }
	.ksp-index__go { display: block; grid-area: go; transition: transform 160ms ease; }
	.ksp-index__a:hover .ksp-index__go { transform: translateX(4px); }
}

/* ---- Kreilio AI band (dark in both themes) ---- */
section.ksites-m-showcase:has(.ksp-ai) {
	--wp--preset--color--text: var(--ksp-band-fg); --wp--preset--color--text-muted: #b9b5ac; --wp--preset--color--border: #34363d; --wp--preset--color--border-strong: #6b6d78; --wp--preset--color--accent-text: #9db0ff;
	--ks-text: var(--ksp-band-fg); --ks-text-muted: #b9b5ac; --ks-border: #34363d; --ks-border-strong: #6b6d78; --ks-accent-text: #9db0ff; --ks-link: #9db0ff;
	background: var(--ksp-band-bg); color: var(--ksp-band-fg);
}
@media (prefers-color-scheme: dark) { section.ksites-m-showcase:has(.ksp-ai) { border-block: 1px solid #3a3d4a; } .ksp-part__name { font-weight: 500; } }
.ksp-ai__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 28px; }
.ksp-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 40px; max-width: none; }
.ksp-part { margin: 0; padding: 22px 0 26px; border-top: 1px solid var(--ks-border); max-width: none; }
.ksp-part__name { margin: 0 0 8px; font: 400 clamp(1.375rem, 1.1rem + 1vw, 1.875rem)/1.1 var(--ks-m-font-display); }
.ksp-part__line { margin: 0 0 14px; color: var(--ks-text-muted); line-height: 1.5; }
.ksp-part__items { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.ksp-part__items li { margin: 0; padding: 6px 0 6px 18px; position: relative; line-height: 1.4; }
.ksp-part__items li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 10px; height: 1px; background: var(--ks-accent-text); }
@media (min-width: 700px) { .ksp-parts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ksp-parts { grid-template-columns: repeat(3, 1fr); } }
.ksp-ai__foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; padding-top: 24px; border-top: 1px solid var(--ks-border); }
.ksp-ai__foot .ksp-feat { margin-bottom: 16px; }
.ksp-ai__foot .ksp-price { margin: 0; }
.ksp-ai .ksp-open { color: var(--ks-text); }

/* ---- Sites: text + rail of real demo pictures ---- */
.ksp-sites { display: grid; gap: 32px; min-width: 0; }
.ksp-sites__meta, .ksp-detail__meta, .ksp-card__meta, .ksp-also__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.ksp-rail { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; min-width: 0; max-width: none; }
.ksp-rail > li { flex: 0 0 min(78%, 300px); margin: 0; scroll-snap-align: start; max-width: none; }
.ksp-rail__a { display: grid; gap: 8px; color: var(--ks-text); text-decoration: none; min-height: 44px; }
.ksp-rail__img { display: block; min-height: 120px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ks-surface-2); border: 1px solid var(--ks-border); }
.ksp-rail__img :is(picture, img) { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 280ms ease; }
.ksp-rail__a:hover .ksp-rail__img img { transform: scale(1.03); }
.ksp-rail__kind { font: 400 1.125rem/1.2 var(--ks-m-font-display); }
.ksp-rail__open { font-size: 0.8125rem; color: var(--ks-text-muted); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) { .ksp-sites { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; } .ksp-sites .ksp-note { grid-column: 1 / -1; margin-top: 0; } }

/* ---- Cloud + Mail pair ---- */
.ksp-pair { display: grid; gap: 48px; }
.ksp-card { min-width: 0; }
.ksp-card .ksp-plate { margin-bottom: 20px; }
.ksp-card__name { margin: 0 0 12px; font: 400 clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem)/1.1 var(--ks-m-font-display); letter-spacing: -0.01em; }
@media (min-width: 900px) { .ksp-pair { grid-template-columns: 1fr 1fr; gap: 0 72px; align-items: start; background: linear-gradient(var(--ks-border), var(--ks-border)) center / 1px 100% no-repeat; } }

/* ---- CRM chapters, also-on-the-way, detail ---- */
.ksp-chapter h3 { margin-bottom: 0; }
.ksp-chapter-foot { display: grid; justify-items: start; gap: 4px; padding-top: 24px; }
.ksp-also { display: grid; gap: 40px; }
.ksp-also__item { padding-top: 24px; border-top: 1px solid var(--ks-border-strong); min-width: 0; }
@media (min-width: 768px) { .ksp-also { grid-template-columns: 1fr 1fr; gap: 56px; } }
.ksp-detail { display: grid; gap: 28px; min-width: 0; }
.ksp-detail__media, .ksp-detail__txt { min-width: 0; }
@media (min-width: 900px) {
	.ksp-detail { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
	.ksp-detail--flip .ksp-detail__media { order: 2; }
}
.ksp-glance th a { color: var(--ks-text); }

@media (prefers-reduced-motion: reduce) { .ksp-index__a, .ksp-index__go, .ksp-rail__img img { transition: none; } }

/* house-base caps every li/p at the reading measure (specificity 0,2,0); grid and rail items must be free of it */
.ksites-house .ksp-index > li, .ksites-house .ksp-parts > li, .ksites-house .ksp-rail > li, .ksites-house .ksp-also__item { max-width: none; }
.ksites-house .ksp-index__line, .ksites-house .ksp-part__line { max-width: 60ch; }
.ksites-house .ksp-part__name { margin-bottom: 10px; }

/* ---- review fixes: notify links, glance targets, steps, CRM side, crumb, closing band ---- */
.ksp-open--wait { gap: 0 20px; }
.ksp-open--wait .ksp-more { text-decoration: underline; text-decoration-thickness: 1px; }
.ksp-more--quiet { color: var(--ks-text-muted) !important; font-weight: 400 !important; }
.ksp-open--wait .ksp-open__host { flex-basis: 100%; }
.ksp-glance th a { display: inline-flex; align-items: center; min-height: 44px; }
.ksp-crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ks-text-muted); }
.ksp-crumb { display: flex; align-items: center; gap: 8px; }
ol.ksp-steps { display: grid; gap: 28px; list-style: none; padding: 0; max-width: none; counter-reset: ksp-step; }
ol.ksp-steps > li { margin: 0; max-width: none; padding-top: 16px; border-top: 1px solid var(--ks-border-strong); display: grid; gap: 6px; align-content: start; }
@media (min-width: 700px) { ol.ksp-steps { grid-template-columns: 1fr 1fr; gap: 36px 40px; } }
@media (min-width: 1100px) { ol.ksp-steps { grid-template-columns: repeat(4, 1fr); } }
.ksp-crm-side { display: grid; gap: 4px; justify-items: start; margin-top: 24px; }
.ksp-crm-side .ksp-lead { margin: 16px 0 0; font-size: 1rem; }
body.ksp .ksites-m-cta.is-roomy { padding-block: clamp(64px, 8vw, 120px); }
body.ksp .ksites-m-cta .wp-block-button__link { min-height: 48px; padding-inline: 28px; }
