/* ============================================================
   Kukurudza IG-Audit — фірмова тема kukurudza.com
   Джерело токенів: archive/css/main.css + targetologist.css (живий сайт).
   Палітра: #1a1a1a чорний · #ff6b00 помаранч · #f7f7f7 фон ·
            #e2ffb9 лайм · #06774a/#75d164 зелень · #e8e8e8 лінії.
   Шрифти: KyivType Titling (дисплей) · Ermilov-Bold (заголовки/кнопки,
            UPPERCASE) · Kukurudza (акценти) · Commissioner (текст).
   ============================================================ */

@font-face {
  font-family: 'KyivType Titling';
  src: url('/fonts/KyivTypeTitling-Light3.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Ermilov';
  src: url('/fonts/ermilov-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Kukurudza';
  src: url('/fonts/Kukurudza-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --ink-2: #131313;
  --muted: #3f3f3f;
  --muted-2: #b9b9b9;
  --bg: #f7f7f7;
  --white: #ffffff;
  --line: #e8e8e8;
  --orange: #ff6b00;
  --lime: #e2ffb9;
  --green: #06774a;
  --green-l: #75d164;
  --grad: linear-gradient(120deg, var(--green), var(--green-l));
  --font-display: 'KyivType Titling', 'Commissioner', serif;
  --font-head: 'Ermilov', 'Commissioner', sans-serif;
  --font-brand: 'Kukurudza', 'Commissioner', sans-serif;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.07);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Commissioner', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { line-height: 1.1; margin: 0 0 .4em; }
.hl { color: var(--orange); }
b { font-weight: 700; }

/* ── topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; max-width: 880px; margin: 0 auto;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700; font-size: 20px; text-transform: uppercase;
  text-decoration: none; color: var(--ink); letter-spacing: .01em;
  margin-bottom: -4px;
}
.topbar__tag { font-family: var(--font-brand); font-size: 15px; color: var(--green); }

/* ── hero ── */
.hero { max-width: 760px; margin: 0 auto; padding: 40px 20px 46px; text-align: center; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 1.25rem + 3.4vw, 3.55rem);
  letter-spacing: -.01em;
}
.hero__sub { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 580px; margin: 14px auto 30px; }

.finder { max-width: 580px; margin: 0 auto; }
.finder__row {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 2px solid var(--line); border-radius: 100px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow); transition: border-color .2s;
}
.finder__row:focus-within { border-color: var(--green-l); }
.finder__at { color: var(--muted-2); font-weight: 800; font-size: 18px; }
.finder__input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; min-width: 0; color: var(--ink); }
.finder__hint { font-size: 12.5px; color: var(--muted-2); margin: 12px 4px 0; }
.finder__err { color: #c0392b; font-weight: 600; font-size: 14px; margin: 10px 0 0; }

/* ── кнопки: pill як на kukurudza.com (Ermilov, uppercase) ── */
.btn {
  border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  border-radius: 100px; padding: 15px 28px 12px; font-size: 16px; letter-spacing: .02em;
  color: var(--bg); transition: transform .12s, filter .25s, background .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--go { background: var(--orange); }
.btn--go:hover { filter: brightness(1.08); }
.btn--tg {
  background: var(--orange); display: inline-block; text-decoration: none; text-align: center;
  padding: 19px 34px 15px; font-size: 18px;
}
.btn--tg:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: default; }

/* ── loading / progress ── */
.loading { text-align: center; padding: 50px 20px 56px; max-width: 540px; margin: 0 auto; }
.progress {
  height: 14px; border-radius: 100px; background: var(--line);
  overflow: hidden; box-shadow: inset 0 1px 3px rgba(26, 26, 26, .08);
}
.progress__fill {
  height: 100%; width: 0%; border-radius: 100px;
  background: var(--grad);
  transition: width .5s cubic-bezier(.25, .6, .35, 1);
  position: relative;
}
.progress__fill::after {
  content: ''; position: absolute; inset: 0; border-radius: 100px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: shine 1.6s linear infinite;
}
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress__meta {
  display: flex; justify-content: space-between; margin: 10px 4px 22px;
  font-size: 13.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
}
.progress__meta #progPct { font-family: var(--font-head); color: var(--green); font-size: 15px; }
.loading__msg { font-family: var(--font-brand); color: var(--ink); font-size: 19px; min-height: 1.6em; }

/* ── result ── */
.result { max-width: 720px; margin: 0 auto; padding: 10px 20px 20px; }
.result__head {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
.result__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-l); }
.result__handle { font-weight: 800; font-size: 18px; }
.result__followers { color: var(--muted); font-size: 14px; }
.score {
  margin-left: auto; text-align: center; background: var(--lime); color: var(--green);
  border-radius: 16px; padding: 10px 16px 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 27px; line-height: 1;
}
.score small { font-size: 13px; opacity: .75; }

