/* Real or AI — interactive quiz
   Scoped to .rq-* so it cannot collide with style.css or scanner.css.
   Inherits tokens from css/style.css; declares fallbacks so the widget
   still renders if loaded standalone. */

.rq {
    --rq-bg: var(--color-bg, #04060c);
    --rq-surface: var(--color-surface, #0c1018);
    --rq-surface-2: #131926;
    --rq-border: var(--color-border, rgba(255, 255, 255, 0.06));
    --rq-border-strong: rgba(255, 255, 255, 0.14);
    --rq-text: var(--color-text, #f0f6fc);
    --rq-muted: var(--color-text-muted, #8b949e);
    --rq-real: var(--color-accent, #10b981);
    --rq-real-soft: rgba(16, 185, 129, 0.12);
    --rq-ai: var(--color-warning, #ef4444);
    --rq-ai-soft: rgba(239, 68, 68, 0.12);
    --rq-radius: 16px;

    max-width: 640px;
    margin: 0 auto 64px;
    /* The site header is position:fixed and this block is the first content on
       the page, so it must reserve its own clearance. */
    padding-top: calc(var(--header-height, 80px) + 24px);
    scroll-margin-top: calc(var(--header-height, 80px) + 16px);
}

.rq-panel {
    scroll-margin-top: calc(var(--header-height, 80px) + 16px);
}

/* ---------- shared ---------- */

.rq-panel {
    background: var(--rq-surface);
    border: 1px solid var(--rq-border);
    border-radius: var(--rq-radius);
    padding: 32px 28px;
}

.rq-btn {
    font: inherit;
    font-weight: 600;
    color: #04060c;
    background: var(--rq-real);
    border: 0;
    border-radius: 10px;
    padding: 14px 28px;
    cursor: pointer;
    /* anchors and buttons share this class — normalise both */
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s;
}

a.rq-btn:hover { text-decoration: none; }

.rq-btn:hover { filter: brightness(1.08); }
.rq-btn:active { transform: translateY(1px); }

.rq-btn--ghost {
    background: transparent;
    color: var(--rq-text);
    border: 1px solid var(--rq-border-strong);
}

.rq-btn--ghost:hover { background: rgba(255, 255, 255, 0.04); filter: none; }

.rq :focus-visible {
    outline: 2px solid var(--rq-real);
    outline-offset: 3px;
}

.rq-hidden { display: none !important; }

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

.rq-intro { text-align: center; }

.rq-stat {
    font-size: clamp(3.25rem, 12vw, 5rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--rq-ai);
    display: block;
}

.rq-stat-label {
    display: block;
    margin-top: 12px;
    font-size: 1.0625rem;
    color: var(--rq-text);
    font-weight: 600;
}

.rq-intro p {
    color: var(--rq-muted);
    margin: 12px auto 28px;
    max-width: 42ch;
    font-size: 0.9375rem;
}

.rq-meta {
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--rq-muted);
}

/* ---------- progress ---------- */

.rq-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: var(--rq-muted);
    font-variant-numeric: tabular-nums;
}

.rq-track {
    height: 3px;
    background: var(--rq-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.rq-fill {
    height: 100%;
    background: var(--rq-real);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- the image ---------- */

.rq-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--rq-surface-2);
    border: 1px solid var(--rq-border);
}

.rq-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rq-verdict-tag {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #04060c;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.rq-verdict-tag.is-shown { transform: translateY(0); }
.rq-verdict-tag[data-answer="real"] { background: var(--rq-real); }
.rq-verdict-tag[data-answer="ai"] { background: var(--rq-ai); }

/* ---------- answer buttons ---------- */

.rq-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.rq-answer {
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    padding: 18px 12px;
    border-radius: 12px;
    cursor: pointer;
    background: var(--rq-surface-2);
    color: var(--rq-text);
    border: 1px solid var(--rq-border-strong);
    transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.rq-answer:hover:not(:disabled) { transform: translateY(-2px); }
.rq-answer[data-choice="real"]:hover:not(:disabled) { border-color: var(--rq-real); background: var(--rq-real-soft); }
.rq-answer[data-choice="ai"]:hover:not(:disabled) { border-color: var(--rq-ai); background: var(--rq-ai-soft); }
.rq-answer:disabled { cursor: default; opacity: 0.45; }
.rq-answer.is-picked { opacity: 1; }
.rq-answer.is-picked[data-choice="real"] { border-color: var(--rq-real); background: var(--rq-real-soft); }
.rq-answer.is-picked[data-choice="ai"] { border-color: var(--rq-ai); background: var(--rq-ai-soft); }

.rq-answer small {
    display: block;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--rq-muted);
    margin-top: 4px;
}

/* ---------- reveal ---------- */

.rq-reveal {
    margin-top: 16px;
    padding: 20px;
    border-radius: 12px;
    background: var(--rq-surface-2);
    border: 1px solid var(--rq-border);
}

.rq-judgement {
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.rq-judgement[data-ok="yes"] { color: var(--rq-real); }
.rq-judgement[data-ok="no"] { color: var(--rq-ai); }

.rq-tell-label {
    font-weight: 650;
    font-size: 1.0625rem;
    margin-bottom: 6px;
}

.rq-tell-body {
    color: var(--rq-muted);
    font-size: 0.9375rem;
    max-width: 62ch;
}

.rq-missrate {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--rq-border);
    font-size: 0.8125rem;
    color: var(--rq-muted);
    font-variant-numeric: tabular-nums;
}

.rq-missrate b { color: var(--rq-text); font-weight: 650; }

.rq-next { margin-top: 18px; width: 100%; }

/* ---------- result ---------- */

.rq-result { text-align: center; }

.rq-score {
    font-size: clamp(3.5rem, 14vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.rq-score span { color: var(--rq-muted); font-size: 0.4em; font-weight: 600; }

.rq-headline {
    font-size: 1.25rem;
    font-weight: 650;
    margin: 16px auto 8px;
    max-width: 26ch;
}

.rq-subline {
    color: var(--rq-muted);
    font-size: 0.9375rem;
    max-width: 46ch;
    margin: 0 auto;
}

/* comparison bars */
.rq-compare {
    margin: 28px 0 8px;
    text-align: left;
    display: grid;
    gap: 14px;
}

.rq-bar-row { display: grid; gap: 6px; }

.rq-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--rq-muted);
    font-variant-numeric: tabular-nums;
}

.rq-bar-head b { color: var(--rq-text); font-weight: 650; }

.rq-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--rq-border);
    overflow: hidden;
}

.rq-bar i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.rq-bar i[data-who="you"] { background: var(--rq-text); }
.rq-bar i[data-who="human"] { background: var(--rq-muted); }
.rq-bar i[data-who="app"] { background: var(--rq-real); }

.rq-missed {
    margin-top: 24px;
    text-align: left;
    border-top: 1px solid var(--rq-border);
    padding-top: 20px;
}

.rq-missed h3 {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rq-muted);
    margin-bottom: 12px;
    font-weight: 650;
}

.rq-missed ul { list-style: none; display: grid; gap: 10px; }

.rq-missed li {
    font-size: 0.9375rem;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--rq-ai-soft);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.rq-missed li b { font-weight: 650; }

.rq-actions {
    margin-top: 28px;
    display: grid;
    gap: 10px;
}

.rq-share-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--rq-real);
    min-height: 1.2em;
}

@media (max-width: 480px) {
    .rq-panel { padding: 24px 18px; }
    .rq-answers { gap: 10px; }
    .rq-answer { padding: 16px 8px; font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rq *, .rq *::before, .rq *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Store row under the results CTA. The results screen used to offer iOS only —
   Android visitors who had just scored 55% were shown nothing they could act on. */
.challenge-stores {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}
.challenge-stores a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #10b981;
    color: #000;
    text-decoration: none;
    transition: filter .15s ease;
}
.challenge-stores a:hover { filter: brightness(1.08); }
.challenge-stores svg { width: 21px; height: 21px; flex-shrink: 0; }
.challenge-stores span {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: #000;
}
.challenge-stores small {
    font-size: 9px;
    font-weight: 500;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .04em;
}
@media (max-width: 420px) {
    .challenge-stores { flex-direction: column; }
    .challenge-stores a { justify-content: center; }
}
