/*
 * Cerco Audit — front-end styles
 *
 * Design principle: the widget is a guest on the site, not a visitor. It
 * inherits the theme's typography outright and picks up Elementor / block-theme
 * global colours where they exist, so it reads as a first-party tool rather
 * than an embedded third-party gadget. Every value below is a fallback for
 * when those globals are absent.
 */

.cerco,
.cerco-scope {
	/* Brand. --cerco-*-set is written inline by PHP only in fixed/custom mode. */
	--cerco-brand: var(--cerco-brand-set, var(--e-global-color-accent, var(--wp--preset--color--primary, #c8102e)));
	--cerco-ink: var(--cerco-ink-set, var(--e-global-color-primary, #14161a));
	--cerco-body: var(--cerco-body-set, var(--e-global-color-text, #5c6270));

	/* Verdict colours stay constant — they carry meaning, not brand. */
	--cerco-good: #1a8a4a;
	--cerco-ok: #c2740a;
	--cerco-bad: #cf2020;

	--cerco-bg: #fff;
	--cerco-soft: #f7f8fa;
	--cerco-line: #e6e8ec;
	--cerco-line-strong: #d3d7de;

	--cerco-radius-btn: var(--cerco-radius-btn-set, 999px);
	--cerco-radius-card: var(--cerco-radius-card-set, 16px);
	--cerco-radius-input: var(--cerco-radius-input-set, 999px);

	--cerco-gap: 20px;
	--cerco-shadow: 0 1px 2px rgba(16, 18, 22, .04), 0 8px 24px -12px rgba(16, 18, 22, .12);

	/* Typography comes from the theme. */
	font-family: inherit;
	font-size: inherit;
	line-height: 1.6;
	color: var(--cerco-body);
	max-width: 860px;
	margin-inline: auto;
	text-align: left;
}

.cerco *,
.cerco-scope * { box-sizing: border-box; }

.cerco, .cerco-scope { overflow-wrap: break-word; }
.cerco-results, .cerco-detail, .cerco-psi, .cerco-prio { max-width: 100%; min-width: 0; }

.cerco h2, .cerco h3, .cerco h4,
.cerco-scope h3 {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--cerco-ink);
	line-height: 1.25;
}

.cerco[data-scheme="dark"],
.cerco-scope[data-scheme="dark"] {
	--cerco-ink: #f2f4f7;
	--cerco-body: #a8aeba;
	--cerco-bg: #14161a;
	--cerco-soft: #1c1f25;
	--cerco-line: #2c3038;
	--cerco-line-strong: #3a3f49;
	--cerco-good: #34c26e;
	--cerco-ok: #e0a33a;
	--cerco-bad: #f05252;
}

@media (prefers-color-scheme: dark) {
	.cerco[data-scheme="auto"],
	.cerco-scope[data-scheme="auto"] {
		--cerco-ink: #f2f4f7;
		--cerco-body: #a8aeba;
		--cerco-bg: #14161a;
		--cerco-soft: #1c1f25;
		--cerco-line: #2c3038;
		--cerco-line-strong: #3a3f49;
		--cerco-good: #34c26e;
		--cerco-ok: #e0a33a;
		--cerco-bad: #f05252;
	}
}

.cerco [hidden],
.cerco-scope [hidden] { display: none !important; }

.cerco-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cerco-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* ------------------------------------------------------------------ intro */

.cerco-intro { text-align: center; margin-bottom: 22px; }
.cerco-logo { max-height: 46px; width: auto; margin: 0 auto 16px; display: block; }
.cerco-h { margin: 0 0 8px; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
.cerco-sub { margin: 0; color: var(--cerco-body); font-size: 1.02rem; }

/* ------------------------------------------------------------------- form */

.cerco-form {
	display: flex; gap: 8px; align-items: center;
	max-width: 580px; margin-inline: auto;
	padding: 7px; border-radius: var(--cerco-radius-input);
	background: var(--cerco-bg); border: 1px solid var(--cerco-line-strong);
	box-shadow: var(--cerco-shadow);
}
.cerco-form:focus-within { border-color: var(--cerco-brand); }

.cerco-url {
	flex: 1 1 240px; min-width: 0;
	padding: 13px 20px; font: inherit; font-size: 1rem;
	border: 0; background: transparent; color: var(--cerco-ink);
	border-radius: var(--cerco-radius-input);
}
.cerco-url::placeholder { color: var(--cerco-body); opacity: .7; }
.cerco-url:focus { outline: 0; }

.cerco-btn {
	flex: 0 0 auto; padding: 14px 28px; font: inherit; font-size: 1rem; font-weight: 700;
	cursor: pointer; border: 0; border-radius: var(--cerco-radius-btn);
	background: var(--cerco-brand); color: #fff; line-height: 1.2;
	transition: transform .12s ease, filter .12s ease;
}
.cerco-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cerco-btn:active { transform: none; }
.cerco-btn:disabled { opacity: .55; cursor: progress; transform: none; }
.cerco-btn:focus-visible { outline: 2px solid var(--cerco-brand); outline-offset: 3px; }

.cerco-error {
	max-width: 580px; margin: 14px auto 0; padding: 12px 16px; font-size: .93rem;
	color: var(--cerco-bad); background: color-mix(in srgb, var(--cerco-bad) 8%, transparent);
	border: 1px solid color-mix(in srgb, var(--cerco-bad) 25%, transparent);
	border-radius: 12px;
}
@supports not (color: color-mix(in srgb, red 10%, transparent)) {
	.cerco-error { background: var(--cerco-soft); border-color: var(--cerco-line); }
}

.cerco-loading {
	display: flex; align-items: center; justify-content: center; gap: 14px;
	max-width: 580px; margin: 22px auto 0; color: var(--cerco-body); text-align: left;
}
.cerco-loading-text { margin: 0; font-size: .95rem; }
.cerco-spinner {
	flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
	border: 2.5px solid var(--cerco-line); border-top-color: var(--cerco-brand);
	animation: cerco-spin .8s linear infinite;
}
@keyframes cerco-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cerco-spinner { animation-duration: 2.6s; } }

/* ----------------------------------------------------------- report header */

.cerco-results { margin-top: 30px; }

.cerco-head {
	display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
	padding: 24px; border-radius: var(--cerco-radius-card);
	background: var(--cerco-soft); border: 1px solid var(--cerco-line);
}
.cerco-head-txt { flex: 1 1 240px; min-width: 0; }
.cerco-head-txt h3 { margin: 0 0 6px; font-size: 1.2rem; }
.cerco-head-txt h3 span { color: var(--cerco-brand); overflow-wrap: anywhere; }
.cerco-head-txt p { margin: 0; color: var(--cerco-body); font-size: .92rem; }
.cerco-when { font-size: .82rem !important; margin-top: 4px !important; }

.cerco-score { position: relative; flex: 0 0 auto; width: 128px; height: 128px; }
.cerco-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.cerco-ring circle { fill: none; stroke-width: 9; }
.cerco-ring-bg { stroke: var(--cerco-line-strong); opacity: .55; }
.cerco-ring-fg { stroke: var(--cerco-brand); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.22,.8,.3,1); }
.cerco-score-txt {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; line-height: 1.05;
}
.cerco-score-txt strong { font-size: 2.1rem; color: var(--cerco-ink); font-weight: 800; }
.cerco-score-txt span { font-size: .78rem; color: var(--cerco-body); }

.cerco-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cerco-ghost {
	padding: 8px 16px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
	border: 1px solid var(--cerco-line-strong); border-radius: var(--cerco-radius-btn);
	background: var(--cerco-bg); color: var(--cerco-ink);
}
.cerco-ghost:hover { border-color: var(--cerco-brand); color: var(--cerco-brand); }

/* -------------------------------------------------------------- categories */

.cerco-cats { margin: 22px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cerco-cat-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .92rem; margin-bottom: 6px; }
.cerco-cat-top span { color: var(--cerco-ink); font-weight: 600; }
.cerco-cat-top b { font-variant-numeric: tabular-nums; color: var(--cerco-ink); }
.cerco-cat-top i { font-style: normal; color: var(--cerco-body); font-weight: 400; font-size: .85em; }
.cerco-bar { height: 7px; border-radius: 99px; background: var(--cerco-line); overflow: hidden; }
.cerco-bar span {
	display: block; height: 100%; border-radius: 99px; background: var(--cerco-good);
	transition: width .9s cubic-bezier(.22,.8,.3,1);
}
.cerco-bar span[data-g="ok"] { background: var(--cerco-ok); }
.cerco-bar span[data-g="bad"] { background: var(--cerco-bad); }

/* ---------------------------------------------------------------- sections */

.cerco-sec-h { margin: 40px 0 6px; font-size: 1.28rem; }
.cerco-sec-sub { margin: 0 0 18px; color: var(--cerco-body); font-size: .94rem; }
.cerco-sub-h { margin: 28px 0 10px; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cerco-note { margin: 0 0 16px; font-size: .88rem; color: var(--cerco-body); }

.cerco-impact {
	font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	padding: 3px 8px; border-radius: 6px; white-space: nowrap;
	background: var(--cerco-line); color: var(--cerco-body);
}
.cerco-impact--critical { background: #fdeaea; color: #a11313; }
.cerco-impact--high { background: #fdf0e3; color: #96550a; }
.cerco-impact--medium { background: #fbf6e0; color: #7a6108; }
[data-scheme="dark"] .cerco-impact--critical { background: #4a1414; color: #fca5a5; }
[data-scheme="dark"] .cerco-impact--high { background: #4a2c0f; color: #fdba74; }
[data-scheme="dark"] .cerco-impact--medium { background: #40380d; color: #fde68a; }

.cerco-pill { font-size: .7rem; font-weight: 800; padding: 4px 11px; border-radius: 99px; color: #fff; background: var(--cerco-body); text-transform: uppercase; letter-spacing: .05em; }
.cerco-pill--good { background: var(--cerco-good); }
.cerco-pill--ok { background: var(--cerco-ok); }
.cerco-pill--bad { background: var(--cerco-bad); }

/* Fix these first */
.cerco-prio-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cerco-prio-list li {
	display: flex; min-width: 0; gap: 16px; padding: 18px 20px;
	border-radius: var(--cerco-radius-card);
	background: var(--cerco-bg); border: 1px solid var(--cerco-line);
	box-shadow: var(--cerco-shadow);
}
.cerco-rank {
	flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--cerco-brand); color: #fff; font-weight: 800; font-size: .85rem;
}
.cerco-prio-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.cerco-prio-top strong { color: var(--cerco-ink); font-size: 1.02rem; }
.cerco-prio-list p { margin: 5px 0 0; font-size: .92rem; color: var(--cerco-body); }
.cerco-prio-list .cerco-fix { color: var(--cerco-ink); }

/* Full breakdown */
.cerco-detail-h {
	display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
	margin: 30px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--cerco-line);
	font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cerco-body);
}
.cerco-detail-count { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.cerco-checks { list-style: none; margin: 0; padding: 0; }
.cerco-check { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--cerco-line); }
.cerco-check:last-child { border-bottom: 0; }
.cerco-check-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cerco-check-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cerco-check-top strong { color: var(--cerco-ink); }
.cerco-check p { margin: 4px 0 0; font-size: .91rem; color: var(--cerco-body); overflow-wrap: anywhere; }
.cerco-why b, .cerco-fix b { color: var(--cerco-ink); font-weight: 700; }
.cerco-fix { margin-top: 6px !important; }
.cerco-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 8px; flex: 0 0 auto; background: var(--cerco-body); }
.cerco-pass .cerco-dot { background: var(--cerco-good); }
.cerco-warn .cerco-dot { background: var(--cerco-ok); }
.cerco-fail .cerco-dot { background: var(--cerco-bad); }

/* ----------------------------------------------------------------- gate */

.cerco-gate {
	margin-top: 26px; padding: 28px; text-align: center;
	border-radius: var(--cerco-radius-card);
	background: var(--cerco-soft); border: 1px solid var(--cerco-line);
}
.cerco-gate h3 { margin: 0 0 6px; font-size: 1.2rem; }
.cerco-gate-sub { margin: 0 0 16px; color: var(--cerco-body); font-size: .95rem; }
.cerco-teaser {
	list-style: none; margin: 0 auto 18px; padding: 0; display: grid; gap: 8px;
	font-size: .95rem; max-width: 420px; text-align: left;
}
.cerco-teaser li { display: flex; align-items: center; gap: 10px; color: var(--cerco-ink); }
.cerco-locked { color: var(--cerco-body) !important; font-style: italic; padding-left: 19px; }
.cerco-gate-form { display: grid; gap: 10px; max-width: 420px; margin-inline: auto; text-align: left; }
.cerco-gate-form input {
	padding: 13px 20px; font: inherit; font-size: 1rem;
	border-radius: var(--cerco-radius-input);
	border: 1px solid var(--cerco-line-strong); background: var(--cerco-bg); color: var(--cerco-ink);
}
.cerco-gate-form input:focus { outline: 0; border-color: var(--cerco-brand); }
.cerco-gate-form .cerco-btn { width: 100%; }
.cerco-consent { margin: 4px 0 0; font-size: .78rem; color: var(--cerco-body); }
.cerco-sent {
	margin: 26px 0 0; padding: 14px 18px; font-weight: 600; color: var(--cerco-good);
	background: var(--cerco-soft); border-radius: 12px; border: 1px solid var(--cerco-line);
}

/* ------------------------------------------------------- PageSpeed section */

.cerco-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--cerco-soft); border: 1px solid var(--cerco-line); margin-bottom: 18px; }
.cerco-tab {
	border: 0; background: transparent; color: var(--cerco-body); cursor: pointer;
	padding: 8px 20px; border-radius: 99px; font: inherit; font-size: .88rem; font-weight: 700;
}
.cerco-tab.is-active { background: var(--cerco-brand); color: #fff; }
.cerco-psi-loading { display: flex; align-items: center; gap: 14px; color: var(--cerco-body); padding: 18px 0; }
.cerco-psi-loading p { margin: 0; font-size: .92rem; }

.cerco-lh { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 12px; }
.cerco-lh-item {
	text-align: center; padding: 18px 10px; border-radius: var(--cerco-radius-card);
	border: 1px solid var(--cerco-line); background: var(--cerco-bg);
}
.cerco-lh-num { font-size: 2rem; font-weight: 800; line-height: 1.05; }
.cerco-lh-label { font-size: .76rem; color: var(--cerco-body); margin-top: 2px; }
.cerco-lh--good .cerco-lh-num { color: var(--cerco-good); }
.cerco-lh--ok .cerco-lh-num { color: var(--cerco-ok); }
.cerco-lh--bad .cerco-lh-num { color: var(--cerco-bad); }

.cerco-cwv { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 12px; }
.cerco-cwv-item { padding: 14px; border-radius: var(--cerco-radius-card); border: 1px solid var(--cerco-line); background: var(--cerco-soft); }
.cerco-cwv-key { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--cerco-body); }
.cerco-cwv-val { font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: var(--cerco-ink); }
.cerco-cwv--good .cerco-cwv-val { color: var(--cerco-good); }
.cerco-cwv--ok .cerco-cwv-val { color: var(--cerco-ok); }
.cerco-cwv--bad .cerco-cwv-val { color: var(--cerco-bad); }
.cerco-cwv-name { font-size: .74rem; color: var(--cerco-body); }
.cerco-cwv-dist { display: flex; height: 5px; border-radius: 99px; overflow: hidden; margin-top: 10px; background: var(--cerco-line); }
.cerco-cwv-dist span[data-g="good"] { background: var(--cerco-good); }
.cerco-cwv-dist span[data-g="ok"] { background: var(--cerco-ok); }
.cerco-cwv-dist span[data-g="bad"] { background: var(--cerco-bad); }

.cerco-metrics { list-style: none; margin: 0; padding: 0; }
.cerco-metric { padding: 13px 0; border-bottom: 1px solid var(--cerco-line); }
.cerco-metric:last-child { border-bottom: 0; }
.cerco-metric-head { display: flex; align-items: center; gap: 10px; }
.cerco-metric-head strong { color: var(--cerco-ink); }
.cerco-metric-val { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.cerco-metric p { margin: 4px 0 0 19px; font-size: .87rem; color: var(--cerco-body); }
.cerco-metric--good .cerco-dot, .cerco-metric--good .cerco-metric-val { background: var(--cerco-good); }
.cerco-metric--ok .cerco-dot, .cerco-metric--ok .cerco-metric-val { background: var(--cerco-ok); }
.cerco-metric--bad .cerco-dot, .cerco-metric--bad .cerco-metric-val { background: var(--cerco-bad); }
.cerco-metric-val { background: none !important; }
.cerco-metric--good .cerco-metric-val { color: var(--cerco-good); }
.cerco-metric--ok .cerco-metric-val { color: var(--cerco-ok); }
.cerco-metric--bad .cerco-metric-val { color: var(--cerco-bad); }

.cerco-opps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cerco-opp { min-width: 0; padding: 18px 20px; border: 1px solid var(--cerco-line); border-radius: var(--cerco-radius-card); background: var(--cerco-bg); }
.cerco-opp-top { display: flex; align-items: baseline; gap: 14px; }
.cerco-opp-top strong { flex: 1 1 auto; min-width: 0; color: var(--cerco-ink); overflow-wrap: anywhere; }
.cerco-save { font-size: .8rem; font-weight: 800; color: var(--cerco-bad); white-space: nowrap; }
.cerco-save--plain { color: var(--cerco-body); font-weight: 700; }
.cerco-opp p { margin: 9px 0 0; font-size: .89rem; color: var(--cerco-body); }
.cerco-bar--save { height: 5px; margin-top: 10px; }
.cerco-bar--save span { background: var(--cerco-bad); }
.cerco-opp-items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.cerco-opp-items li { display: flex; min-width: 0; gap: 12px; font-size: .78rem; align-items: baseline; }
.cerco-opp-items code {
	flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	background: var(--cerco-soft); padding: 3px 8px; border-radius: 6px;
	direction: rtl; text-align: left; font-size: .95em; color: var(--cerco-body);
}
.cerco-opp-items span { color: var(--cerco-body); white-space: nowrap; }

/* --------------------------------------------------------------------- CTA */

.cerco-cta {
	margin-top: 40px; padding: 32px; text-align: center;
	border-radius: var(--cerco-radius-card);
	background: var(--cerco-brand); color: #fff;
}
.cerco-cta-logo { max-height: 40px; width: auto; margin: 0 auto 16px; display: block; }
.cerco-cta h3 { margin: 0 0 8px; color: #fff; font-size: 1.35rem; }
.cerco-cta p { margin: 0 auto 20px; max-width: 46ch; color: rgba(255, 255, 255, .88); font-size: .98rem; }
.cerco-cta-btn {
	display: inline-block; padding: 14px 32px; border-radius: var(--cerco-radius-btn);
	background: #fff; color: var(--cerco-brand); font-weight: 800; text-decoration: none;
	transition: transform .12s ease;
}
.cerco-cta-btn:hover { transform: translateY(-1px); color: var(--cerco-brand); text-decoration: none; }
.cerco-cta-actions { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cerco-cta-tel {
	display: inline-block; padding: 14px 26px; border-radius: var(--cerco-radius-btn);
	border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; font-weight: 700; text-decoration: none;
}
.cerco-cta-tel:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; }

/* ------------------------------------------------ stats bar & activity log */

.cerco-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 0 0 22px; }
.cerco-stat {
	flex: 1 1 148px; text-align: center; padding: 14px 12px;
	border: 1px solid var(--cerco-line); border-radius: var(--cerco-radius-card); background: var(--cerco-soft);
}
.cerco-stat b { display: block; font-size: 1.55rem; line-height: 1.15; color: var(--cerco-ink); font-weight: 800; }
.cerco-stat b i { font-style: normal; font-size: .7rem; color: var(--cerco-body); font-weight: 400; }
.cerco-stat span { font-size: .78rem; color: var(--cerco-body); }

.cerco-log { max-width: 860px; margin: 28px auto 0; color: var(--cerco-body); font-family: inherit; }
.cerco-log-h { margin: 0 0 12px; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cerco-body); }

.cerco-log-list { list-style: none; margin: 0; padding: 0; }
.cerco-log-list li {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 0; border-bottom: 1px solid var(--cerco-line); font-size: .94rem;
}
.cerco-log-list li:last-child { border-bottom: 0; }
.cerco-log-domain { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: var(--cerco-ink); }
.cerco-log-score { color: var(--cerco-body); font-variant-numeric: tabular-nums; }
.cerco-log-score i { font-style: normal; font-size: .8em; }
.cerco-log-when { color: var(--cerco-body); font-size: .8rem; white-space: nowrap; }

.cerco-grade {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; padding: 4px 9px; border-radius: 8px;
	font-weight: 800; font-size: .84rem; color: #fff; background: var(--cerco-body);
}
.cerco-grade--good { background: var(--cerco-good); }
.cerco-grade--ok { background: var(--cerco-ok); }
.cerco-grade--bad { background: var(--cerco-bad); }

.cerco-ticker { overflow: hidden; position: relative; border-block: 1px solid var(--cerco-line); }
.cerco-ticker::before, .cerco-ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 2; pointer-events: none; }
.cerco-ticker::before { left: 0; background: linear-gradient(to right, var(--cerco-bg), transparent); }
.cerco-ticker::after { right: 0; background: linear-gradient(to left, var(--cerco-bg), transparent); }
.cerco-ticker-track { display: flex; width: max-content; animation: cerco-marquee 42s linear infinite; }
.cerco-ticker:hover .cerco-ticker-track { animation-play-state: paused; }
.cerco-ticker .cerco-log-list { display: flex; }
.cerco-ticker .cerco-log-list li { border-bottom: 0; padding: 12px 26px 12px 0; white-space: nowrap; }
.cerco-ticker .cerco-log-domain { flex: 0 0 auto; }
@keyframes cerco-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.cerco-ticker-track { animation: none; }
	.cerco-ticker { overflow-x: auto; }
}

.cerco-log-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.cerco-log-table th {
	text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
	color: var(--cerco-body); font-weight: 700; padding: 0 12px 10px 0; border-bottom: 1px solid var(--cerco-line);
}
.cerco-log-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--cerco-line); vertical-align: middle; }
.cerco-bar--mini { display: inline-block; width: 72px; margin-right: 10px; vertical-align: middle; }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 620px) {
	.cerco-form {
		display: grid; gap: 8px; border-radius: var(--cerco-radius-card);
		padding: 10px; grid-template-columns: 1fr;
	}
	.cerco-url {
		width: 100%; text-align: center; padding: 13px 14px;
		border: 1px solid var(--cerco-line); border-radius: var(--cerco-radius-input);
	}
	.cerco-btn { width: 100%; padding: 15px 20px; }
	.cerco-lh { grid-template-columns: repeat(2, 1fr); }
	.cerco-cwv { grid-template-columns: repeat(2, 1fr); }
	.cerco-stat { flex-basis: 100%; }
	.cerco-cta-actions { flex-direction: column; }
	.cerco-cta-btn, .cerco-cta-tel { width: 100%; text-align: center; }
	.cerco-tabs { width: 100%; justify-content: center; }
	.cerco-log-when { display: none; }
	.cerco-head { padding: 20px; gap: 18px; justify-content: center; text-align: center; }
	.cerco-head-txt { flex-basis: 100%; }
	.cerco-actions { justify-content: center; }
	.cerco-prio-list li, .cerco-opp, .cerco-gate, .cerco-cta { padding: 18px 16px; }
	.cerco-sec-h { font-size: 1.15rem; }
	.cerco-score { width: 108px; height: 108px; }
}

/* Very narrow phones. */
@media (max-width: 380px) {
	.cerco-lh, .cerco-cwv { grid-template-columns: 1fr; }
	.cerco-h { font-size: 1.35rem; }
}

/* --------------------------------------------------------- print / save PDF */

@media print {
	.cerco-form, .cerco-intro .cerco-sub, .cerco-loading, .cerco-actions,
	.cerco-gate, .cerco-tabs, .cerco-log, .cerco-stats { display: none !important; }
	.cerco, .cerco-results { max-width: none; }
	.cerco-psi-pane[hidden] { display: block !important; }
	.cerco-head, .cerco-prio-list li, .cerco-opp, .cerco-lh-item, .cerco-cwv-item { box-shadow: none; }
	.cerco-check, .cerco-opp, .cerco-prio-list li, .cerco-cwv-item { break-inside: avoid; }
	.cerco-sec-h, .cerco-detail-h { break-after: avoid; }
	.cerco-cta { background: none !important; color: #000 !important; border: 1px solid #999; }
	.cerco-cta h3, .cerco-cta p { color: #000 !important; }
}

/* ------------------------------------------------- theme link/button armour
 *
 * Themes (Elementor kits especially) style a:hover globally, often with
 * !important, which repaints these buttons mid-hover — red text on a red
 * background reads as an empty box. Every interactive element inside the
 * widget therefore states its own colours for every state, at a specificity
 * the host theme cannot casually outrank.
 */

.cerco a,
.cerco a:link,
.cerco a:visited,
.cerco a:hover,
.cerco a:focus,
.cerco a:active { text-decoration: none; }

/* Primary submit button */
.cerco .cerco-btn,
.cerco .cerco-btn:hover,
.cerco .cerco-btn:focus,
.cerco .cerco-btn:active,
.cerco .cerco-btn:disabled {
	background-color: var(--cerco-brand) !important;
	color: #fff !important;
	border: 0 !important;
	text-decoration: none !important;
}
.cerco .cerco-btn:hover { filter: brightness(1.1); }

/* Solid button on the brand-coloured CTA panel */
.cerco .cerco-cta-btn,
.cerco .cerco-cta-btn:link,
.cerco .cerco-cta-btn:visited,
.cerco .cerco-cta-btn:hover,
.cerco .cerco-cta-btn:focus,
.cerco .cerco-cta-btn:active {
	background-color: #fff !important;
	color: var(--cerco-brand) !important;
	border: 0 !important;
	text-decoration: none !important;
}
.cerco .cerco-cta-btn:hover,
.cerco .cerco-cta-btn:focus { background-color: #f4f5f7 !important; }

/* Outlined call link on the same panel */
.cerco .cerco-cta-tel,
.cerco .cerco-cta-tel:link,
.cerco .cerco-cta-tel:visited,
.cerco .cerco-cta-tel:hover,
.cerco .cerco-cta-tel:focus,
.cerco .cerco-cta-tel:active {
	color: #fff !important;
	border: 1.5px solid rgba(255, 255, 255, .6) !important;
	text-decoration: none !important;
	background-color: transparent !important;
}
.cerco .cerco-cta-tel:hover,
.cerco .cerco-cta-tel:focus {
	background-color: rgba(255, 255, 255, .18) !important;
	border-color: #fff !important;
}

/* Secondary "Download PDF report" button */
.cerco .cerco-ghost,
.cerco .cerco-ghost:hover,
.cerco .cerco-ghost:focus,
.cerco .cerco-ghost:active {
	background-color: var(--cerco-bg) !important;
	color: var(--cerco-ink) !important;
	text-decoration: none !important;
}
.cerco .cerco-ghost:hover,
.cerco .cerco-ghost:focus {
	border-color: var(--cerco-brand) !important;
	color: var(--cerco-brand) !important;
}

/* Mobile/desktop tabs */
.cerco .cerco-tab,
.cerco .cerco-tab:hover,
.cerco .cerco-tab:focus { background-color: transparent; color: var(--cerco-body) !important; }
.cerco .cerco-tab:hover { color: var(--cerco-ink) !important; }
.cerco .cerco-tab.is-active,
.cerco .cerco-tab.is-active:hover,
.cerco .cerco-tab.is-active:focus {
	background-color: var(--cerco-brand) !important;
	color: #fff !important;
}

/* Keyboard focus stays visible on every control. */
.cerco a:focus-visible,
.cerco button:focus-visible,
.cerco input:focus-visible {
	outline: 2px solid var(--cerco-brand);
	outline-offset: 3px;
}
.cerco .cerco-cta-btn:focus-visible,
.cerco .cerco-cta-tel:focus-visible { outline-color: #fff; }
