/* The test host page. Fonts: the deploy copies the admins' bundled woff2 files to fonts/; without them (local dev) the system font shows */
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("fonts/bricolage-grotesque.woff2") format("woff2-variations");
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-display: swap;
	font-weight: 300 900;
	src: url("fonts/figtree.woff2") format("woff2-variations");
}
:root {
	color-scheme: light;
	--bg: #fbfbfc;
	--tile: #f2f5f9;
	--tile-line: #bfd3e4;
	--tile-num: #b9cde0;
	--surface: #ffffff;
	--fg: #1f2a44;
	--muted: #5a6478;
	--line: #dfe3ea;
	--navy: #27245e;
	--accent: #2d6591;
	--accent-soft: #e6eff6;
	--green: #6eaa3c;
	--yellow: #e9b923;
	--warn-bg: #fdf5dc;
	--warn-fg: #6b5210;
	--font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
	--chat-col: 440px;
}
* { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.6 var(--font-body);
}
a { color: var(--accent); }
[hidden] { display: none !important; }
header.top {
	background: color-mix(in srgb, var(--surface) 88%, transparent);
	backdrop-filter: blur(8px);
	position: sticky;
	top: 0;
	z-index: 5;
	border-bottom: 1px solid var(--line);
	padding-inline: 16px;
}
.top-in {
	max-width: 1160px;
	margin: 0 auto;
	padding-block: 14px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	color: var(--navy);
}
.avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--accent) center / cover no-repeat;
	color: #fff;
	display: grid;
	place-items: center;
	font: 700 0.9rem var(--font-display);
	flex: none;
}
.avatar.img { background-color: #fff; }
/* The site picker in the header (the sandbox has more than one site) */
.pick { position: relative; display: inline-flex; align-items: center; }
.pick select {
	appearance: none;
	font: 700 1rem var(--font-body);
	color: var(--navy);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 4px 28px 4px 8px;
	margin-left: -8px;
	cursor: pointer;
}
.pick select:hover { background: var(--accent-soft); }
.pick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pick svg { position: absolute; right: 8px; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.badge {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: var(--warn-bg);
	color: var(--warn-fg);
	border-radius: 999px;
	padding: 2px 10px;
}
.spacer { flex: 1; }
.langs, .switch { display: flex; gap: 4px; }
.langs button, .switch button {
	font: 600 0.85rem var(--font-body);
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted);
	border-radius: 6px;
	padding: 4px 10px;
	cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.switch { background: color-mix(in srgb, var(--line) 55%, var(--bg)); border-radius: 8px; padding: 3px; gap: 2px; }
.switch button { font-size: 0.8rem; padding: 3px 10px; border-color: transparent; background: transparent; }
/* The two test pages, as tabs above the title */
.tabs {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	margin-bottom: 26px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(20, 30, 60, 0.05);
}
.tabs a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
	border-radius: 10px;
	padding: 8px 16px;
}
.tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; }
/* Both admins, in the header */
.admins { display: flex; flex-wrap: wrap; gap: 2px; }
.admins a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
	border-radius: 8px;
	padding: 5px 10px;
	white-space: nowrap;
}
.admins a:hover { color: var(--accent); background: var(--accent-soft); }
.admins svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.switch button[aria-pressed="true"] { color: var(--accent); background: var(--surface); box-shadow: 0 1px 2px rgba(20, 30, 60, 0.12); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page {
	max-width: 1160px;
	margin: 0 auto;
	padding-inline: 16px;
	padding-block: 40px 64px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--chat-col);
	grid-template-areas: "intro side" "guide side";
	grid-template-rows: auto 1fr;
	column-gap: 48px;
	row-gap: 24px;
	align-items: start;
}
.intro { grid-area: intro; min-width: 0; }
.guide { grid-area: guide; display: grid; gap: 28px; min-width: 0; }
h1 {
	font: 800 clamp(2rem, 4vw, 2.9rem)/1.08 var(--font-display);
	letter-spacing: -0.015em;
	color: var(--navy);
	margin: 0 0 8px;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
h2 {
	font: 700 1.1rem/1.3 var(--font-display);
	color: var(--navy);
	margin: 0;
	text-wrap: balance;
}
.lede { font-size: 1.05rem; color: var(--muted); max-width: 62ch; margin: 0; }
.lede b { color: var(--fg); font-weight: 600; }
section { display: grid; gap: 12px; }
/* The example questions: numbered tiles in two columns, each tile asks its question in the chat */
.qlist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.q {
	background: var(--tile);
	border: 1px solid transparent;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	transition: background 0.15s, border-color 0.15s;
}
.q:hover, .q:focus-within { background: var(--surface); border-color: var(--tile-line); }
.qmain {
	all: unset;
	box-sizing: border-box;
	width: 100%;
	flex: 1;
	cursor: pointer;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "num go" "kind kind" "text text" "look look";
	row-gap: 4px;
	align-content: start;
	padding: 16px;
	border-radius: 16px;
}
.qmain:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.qnum { grid-area: num; font: 800 1.6rem/1 var(--font-display); color: var(--tile-num); }
.qkind { grid-area: kind; margin-top: 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.qtext { grid-area: text; font-weight: 600; color: var(--fg); line-height: 1.4; }
.qlook { grid-area: look; font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.go {
	grid-area: go;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--surface);
	color: var(--accent);
	display: grid;
	place-items: center;
	transition: background 0.15s, color 0.15s, transform 0.15s;
}
.go svg, .qthen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qmain:hover .go, .qmain:focus-visible .go { background: var(--accent); color: #fff; transform: translateX(2px); }
.q:hover .go { background: var(--accent-soft); }
.then {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 14px;
	font-size: 0.85rem;
	color: var(--muted);
}
.qthen {
	font: 600 0.85rem var(--font-body);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--accent);
	background: var(--accent-soft);
	border: 0;
	border-radius: 999px;
	padding: 4px 8px 4px 12px;
	cursor: pointer;
}
.qthen svg { width: 13px; height: 13px; }
.qthen:hover { background: var(--accent); color: #fff; }
/* The live chat steps: numbered circles */
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; color: var(--fg); }
ol.steps li { counter-increment: step; position: relative; padding-left: 44px; min-height: 30px; padding-top: 2px; }
ol.steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	display: grid;
	place-items: center;
	font: 700 0.85rem var(--font-display);
}
ol.steps a { font-weight: 600; }
/* Good to know: one panel, a check per line */
ul.know {
	margin: 0;
	padding: 6px 18px;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--fg);
}
ul.know li { position: relative; padding: 10px 0 10px 32px; }
ul.know li + li { border-top: 1px solid var(--line); }
ul.know li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 13px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	box-sizing: border-box;
	border: 1px solid var(--tile-line);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d6591' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
