/* The CEFR text checker (#2350) — on top of vocab-test.css, whose .vt-* card, button, bar and chip
   styles the page shares. Only what the checker adds lives here: the text box, the word list, the
   grammar cards and the sentence figures. Colours come from the design tokens only. */

.tl-text {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(var(--on-surface-rgb), 0.18);
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.tl-text:focus {
    outline: 2px solid rgba(var(--accent-rgb), 0.6);
    outline-offset: 1px;
}

.tl-counter {
    margin: -8px 0 0;
    text-align: right;
    font-size: 0.82rem;
    color: rgba(var(--on-surface-rgb), 0.6);
}

.tl-ask { display: flex; flex-direction: column; gap: 10px; }

/* A door that opens another site is a link styled as the page's buttons. */
a.vt-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

.tl-waiting {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(var(--on-surface-rgb), 0.75);
}

.tl-waiting .vt-spinner { margin: 0; width: 22px; height: 22px; }

.tl-private { margin: 0; font-size: 0.85rem; }

.tl-result .vt-figure { letter-spacing: 0.02em; }

.tl-bar--level .vt-bar-level { color: var(--accent); font-weight: 700; }

.tl-cover-line { margin: 0; }

.tl-words {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.tl-word {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.tl-word-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.tl-word-text { font-weight: 600; overflow-wrap: anywhere; }

.tl-word-gloss {
    font-size: 0.86rem;
    color: rgba(var(--on-surface-rgb), 0.72);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-word-count { font-size: 0.8rem; color: rgba(var(--on-surface-rgb), 0.6); }

.tl-badge {
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

.tl-unknown-title { margin-bottom: -6px; }

.tl-grammar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--on-surface-rgb), 0.1);
}

.tl-grammar:first-of-type { border-top: 0; padding-top: 0; }

.tl-grammar-title { font-weight: 600; }

.tl-example {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(var(--on-surface-rgb), 0.8);
    overflow-wrap: anywhere;
}

.tl-example mark {
    background: rgba(var(--accent-rgb), 0.22);
    color: inherit;
    border-radius: 4px;
    padding: 0 2px;
}

.tl-stats {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tl-stat { display: flex; flex-direction: column-reverse; gap: 2px; }

.tl-stat dt { font-size: 0.8rem; color: rgba(var(--on-surface-rgb), 0.65); }

.tl-stat dd { margin: 0; font-size: 1.4rem; font-weight: 700; }

@media (max-width: 420px) {
    .tl-stats { grid-template-columns: 1fr; }
    .tl-stat { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; }
}
