/* CLIX Creator Audit — public widget. */

.clix {
	--c-ink: #17171B;
	--c-muted: #6E7079;
	--c-line: #ECECF1;
	--c-amber: #F2820D;
	--c-amber-soft: #FEF3E4;
	--c-green: #16A34A;
	--c-green-soft: #E7F6EC;
	--c-red: #DC2626;
	--c-red-soft: #FDECEC;
	--c-shadow: 0 1px 2px rgba(16,17,20,.04), 0 12px 32px -20px rgba(16,17,20,.25);

	max-width: 1040px;
	margin: 0 auto;
	font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
	color: var(--c-ink);
}
.clix *, .clix-modal * { box-sizing: border-box; }
body.clix-locked { overflow: hidden; }

/* The [hidden] attribute only works because the UA stylesheet says display:none. ANY author
   rule that sets display — like .clix-modal { display:flex } — silently beats it, and the
   element stays on screen while the JS believes it is closed. Never rely on [hidden] alone
   for an element you also give a display value. */
.clix [hidden],
.clix-modal[hidden],
.clix-modal [hidden] { display: none !important; }

/* ---------- Masthead ---------- */
.clix-masthead { text-align: center; margin-bottom: 20px; }
.clix-masthead h1 {
	margin: 0 0 10px;
	font-size: clamp( 28px, 4.4vw, 42px );
	line-height: 1.12;
	letter-spacing: -.035em;
	font-weight: 750;

	/* Instagram's warm end into YouTube's red, landing on our amber — one gradient that
	   says "both platforms" without printing two logos. */
	background: linear-gradient( 92deg, #F2820D 0%, #E1306C 42%, #C42B78 58%, #FF0033 100% );
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
/* If a browser cannot clip the gradient to text, it must not render invisible text. */
@supports not ( ( -webkit-background-clip: text ) or ( background-clip: text ) ) {
	.clix-masthead h1 { color: var(--c-ink); -webkit-text-fill-color: currentColor; }
}
.clix-masthead p {
	margin: 0 auto;
	max-width: 560px;
	font-size: 15px;
	color: var(--c-muted);
}

/* ---------- Form ---------- */
.clix-form { background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--c-shadow); }
.clix-form.is-busy { opacity: .6; }

.clix-tabs { display: inline-flex; background: #F4F4F6; border-radius: 11px; padding: 3px; margin-bottom: 14px; }
.clix-tabs button {
	border: 0; background: none; padding: 7px 16px; border-radius: 9px;
	font: inherit; font-size: 13px; font-weight: 600; color: var(--c-muted); cursor: pointer;
}
.clix-tabs button.is-active { background: #fff; color: var(--c-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.clix-input { display: flex; gap: 8px; }
.clix-input input {
	flex: 1; min-width: 0; border: 1px solid var(--c-line); border-radius: 14px;
	padding: 18px 20px; font: inherit; font-size: 16px; background: #FBFBFC;
}
.clix-input input:focus { outline: 2px solid var(--c-amber-soft); border-color: var(--c-amber); background: #fff; }

.clix-btn {
	border: 0; background: var(--c-ink); color: #fff;
	padding: 16px 28px; border-radius: 12px;
	font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
	white-space: nowrap; text-decoration: none;
	display: inline-flex; align-items: center; justify-content: center;
	transition: opacity .15s;
}
.clix-btn:hover { opacity: .88; color: #fff; }
.clix-btn:disabled { opacity: .5; cursor: default; }
.clix-btn.ghost { background: #fff; color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-line); }
.clix-btn.full { width: 100%; }

.clix-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--c-muted); }
.clix-error {
	margin: 12px 0 0; font-size: 13px; color: var(--c-red);
	background: var(--c-red-soft); padding: 10px 13px; border-radius: 10px;
}

/* ---------- Result shell ---------- */
.clix-result { background: #fff; border-radius: 20px; padding: 26px; margin-top: 18px; box-shadow: var(--c-shadow); }

/* Scanning */
.clix-scan { display: flex; align-items: center; gap: 13px; }
.clix-scan strong { display: block; font-size: 15px; }
.clix-scan em { font-style: normal; font-size: 13px; color: var(--c-muted); }
.clix-spinner {
	width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px;
	border: 2px solid var(--c-line); border-top-color: var(--c-amber);
	animation: clix-spin .7s linear infinite;
}
@keyframes clix-spin { to { transform: rotate(360deg); } }

.clix-skel { display: grid; gap: 10px; margin-top: 22px; }
.clix-skel-bar {
	height: 12px; border-radius: 99px;
	background: linear-gradient(90deg, #F1F1F4 25%, #E7E7EC 50%, #F1F1F4 75%);
	background-size: 200% 100%;
	animation: clix-shimmer 1.3s infinite;
}
@keyframes clix-shimmer { to { background-position: -200% 0; } }

/* Hero */
.clix-hero {
	display: flex; justify-content: space-between; align-items: center;
	gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--c-line);
}
.clix-hero-id { display: flex; align-items: center; gap: 12px; }
.clix-hero-id img, .clix-ph {
	width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px; object-fit: cover;
	background: var(--c-amber-soft); color: #B45309;
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
}
.clix-hero-id strong { display: block; font-size: 16px; }
.clix-hero-id em { font-style: normal; font-size: 13px; color: var(--c-muted); }

.clix-done {
	font-size: 12px; font-weight: 600; color: var(--c-green);
	background: var(--c-green-soft); padding: 6px 12px; border-radius: 99px;
}

.clix-hero-score { display: flex; align-items: center; gap: 14px; }
.clix-hero-score strong { display: block; font-size: 14px; }
.clix-hero-score em { font-style: normal; font-size: 12px; color: var(--c-muted); }

.clix-ring {
	width: 66px; height: 66px; border-radius: 50%; flex: 0 0 66px;
	display: flex; align-items: center; justify-content: center; position: relative;
	background: conic-gradient(var(--ring, var(--c-amber)) calc(var(--pct) * 1%), #F0F0F4 0);
}
.clix-ring::before { content: ''; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.clix-ring span { position: relative; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tone-ok .clix-ring { --ring: var(--c-green); }
.tone-warn .clix-ring { --ring: var(--c-amber); }
.tone-bad .clix-ring { --ring: var(--c-red); }

.clix-headline { margin: 18px 0; font-size: 15px; }

/* Tiles */
.clix-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 0; }
.clix-tile { border: 1px solid var(--c-line); border-radius: 13px; padding: 13px 14px; }
.clix-tile span { display: block; font-size: 11px; color: var(--c-muted); margin-bottom: 4px; }
.clix-tile strong { font-size: 21px; letter-spacing: -.02em; }
.clix-tile strong em { font-size: 12px; font-style: normal; color: var(--c-muted); font-weight: 500; }
.clix-tile.flag { border-color: #F8DEBB; background: var(--c-amber-soft); }
.clix-tile.flag strong { color: #B45309; }

/* ---------- The veil: half-loaded, locked ---------- */
.clix-veil { position: relative; margin-top: 22px; }
.clix-veil-rows {
	display: grid; gap: 12px; padding: 4px 0;
	filter: blur(7px); opacity: .55; pointer-events: none; user-select: none;
}
.clix-veil-row { display: flex; gap: 12px; align-items: center; }
.clix-veil-row i:first-child {
	height: 34px; width: 34px; border-radius: 10px; background: #E4E4EA; flex: 0 0 34px; display: block;
}
.clix-veil-row i:last-child {
	height: 12px; border-radius: 99px; background: #ECECF1; display: block; flex: 1;
}
.clix-veil-row:nth-child(2) i:last-child { flex: 0 0 70%; }
.clix-veil-row:nth-child(4) i:last-child { flex: 0 0 55%; }

.clix-veil-cta {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	text-align: center; border-radius: 14px;
	background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.92) 55%);
}
.clix-veil-cta strong { font-size: 14px; }

/* ---------- Modal ---------- */
.clix-modal {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center; padding: 20px;
}
.clix-modal-backdrop { position: absolute; inset: 0; background: rgba(17,17,21,.55); backdrop-filter: blur(3px); }
.clix-modal-card {
	position: relative; background: #fff; border-radius: 22px;
	padding: 30px 30px 22px; max-width: 410px; width: 100%;
	box-shadow: 0 30px 70px -20px rgba(0,0,0,.4);
	max-height: 92vh; overflow-y: auto;
	animation: clix-rise .22s ease-out;
	font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
	color: #17171B;
}
@keyframes clix-rise { from { transform: translateY(14px); opacity: 0; } }

.clix-close {
	position: absolute; top: 12px; right: 14px;
	border: 0; background: none; font-size: 25px; line-height: 1;
	color: #9A9CA5; cursor: pointer; padding: 4px 8px;
}
.clix-close:hover { color: #17171B; }

.clix-modal-head { text-align: center; margin-bottom: 20px; }
.clix-lock {
	width: 44px; height: 44px; border-radius: 13px; margin: 0 auto 14px;
	background: #FEF3E4; color: #B45309;
	display: flex; align-items: center; justify-content: center;
}
.clix-modal-head h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.clix-modal-head p { margin: 0; font-size: 13.5px; color: #6E7079; }

.clix-auth-tabs { display: flex; background: #F4F4F6; border-radius: 11px; padding: 3px; margin-bottom: 18px; }
.clix-auth-tabs button {
	flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 9px;
	font: inherit; font-size: 13px; font-weight: 600; color: #6E7079; cursor: pointer;
}
.clix-auth-tabs button.is-active { background: #fff; color: #17171B; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.clix-gbtn { display: flex; justify-content: center; min-height: 44px; }
.clix-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: #9A9CA5; font-size: 12px; }
.clix-or::before, .clix-or::after { content: ''; flex: 1; height: 1px; background: #ECECF1; }

.clix-field { display: block; margin-bottom: 13px; }
.clix-field span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.clix-field input {
	width: 100%; border: 1px solid #ECECF1; border-radius: 11px;
	padding: 11px 13px; font: inherit; font-size: 14px; background: #FBFBFC;
}
.clix-field input:focus { outline: 2px solid #FEF3E4; border-color: #F2820D; background: #fff; }

.clix-auth-form .clix-btn { margin-top: 6px; }

.clix-admin-note {
	font-size: 12px; background: #FFF8F0; border: 1px solid #FCE4C7;
	color: #7A4B12; padding: 10px 12px; border-radius: 10px; margin: 0 0 14px;
}

.clix-modal-note { margin: 16px 0 0; font-size: 11.5px; color: #9A9CA5; text-align: center; line-height: 1.55; }
.clix-modal-note a { color: #F2820D; }

/* ---------- Full report ---------- */
.clix-result h4 {
	font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
	color: var(--c-muted); margin: 26px 0 12px;
}
.clix-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clix-score { border: 1px solid var(--c-line); border-radius: 12px; padding: 11px 13px; }
.clix-score span { display: block; font-size: 11px; color: var(--c-muted); margin-bottom: 3px; }
.clix-score span em { font-style: normal; opacity: .7; }
.clix-score strong { font-size: 18px; }

.clix-meter { height: 5px; border-radius: 99px; background: #F0F0F4; overflow: hidden; margin-top: 7px; }
.clix-meter i { display: block; height: 100%; border-radius: 99px; background: var(--c-amber); }

.clix-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.clix-signals li { display: flex; gap: 11px; padding: 13px 14px; border-radius: 12px; }
.clix-signals li.high { background: var(--c-red-soft); }
.clix-signals li.warn { background: var(--c-amber-soft); }
.clix-signals li.ok { background: var(--c-green-soft); }
.clix-signals li.info { background: #F5F5F8; }
.clix-sig-icon {
	width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px; margin-top: 1px;
	display: flex; align-items: center; justify-content: center;
	font-size: 11px; font-weight: 700; color: #fff; background: #C8C8D2;
}
.clix-signals li.high .clix-sig-icon { background: var(--c-red); }
.clix-signals li.warn .clix-sig-icon { background: var(--c-amber); }
.clix-signals li.ok .clix-sig-icon { background: var(--c-green); }
.clix-signals strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.clix-signals p { margin: 0; font-size: 13px; color: #4C4E56; }

.clix-rec { background: #F6F8FF; border: 1px solid #E1E7FB; border-radius: 13px; padding: 14px 16px; margin: 22px 0 14px; }
.clix-rec strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #4B5670; margin-bottom: 4px; }
.clix-rec p { margin: 0; font-size: 14px; }

.clix-disclaimer { font-size: 12px; color: var(--c-muted); background: #F7F7F9; padding: 12px 14px; border-radius: 11px; }
.clix-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

.clix-credit { text-align: center; font-size: 12px; color: var(--c-muted); margin-top: 16px; }
.clix-credit a { color: var(--c-amber); text-decoration: none; }

@media (max-width: 600px) {
	.clix-input { flex-direction: column; }
	.clix-three, .clix-scores { grid-template-columns: 1fr 1fr; }
	.clix-hero { flex-direction: column; align-items: flex-start; }
	.clix-modal-card { padding: 26px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.clix-modal-card, .clix-skel-bar, .clix-spinner { animation: none; }
}


/* ---------- FAQ ---------- */
.clix-faq { max-width: 1040px; margin: 48px auto 0; }
.clix-faq-head { text-align: center; margin-bottom: 22px; }
.clix-faq-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; color: var(--c-ink); }
.clix-faq-head p { margin: 0; font-size: 14px; color: var(--c-muted); }

.clix-faq-list { display: grid; gap: 8px; }

.clix-faq-item {
	background: #fff; border-radius: 14px; box-shadow: var(--c-shadow);
	overflow: hidden;
}
.clix-faq-item summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 16px 18px;
	font-size: 14.5px; font-weight: 600; color: var(--c-ink);
}
.clix-faq-item summary::-webkit-details-marker { display: none; }
.clix-faq-item summary:hover { background: #FAFAFB; }
.clix-faq-item summary:focus-visible { outline: 2px solid var(--c-amber); outline-offset: -2px; }

.clix-faq-item summary::after {
	content: ''; flex: 0 0 9px; width: 9px; height: 9px;
	border-right: 2px solid #9A9CA5; border-bottom: 2px solid #9A9CA5;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .18s;
}
.clix-faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.clix-faq-item[open] summary { color: #B45309; }

.clix-faq-item .clix-faq-body {
	padding: 0 18px 18px;
	font-size: 14px; line-height: 1.65; color: #4C4E56;
}
.clix-faq-item .clix-faq-body p { margin: 0 0 10px; }
.clix-faq-item .clix-faq-body p:last-child { margin: 0; }
.clix-faq-item .clix-faq-body strong { color: var(--c-ink); }
.clix-faq-item .clix-faq-body code {
	background: #F4F4F6; padding: 1px 6px; border-radius: 5px; font-size: 12.5px;
}

@media (prefers-reduced-motion: reduce) {
	.clix-faq-item summary::after { transition: none; }
}


/* ---------- YouTube channel panel ---------- */
.clix-channel { margin: 24px 0 4px; }

.clix-channel-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 165px, 1fr ) );
	gap: 10px;
	margin-bottom: 18px;
}
.clix-cstat {
	border: 1px solid var(--c-line);
	border-radius: 13px;
	padding: 13px 15px;
	background: #FCFCFD;
}
.clix-cstat span {
	display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
	font-size: 11px; color: var(--c-muted); margin-bottom: 5px;
}
.clix-cstat strong {
	display: block;
	font-size: 20px;
	letter-spacing: -.025em;
	line-height: 1.2;
}

.clix-chip {
	font-style: normal; font-size: 10px; font-weight: 700;
	padding: 2px 6px; border-radius: 99px;
}
.clix-chip.up { background: var(--c-green-soft); color: var(--c-green); }
.clix-chip.down { background: var(--c-red-soft); color: var(--c-red); }
.clix-chip.muted { background: #F1F1F5; color: #9A9CA5; font-weight: 600; }

.clix-trend {
	border: 1px solid var(--c-line);
	border-radius: 14px;
	padding: 14px 16px 6px;
	margin-bottom: 10px;
	background: #fff;
}
.clix-trend-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.clix-trend-head strong { font-size: 13px; }
.clix-trend-total { font-size: 15px; font-weight: 700; color: var(--c-amber); letter-spacing: -.02em; }
.clix-trend-head em { font-style: normal; font-size: 11px; color: var(--c-muted); margin-left: auto; }
.clix-trend svg { width: 100%; height: 78px; display: block; }

.clix-trend.is-empty { padding: 14px 16px; background: #FAFAFB; }
.clix-trend.is-empty strong { display: block; font-size: 13px; margin-bottom: 3px; }
.clix-trend.is-empty p { margin: 0; font-size: 12.5px; color: var(--c-muted); }

.clix-note {
	font-size: 12px; color: var(--c-muted);
	background: #F7F7F9; padding: 10px 13px; border-radius: 10px;
	margin: 12px 0 0;
}

@media (max-width: 600px) {
	.clix-channel-grid { grid-template-columns: 1fr 1fr; }
}
