/* Vant IQ dashboard and accuracy block. Colours come from the theme, with fallbacks. */
.vq {
	--vq-night: var(--wp--preset--color--night, #07080F);
	--vq-surface: var(--wp--preset--color--surface, #0E1019);
	--vq-raised: var(--wp--preset--color--raised, #161A28);
	--vq-line: var(--wp--preset--color--line, #232838);
	--vq-text: var(--wp--preset--color--text, #F2F3F8);
	--vq-muted: var(--wp--preset--color--muted, #9298AE);
	--vq-glow: var(--wp--preset--color--glow, #8B9CFF);
	--vq-good: var(--wp--preset--color--mint, #5EEAD4);
	--vq-warn: #F5B95F;
	--vq-bad: #FF9AA2;
	color: var(--vq-text);
	font-variant-numeric: tabular-nums;
}
.vq *, .vq *::before, .vq *::after { box-sizing: border-box; }
.vq p { margin: 0; }
.vq h2 { margin: 0 0 0.75rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.vq a { color: var(--vq-text); }
.vq-muted { color: var(--vq-muted); }
.vq-small { font-size: 0.875rem; }
.vq-strong { font-weight: 500; }
.vq-label { color: var(--vq-muted); font-size: 0.8125rem; }

.vq-app { display: grid; gap: 1rem; max-width: 880px; margin-inline: auto; transition: opacity .2s; }
.vq-app.is-busy { cursor: progress; }
.vq-loading { color: var(--vq-muted); text-align: center; padding: 3rem 0; }
.vq-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.vq-card {
	padding: clamp(1.1rem, 3vw, 1.6rem);
	border: 1px solid var(--vq-line);
	border-radius: 20px;
	background: var(--vq-surface);
}
.vq-connect { text-align: center; padding-block: 2.5rem; background: radial-gradient(80% 120% at 50% 0%, rgb(139 156 255 / .14), transparent 60%), var(--vq-surface); }
.vq-connect p { max-width: 52ch; margin-inline: auto; }
.vq-connect .vq-actions { justify-content: center; margin-top: 1.25rem; }

/* buttons */
.vq-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vq .vq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 1.2rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: #fff;
	color: var(--vq-night);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color .2s, transform .2s;
}
.vq .vq-btn:hover { background: #E4E7FF; }
.vq .vq-btn:active { transform: scale(.98); }
.vq .vq-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.vq .vq-btn-quiet { background: transparent; color: var(--vq-text); border-color: var(--vq-line); }
.vq .vq-btn-quiet:hover { background: var(--vq-raised); }
.vq .vq-danger { color: var(--vq-bad); }
.vq :focus-visible { outline: 2px solid var(--vq-glow); outline-offset: 2px; }

/* notices */
.vq-note { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 1rem; border-radius: 14px; border: 1px solid var(--vq-line); background: var(--vq-raised); font-size: 0.9375rem; }
.vq-note-ok { border-color: rgb(94 234 212 / .4); background: rgb(94 234 212 / .08); }
.vq-note-error { border-color: rgb(255 154 162 / .4); background: rgb(255 154 162 / .08); }
.vq-x { background: none; border: 0; color: var(--vq-muted); font-size: 1.25rem; cursor: pointer; min-width: 32px; min-height: 32px; }
.vq-wide { width: 100%; margin-top: 0.75rem !important; }

/* channel */
.vq-channel { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vq-channel-name { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.vq-channel-name img { border-radius: 50%; }
.vq-orb { width: 40px; height: 40px; border-radius: 50%; flex: none; background: radial-gradient(circle at 32% 28%, #fff 0 6%, #B4BEFF 18%, #6B7BEA 48%, #20265A 100%); }
.vq-badge { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid rgb(245 185 95 / .5); color: var(--vq-warn); font-size: 0.75rem; vertical-align: 2px; }

/* new forecast */
.vq-new form { display: grid; gap: 1rem; }
.vq-seg { display: inline-flex; width: max-content; padding: 4px; gap: 4px; border: 1px solid var(--vq-line); border-radius: 999px; background: var(--vq-night); }
.vq-seg button { min-height: 38px; padding: 0 1rem; border: 0; border-radius: 999px; background: none; color: var(--vq-muted); font: inherit; font-size: 0.9375rem; cursor: pointer; }
.vq-seg button[aria-checked="true"] { background: var(--vq-raised); color: var(--vq-text); box-shadow: inset 0 0 0 1px var(--vq-line); }
.vq-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 0.75rem; }
.vq-fields label, .vq-form label { display: grid; gap: 0.35rem; font-size: 0.875rem; color: var(--vq-muted); }
.vq input[type="text"], .vq input[type="email"], .vq input[type="password"], .vq input[type="date"] {
	width: 100%;
	min-height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var(--vq-line);
	border-radius: 12px;
	background: var(--vq-night);
	color: var(--vq-text);
	font: inherit;
	font-size: 1rem;
	color-scheme: dark;
}
.vq input:focus { outline: none; border-color: var(--vq-glow); box-shadow: 0 0 0 3px rgb(139 156 255 / .2); }
.vq-new .vq-btn { justify-self: start; }

/* forecast list */
.vq-list { list-style: none; margin: 0; padding: 0; }
.vq-forecast { margin: 0; border-top: 1px solid var(--vq-line); }
.vq-forecast:first-child { border-top: 0; }
.vq-f-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 1rem;
	width: 100%;
	min-height: 56px;
	padding: 0.85rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.vq-f-title { display: grid; gap: 0.15rem; min-width: 0; }
.vq-f-title .vq-strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vq-f-range { font-weight: 600; letter-spacing: -0.02em; }
.vq-forecast.is-open { padding-bottom: 1rem; }
.vq-f-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding: 0.5rem 0 1rem; }
.vq-f-big { display: grid; gap: 0.4rem; align-content: start; }
.vq-big { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; background: linear-gradient(180deg, #fff, #B9BFD3); -webkit-background-clip: text; background-clip: text; color: transparent; }

.vq-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--vq-line); font-size: 0.8125rem; white-space: nowrap; }
.vq-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--vq-muted); }
.vq-pill-good i { background: var(--vq-good); box-shadow: 0 0 8px rgb(94 234 212 / .6); }
.vq-pill-warn i { background: var(--vq-warn); border-radius: 1px; transform: rotate(45deg); }

/* country bars: one hue, thin, labelled */
.vq-countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.vq-countries li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 6.5rem; align-items: center; gap: 0.75rem; margin: 0; font-size: 0.875rem; }
.vq-c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vq-c-bar { height: 6px; border-radius: 999px; background: var(--vq-raised); overflow: hidden; }
.vq-c-bar span { display: block; height: 100%; border-radius: 999px; background: var(--vq-glow); }
.vq-c-range { color: var(--vq-muted); text-align: right; }

.vq-pick { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.4rem; max-height: 280px; overflow: auto; }
.vq-pick button { display: grid; width: 100%; gap: 0.15rem; padding: 0.65rem 0.85rem; border: 1px solid var(--vq-line); border-radius: 12px; background: var(--vq-night); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vq-pick button:hover { border-color: var(--vq-glow); }

/* channel stats: one hue, thin bars, values in text colour */
.vq .vq-sub { margin: 1.5rem 0 0.75rem; font-size: 0.9375rem; font-weight: 500; color: var(--vq-muted); }
.vq-uploads { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.vq-uploads li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 4rem; align-items: center; gap: 0.75rem; margin: 0; font-size: 0.875rem; }
.vq-u-title { display: grid; min-width: 0; }
.vq-u-title a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.vq-u-title a:hover { text-decoration: underline; }
.vq-u-views { text-align: right; font-weight: 500; }
.vq-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: center; padding: 0.5rem 0 1rem; color: var(--vq-muted); }
.vq .vq-foot a { color: var(--vq-muted); }
.vq .vq-link { padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }

/* accuracy */
.vq-acc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 0.75rem; }
.vq-acc-value { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -0.04em; }
.vq-acc-label { color: var(--vq-muted); font-size: 0.875rem; }
.vq-acc-note, .vq-acc-pending { color: var(--vq-muted); font-size: 0.9375rem; max-width: 62ch; }
.vq-accuracy { padding: 1.5rem; border: 1px solid var(--vq-line); border-radius: 20px; background: var(--vq-surface); }

/* sign in / sign up */
.vq-auth { max-width: 26rem; margin-inline: auto; display: grid; gap: 1rem; }
.vq-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--vq-line); border-radius: 999px; background: var(--vq-surface); }
.vq .vq-tabs a { display: grid; place-items: center; min-height: 40px; border-radius: 999px; color: var(--vq-muted); text-decoration: none; font-size: 0.9375rem; }
.vq .vq-tabs a[aria-selected="true"] { background: var(--vq-raised); color: var(--vq-text); box-shadow: inset 0 0 0 1px var(--vq-line); }
.vq-form { display: grid; gap: 0.6rem; padding: 1.5rem; border: 1px solid var(--vq-line); border-radius: 20px; background: var(--vq-surface); }
.vq-form button { margin-top: 0.5rem; min-height: 44px; }
.vq-hint { color: var(--vq-muted); font-size: 0.8125rem; }
.vq-fine { color: var(--vq-muted); font-size: 0.8125rem; text-align: center; max-width: none !important; }
.vq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.vq-placeholder { padding: 2rem; border: 1px dashed #8B9CFF; border-radius: 16px; text-align: center; }

@media (max-width: 700px) {
	.vq-fields, .vq-f-detail, .vq-acc-row { grid-template-columns: minmax(0, 1fr); }
	.vq-f-head { grid-template-columns: minmax(0, 1fr) auto; }
	.vq-f-head .vq-pill { grid-column: 1 / -1; justify-self: start; }
	.vq-countries li { grid-template-columns: 6.5rem minmax(0, 1fr) 5.5rem; }
	.vq-uploads li { grid-template-columns: minmax(0, 1fr) 3.5rem; }
	.vq-uploads .vq-c-bar { grid-column: 1 / -1; grid-row: 2; }
	.vq-seg { width: 100%; }
	.vq-seg button { flex: 1; }
	.vq-new .vq-btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
	.vq *, .vq *::before, .vq *::after { transition: none !important; }
}