/* What happens when nobody is online */
.note {
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--yellow);
	border-radius: 4px 12px 12px 4px;
	padding: 14px 18px;
	gap: 6px;
}
.note h2 { color: var(--navy); }
.note p { margin: 0; color: var(--fg); }
/* The background texts, folded away */
details { border-block: 1px solid var(--line); padding-block: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 2px; flex: none; box-sizing: content-box; }
details[open] summary::before { transform: rotate(45deg); }
details > .two { margin-top: 14px; font-size: 0.95rem; color: var(--fg); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
h3 { font: 700 0.8rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
ul.yes, ul.no { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
ul.yes li::marker { color: var(--green); }
ul.no li::marker { color: #c0563a; }
.side {
	grid-area: side;
	width: var(--chat-col);
	position: sticky;
	top: calc(env(safe-area-inset-top, 0px) + 84px);
	display: grid;
	gap: 10px;
	min-width: 0;
}
.side-label { font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The chat on a tinted stage, like a product shot; a grid, because the widget resets #chat to inline */
.stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	border-radius: 24px;
	padding: 22px;
	background: radial-gradient(circle at 1px 1px, rgba(45, 101, 145, 0.18) 1px, transparent 0) 0 0 / 16px 16px, linear-gradient(160deg, #e6eff6, #f1eef8);
}
/* The inline chat's box: its height is reserved so the page does not shift when the widget arrives */
#chat {
	width: 100%;
	min-width: 0;
	height: min(780px, calc(100vh - 224px));
	min-height: 480px;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(20, 30, 60, 0.12);
}
.side-hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.dev { max-width: 1160px; margin: 0 auto 32px; padding-inline: 16px; font-size: 0.82rem; color: var(--muted); }
.dev code { font-size: 0.78rem; }

@media (max-width: 960px) {
	.page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "side" "guide"; row-gap: 32px; }
	.side { position: static; width: auto; }
}
/* A short window: a sticky chat taller than the screen would hide its own input field */
@media (min-width: 961px) and (max-height: 720px) {
	.side { position: static; }
}
@media (max-width: 640px) {
	.admins { order: 5; flex-basis: 100%; margin-inline: -10px; }
	.page { padding-block: 28px 56px; }
	.qlist { grid-template-columns: minmax(0, 1fr); }
	.stage { padding: 10px; border-radius: 18px; }
	.tabs a { padding: 7px 12px; }
	details > .two { grid-template-columns: minmax(0, 1fr); }
}