/* ==========================================================================
   Sophicly · Gap Fill (v3.10.12)
   Light/dark via shared --sc-* tokens. Sentence-with-inline-blanks.
   ========================================================================== */

.scgf-widget {
    font-family: 'Proxima Soft', system-ui, -apple-system, sans-serif;
    max-width: 640px;
    margin: 24px auto;
    -webkit-font-smoothing: antialiased;
}

.scgf-card {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    padding: 24px;
    color: var(--sc-text);
}

.scgf-eyebrow {
    font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--sc-accent); margin-bottom: 8px;
}
.scgf-title { font-size: 19px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.scgf-intro { font-size: 14px; color: var(--sc-text-muted); margin: 0 0 16px; }

/* ── Progress ── */
.scgf-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.scgf-progress-track { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--sc-surface-2); overflow: hidden; }
.scgf-progress-bar { height: 100%; width: 0; background: var(--sc-accent); border-radius: 3px; transition: width 0.3s ease; }
.scgf-progress-txt { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--sc-text-muted); white-space: nowrap; }

/* ── One step (Typeform) ── */
.scgf-stephost { min-height: 120px; }
.scgf-step { animation: scgf-slide 0.28s ease; }
@keyframes scgf-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.scgf-sentence {
    margin: 0;
    font-size: 18px; line-height: 2.1;     /* roomy line-height so inline inputs don't crowd */
    color: var(--sc-text);
}

/* ── Results summary header ── */
.scgf-summary { text-align: center; padding: 8px 0 18px; animation: scgf-slide 0.28s ease; }
.scgf-summary-score { font-size: 34px; font-weight: 800; line-height: 1; color: var(--sc-text); }
.scgf-summary-sub { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--sc-text-muted); flex-wrap: wrap; }

/* ── Results (end-of-quiz) ── */
.scgf-results { display: flex; flex-direction: column; gap: 10px; animation: scgf-slide 0.28s ease; }

.scgf-resultfoot { display: flex; justify-content: center; margin-top: 18px; }
.scgf-again { min-width: 160px; }
.scgf-result {
    padding: 14px 16px; border-radius: 14px;
    background: var(--sc-surface-2); border: 1px solid var(--sc-border);   /* no coloured edge-strip */
}
.scgf-result .scgf-sentence { font-size: 15px; line-height: 1.9; }
/* Filled-in answer in the results: the word written on its blank line, coloured
   by correctness — no filled box, no glow. */
.scgf-blank-result {
    display: inline-block; margin: 0 3px; padding: 0 3px 1px;
    font-weight: 800;
}
.scgf-blank-result.is-correct { color: #1CD991; box-shadow: inset 0 -1.5px 0 currentColor; }
.scgf-blank-result.is-wrong { color: #ff5470; box-shadow: inset 0 -1.5px 0 currentColor; }

/* The INPUT stays a box with an underline — the filled affordance makes it
   obvious there's a field to type into. (The de-AI change was only wanted on
   the feedback/results above, not here.) */
.scgf-blank {
    display: inline-block;
    min-width: 6ch;
    margin: 0 2px;
    padding: 2px 8px;
    font: inherit; font-weight: 700;
    text-align: center;
    color: var(--sc-text);
    background: var(--sc-surface-2);
    border: 0; border-bottom: 2px solid var(--sc-accent);
    border-radius: 6px 6px 0 0;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.scgf-blank:focus { outline: none; background: color-mix(in srgb, var(--sc-accent) 12%, var(--sc-surface-2)); }

.scgf-reveal {
    display: none;
    margin-top: 10px; padding: 11px 13px;
    font-size: 13.5px; line-height: 1.55;
    color: var(--sc-text-muted);
    background: color-mix(in srgb, var(--sc-text) 5%, transparent);
    border-radius: 10px;
}
.scgf-reveal.is-on { display: block; }
.scgf-reveal::before {
    content: 'Why'; display: block;
    font-size: 10px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--sc-accent); margin-bottom: 4px;
}

.scgf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.scgf-btn {
    appearance: none; cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 600;
    padding: 9px 18px; border-radius: 10px;
    border: 1.5px solid var(--sc-border);
    background: var(--sc-surface-2); color: var(--sc-text);
    transition: transform 0.1s ease, opacity 0.12s ease;
}
.scgf-btn:hover { transform: translateY(-1px); }
.scgf-btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.scgf-btn-primary { background: var(--sc-accent); border-color: var(--sc-accent); color: #fff; }

.scgf-scorebar { font-size: 14px; font-weight: 600; margin-top: 14px; min-height: 1.2em; opacity: 0; transition: opacity 0.15s ease; }
.scgf-scorebar.is-on { opacity: 1; }

@media (max-width: 480px) {
    .scgf-card { padding: 20px 16px; }
    .scgf-sentence { font-size: 15px; }
}