/* вердикт: чорний блок з помаранчевою рискою — фірмовий контраст сайту */
.verdict {
  background: var(--ink); color: var(--bg);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius);
  padding: 22px 24px; font-size: 18.5px; font-weight: 600; line-height: 1.5;
  margin-bottom: 16px; box-shadow: var(--shadow);
}

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card h2 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 17px; letter-spacing: .03em; margin-bottom: .6em;
}
.card__body { color: var(--muted); white-space: pre-wrap; }
.card__body p { margin: 0 0 .7em; }
.card--roast { border: 2px solid var(--orange); }

/* content mix */
.mixbar { display: flex; height: 16px; border-radius: 100px; overflow: hidden; margin: 6px 0 12px; background: var(--line); }
.mixbar > span { display: block; }
.mixlegend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mixlegend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* roast */
.roast { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: r; }
.roast li { counter-increment: r; position: relative; padding: 13px 0 13px 46px; border-top: 1px solid var(--line); }
.roast li:first-child { border-top: 0; }
.roast li::before {
  content: counter(r); position: absolute; left: 0; top: 13px; width: 31px; height: 31px;
  background: var(--orange); color: var(--bg); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; padding-top: 2px;
}
.roast b { display: block; margin-bottom: 2px; color: var(--ink); }
.roast span { color: var(--muted); font-size: 14.5px; }

.disclaimer { color: var(--muted-2); font-size: 13.5px; text-align: center; margin: 18px 0 0; }

/* ── скелетони прогресивного підвантаження ── */
.skel-line {
  height: 12px; border-radius: 6px; margin: 11px 0;
  background: linear-gradient(90deg, #ececec 25%, #e0e0e0 37%, #ececec 63%);
  background-size: 400% 100%;
  animation: skel 1.4s ease infinite;
}
.skel-line--w80 { width: 80%; }
.skel-line--w60 { width: 60%; }
.verdict .skel-line {
  background: linear-gradient(90deg, rgba(247,247,247,.14) 25%, rgba(247,247,247,.3) 37%, rgba(247,247,247,.14) 63%);
  background-size: 400% 100%;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.card__body > *, .verdict > span, .roast, .mixbar, .mixlegend { animation: fadein .45s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── cta / quiz: чорна секція як на сайті ── */
.cta { background: var(--ink); color: var(--bg); padding: 48px 20px 52px; margin-top: 28px; }
.cta__inner { max-width: 620px; margin: 0 auto; }
.cta__title {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(22px, 4.6vw, 30px); text-align: center; letter-spacing: .01em;
}
.cta__title .hl { color: var(--orange); }
.cta__sub { text-align: center; color: var(--muted-2); margin: 10px auto 28px; max-width: 500px; }
.quiz { display: grid; gap: 16px; }
.q { border: 0; margin: 0; padding: 0; }
.q legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.q__text {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--muted);
  background: var(--ink-2); color: var(--bg); font: inherit; outline: 0;
}
.q__text::placeholder { color: #8a8a8a; }
.q__text:focus { border-color: var(--green-l); }
.q__opts { display: grid; gap: 8px; }
.q__opts label {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px;
  background: var(--ink-2); border: 2px solid var(--muted); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.q__opts label:has(input:checked) { border-color: var(--green-l); background: #1e2a1e; }
.q__opts input { accent-color: var(--green-l); width: 18px; height: 18px; }
.quiz .btn--tg { margin-top: 10px; }
.quiz__err { color: #ff9d84; font-weight: 600; }

/* ── thanks ── */
.thanks { text-align: center; padding: 60px 20px; }
.thanks__inner { max-width: 460px; margin: 0 auto; }
.thanks__emoji { font-size: 52px; }
.thanks h2 { font-family: var(--font-head); text-transform: uppercase; font-size: 24px; }
.thanks p { color: var(--muted); margin-bottom: 22px; }

/* ── footer ── */
.footer { text-align: center; padding: 32px 20px; color: var(--muted-2); font-size: 13.5px; }
.footer a { color: var(--green); font-weight: 700; }

@media (min-width: 640px) {
  .finder__input { font-size: 17px; }
}
