/* The vocabulary size test (#1780).
   Same family as the static onboarding (css/start.css) — the way on from a result IS that
   onboarding, and the two must read as one product — but none of its rules: the sheets stay
   independent so that a change made for the wizard cannot move a landing page nobody re-tested.
   Spends tokens.css only. */

.vt {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 16px calc(28px + var(--safe-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(var(--accent-rgb), 0.16), transparent 60%),
        var(--bg);
    color: var(--text);
}

/* ── Brand ───────────────────────────────────────────────────────── */
.vt-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.vt-brand-mark { width: 40px; height: 34px; flex: none; }

.vt-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* var(--accent), not the mark's own #e07a4e: the token darkens on the light themes, where the
   dark-theme orange reads as washed out (same choice as .ob-brand-orbit). */
.vt-brand-orbit { color: var(--accent); }

/* ── The card every view lives in ────────────────────────────────── */
.vt-view {
    width: 100%;
    max-width: 560px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vt-card {
    width: 100%;
    background: rgba(var(--on-surface-rgb), 0.045);
    border: 1px solid rgba(var(--on-surface-rgb), 0.12);
    border-radius: 24px;
    padding: 26px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.45);
}

.vt-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
}

.vt-title--small { font-size: 1.2rem; }

.vt-lead {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.45;
    text-align: center;
    color: rgba(var(--on-surface-rgb), 0.75);
}

.vt-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vt-points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.93rem;
    line-height: 1.4;
}

.vt-points li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 0.42em;
    border-radius: 50%;
    background: var(--accent);
}

/* Somebody else's result, on a shared link: the reason this visitor is here at all. */
.vt-shared {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    text-align: center;
}

.vt-shared-figure { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.vt-shared-note { font-size: 0.88rem; color: rgba(var(--on-surface-rgb), 0.75); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.vt-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    background: var(--button-bg);
    color: var(--button-text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.vt-btn:disabled { opacity: .45; cursor: not-allowed; }

.vt-btn--ghost {
    padding: 12px 16px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: rgba(var(--on-surface-rgb), 0.8);
    font-size: 0.92rem;
    font-weight: 600;
}

.vt-link {
    align-self: center;
    padding: 6px 10px;
    border: none;
    background: none;
    color: rgba(var(--on-surface-rgb), 0.7);
    font-family: inherit;
    font-size: 0.88rem;
    text-decoration: underline;
    cursor: pointer;
}

.vt-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(var(--destructive-rgb, 224, 96, 96), 0.12);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.vt-spinner {
    width: 34px;
    height: 34px;
    margin: 28px auto;
    border-radius: 50%;
    border: 3px solid rgba(var(--on-surface-rgb), 0.18);
    border-top-color: var(--accent);
    animation: vt-spin .8s linear infinite;
}

@keyframes vt-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .vt-spinner { animation-duration: 2.4s; }
    .vt-bar-fill, .vt-progress-fill { transition: none; }
}

/* ── The checklist ───────────────────────────────────────────────── */
.vt-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: rgba(var(--on-surface-rgb), 0.7);
}

.vt-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(var(--on-surface-rgb), 0.14);
    overflow: hidden;
}

.vt-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width .3s;
}

.vt-hint {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    text-align: center;
    color: rgba(var(--on-surface-rgb), 0.72);
}

/* Two columns on a phone: a third makes `straightforward` break, and a word broken in two is a
   word misread. Wider screens take three. */
.vt-words {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 520px) {
    .vt-words { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.vt-word {
    min-height: 48px;
    padding: 10px 8px;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    -webkit-tap-highlight-color: transparent;
}

.vt-word[aria-pressed="true"] {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.18);
    font-weight: 600;
}

/* The way on stays on screen: twenty-four words are taller than a phone, and a button that scrolls
   away under them is a button found only by those who scroll back for it. Opaque, because it
   floats over the words. */
.vt-actions {
    position: sticky;
    bottom: calc(10px + var(--safe-bottom, 0px));
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 8px;
    padding: 8px;
    border-radius: calc(var(--radius) + 8px);
    background: var(--bg);
    border: 1px solid rgba(var(--on-surface-rgb), 0.12);
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .5);
}

.vt-actions--single { grid-template-columns: minmax(0, 1fr); }
.vt-actions .vt-btn--ghost { padding: 15px 8px; }

/* ── The result ──────────────────────────────────────────────────── */
.vt-result-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(var(--on-surface-rgb), 0.6);
}

.vt-figure {
    margin: 0;
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-align: center;
    text-wrap: balance;
}

.vt-level {
    align-self: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.16);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.vt-note {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    text-align: center;
    color: rgba(var(--on-surface-rgb), 0.7);
}

.vt-warning {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(var(--warning-rgb), 0.14);
    border: 1px solid rgba(var(--warning-rgb), 0.4);
    font-size: 0.9rem;
    line-height: 1.45;
}

.vt-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.vt-bars { display: flex; flex-direction: column; gap: 8px; }

.vt-bar {
    display: grid;
    grid-template-columns: 2.2em minmax(0, 1fr) 3em;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
}

.vt-bar-level { font-weight: 700; }

.vt-bar-track {
    height: 10px;
    border-radius: 5px;
    background: rgba(var(--on-surface-rgb), 0.12);
    overflow: hidden;
}

.vt-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: var(--accent);
    transition: width .5s;
}

.vt-bar-value { text-align: right; color: rgba(var(--on-surface-rgb), 0.75); }

.vt-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.vt-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 0.9rem;
    line-height: 1.2;
}

.vt-chip--more { color: rgba(var(--on-surface-rgb), 0.65); }

.vt-toast {
    margin: 0;
    font-size: 0.86rem;
    text-align: center;
    color: var(--success);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.vt-footer {
    width: 100%;
    max-width: 560px;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 16px;
    font-size: 0.8rem;
    color: rgba(var(--on-surface-rgb), 0.6);
}

.vt-footer a { color: inherit; }

.vt-lang {
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
}
