/*
 * Service pages: the answer grid (VOY-987, AI Visibility's live surface;
 * spec KB-526 section 2).
 *
 * Ten tracked buyer questions down the side, five AI assistants across the
 * top, one button per answer: your business named (the 500), a competitor
 * named (the 700), or nobody named (muted). svc-answers.js builds it, sets a
 * readout ("Perplexity · best plumber near me · a competitor named") and a
 * tally, and turns answers your way over time. It is the page's only dither
 * surface. Labelled Illustration.
 */

.vy-svc-page .vy-svc-answers {
	position: relative;
	isolation: isolate;
	padding: 24px;
	border: 1px solid var(--border-1);
	border-radius: 6px;
	background: var(--bg-panel);
}
.vy-svc-page .vy-svc-answers > .vy-dither {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	pointer-events: none;
	border-radius: inherit;
}

.vy-svc-page .vy-svc-answers__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr));
	gap: 5px;
	align-items: center;
	margin-bottom: 18px;
}
.vy-svc-page .vy-svc-answers__col,
.vy-svc-page .vy-svc-answers__q {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.04em;
	color: var(--fg-3);
}
.vy-svc-page .vy-svc-answers__col { text-align: center; text-transform: uppercase; }
.vy-svc-page .vy-svc-answers__q {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	padding-right: 8px;
}

.vy-svc-page .vy-svc-answers__grid button {
	height: 26px;
	min-width: 0;
	padding: 0;
	border: 1px solid var(--border-hair);
	border-radius: 3px;
	background: color-mix(in oklab, var(--bg-canvas) 70%, transparent);
	cursor: crosshair;
	transition: background-color 400ms var(--svc-ease), border-color 200ms var(--svc-ease);
}
.vy-svc-page .vy-svc-answers__grid button.is-rival {
	border-color: color-mix(in oklab, var(--um-700) 70%, transparent);
	background: color-mix(in oklab, var(--um-700) 30%, transparent);
}
.vy-svc-page .vy-svc-answers__grid button.is-you {
	border-color: var(--um-500);
	background: color-mix(in oklab, var(--um-500) 60%, transparent);
}
.vy-svc-page .vy-svc-answers__grid button:is(:hover, :focus-visible, .is-active) { border-color: var(--fg-1); }
.vy-svc-page .vy-svc-answers__grid button:focus-visible { outline: 2px solid var(--um-500); outline-offset: 2px; }
.vy-svc-page .vy-svc-answers__grid button.is-turned { animation: vy-svc-turned 900ms var(--svc-ease); }
@keyframes vy-svc-turned {
	30% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--um-500) 45%, transparent); }
}

.vy-svc-page .vy-svc-answers__key {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-bottom: 12px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-3);
}
.vy-svc-page .vy-svc-answers__key span::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	vertical-align: -1px;
	border-radius: 2px;
	background: color-mix(in oklab, var(--bg-canvas) 70%, transparent);
	box-shadow: inset 0 0 0 1px var(--border-hair);
}
.vy-svc-page .vy-svc-answers__key .is-you::before { background: color-mix(in oklab, var(--um-500) 60%, transparent); }
.vy-svc-page .vy-svc-answers__key .is-rival::before { background: color-mix(in oklab, var(--um-700) 30%, transparent); }

.vy-svc-page .vy-svc-answers__readout {
	min-height: 1.5em;
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--fg-1);
}
.vy-svc-page .vy-svc-answers__tally {
	margin-top: 6px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--um-500);
}

/* Mobile: the questions leave the grid and move into the readout; the five
   assistant columns stay, with 44px tap rows. */
@media (max-width: 767px) {
	.vy-svc-page .vy-svc-answers { padding: 16px; }
	.vy-svc-page .vy-svc-answers__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.vy-svc-page .vy-svc-answers__q,
	.vy-svc-page .vy-svc-answers__corner { display: none; }
	.vy-svc-page .vy-svc-answers__grid button { height: 44px; }
	.vy-svc-page .vy-svc-answers__col { font-size: 9px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.vy-svc-page .vy-svc-answers__grid button { transition: none; }
	.vy-svc-page .vy-svc-answers__grid button.is-turned { animation: none; }
}
