
/* LN Practice */

.ln-practice-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    box-sizing: border-box;
}

.ln-practice-page *,
.ln-account-links * {
    box-sizing: border-box;
}

.ln-breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.925rem;
}

.ln-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ln-breadcrumbs a {
    text-decoration: none;
}

.ln-breadcrumbs a:hover,
.ln-breadcrumbs a:focus-visible {
    text-decoration: underline;
}

.ln-breadcrumb-separator {
    opacity: 0.55;
}

.ln-page-heading {
    margin-bottom: 1.75rem;
}

.ln-page-heading h1 {
    margin: 0 0 0.5rem;
}

.ln-page-heading p {
    margin: 0;
    line-height: 1.6;
}

.ln-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.ln-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid #e2e6ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 4%);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.ln-card:hover {
    box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
    transform: translateY(-2px);
}

.ln-card-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ln-card-title a {
    text-decoration: none;
}

.ln-card-title a:hover,
.ln-card-title a:focus-visible {
    text-decoration: underline;
}

.ln-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    font-weight: 600;
    text-decoration: none;
}

.ln-card-link:hover,
.ln-card-link:focus-visible {
    text-decoration: underline;
}

.ln-empty-state,
.ln-coming-soon,
.ln-login-notice {
    padding: 1.5rem;
    border: 1px solid #e2e6ec;
    border-radius: 12px;
    background: #fff;
}

.ln-coming-soon h2,
.ln-login-notice h2 {
    margin-top: 0;
}

.ln-coming-soon p,
.ln-login-notice p {
    line-height: 1.7;
}

.ln-login-notice {
    max-width: 650px;
}

.ln-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.ln-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border: 1px solid #2458a6;
    border-radius: 6px;
    background: #2458a6;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.ln-button:hover,
.ln-button:focus-visible {
    border-color: #183e79;
    background: #183e79;
    color: #fff;
}

.ln-button-secondary {
    border-color: #2458a6;
    background: #fff;
    color: #2458a6;
}

.ln-button-secondary:hover,
.ln-button-secondary:focus-visible {
    background: #edf3fc;
    color: #183e79;
}

.ln-account-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.ln-account-greeting {
    font-weight: 600;
}

.ln-not-found {
    min-height: 240px;
}

@media (max-width: 900px) {
    .ln-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ln-practice-page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .ln-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .ln-card {
        padding: 1.25rem;
    }

    .ln-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ln-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ln-card {
        transition: none;
    }

    .ln-card:hover {
        transform: none;
    }
}

/* LN Practice Engine */

.ln-engine-panel {
    max-width: 780px;
    padding: 1.5rem;
    border: 1px solid #e2e6ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 4%);
}

.ln-engine-status {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ln-engine-status:empty {
    display: none;
}

.ln-engine-prompt {
    margin: 0 0 1.5rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ln-engine-answer {
    margin-bottom: 1.25rem;
}

.ln-engine-input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ln-engine-answer input[type="text"] {
    display: block;
    width: 100%;
    max-width: 400px;
    min-height: 48px;
    padding: 0.75rem;
    border: 1px solid #aab3c0;
    border-radius: 6px;
    background: #fff;
    color: #202733;
    font: inherit;
}

.ln-engine-answer input:focus-visible,
.ln-engine-panel button:focus-visible {
    outline: 3px solid #7baaf0;
    outline-offset: 3px;
}

.ln-engine-choices {
    display: grid;
    gap: 0.75rem;
}

.ln-engine-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d5dbe4;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.5;
}

.ln-engine-choice:has(input:checked) {
    border-color: #2458a6;
    background: #edf3fc;
}

.ln-engine-choice input {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

.ln-engine-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ln-engine-panel button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.ln-engine-feedback {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #d5dbe4;
    border-radius: 8px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.ln-engine-feedback p:first-child {
    margin-top: 0;
}

.ln-engine-feedback p:last-child {
    margin-bottom: 0;
}

.ln-engine-feedback-correct {
    font-weight: 700;
}

.ln-engine-feedback-incorrect {
    font-weight: 700;
}

.ln-engine-explanation {
    font-weight: 400;
}

.ln-engine-progress {
    margin-top: 2rem;
}

.ln-engine-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ln-engine-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ebf0;
}

.ln-engine-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: #367b53;
    transition: width 200ms ease;
}

.ln-engine-streak {
    margin: 1rem 0 0;
}

.ln-skill-card p {
    line-height: 1.6;
}

.ln-skill-mastery {
    margin-top: auto;
    margin-bottom: 1rem;
}

.ln-skill-card .ln-button {
    margin-top: 0.25rem;
}

.ln-my-progress ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ln-my-progress li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e2e6ec;
}

.ln-progress-skill {
    font-weight: 600;
}

.ln-progress-score {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
    .ln-engine-panel {
        padding: 1rem;
    }

    .ln-engine-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ln-engine-actions .ln-button {
        width: 100%;
    }

    .ln-engine-answer input[type="text"] {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ln-engine-progress-fill {
        transition: none;
    }
}

/* 0.14.4 free sample mode */
.ln-sample-bar{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;justify-content:space-between;margin:0 0 18px;padding:12px 16px;border-radius:12px;background:#ecfdf3;border:1px solid #abefc6;color:#05603a;font-weight:700}
.ln-sample-bar a{color:#05603a;text-decoration:underline;font-weight:800}
.ln-sample-mode .ln-engine-progress{display:none}

/* 0.16.0 hidden controls stay hidden: `.ln-button{display:inline-flex}` used to override the hidden attribute, so Next showed before any answer (Visual V-3) */
.ln-button[hidden]{display:none!important}
.ln-engine-panel [hidden],
.ln-engine-panel .ln-button[hidden],
.ln-engine-panel .ln-engine-next[hidden],
.ln-engine-panel .ln-engine-submit[hidden]{display:none!important}

/* 0.16.0 answer choices are never smaller than 16px, so phones do not zoom or squint (Visual V-4) */
.ln-engine-panel .ln-engine-choice,
.ln-engine-panel .ln-engine-choice span{font-size:16px!important;line-height:1.5}
.ln-engine-panel .ln-engine-answer input[type="text"]{font-size:16px}

/* 0.15.0 read-aloud speaker buttons (language skills; browser speech). 0.16.0: every state keeps >= 3:1 icon contrast
   against its own background (Visual V-1) and has a visible loading / playing state (V-2). Colours use !important
   because themes restyle :focus/:active buttons (white-on-light after a click was 1.12:1). */
.ln-engine-say{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:2.5rem;height:2.5rem;padding:0;border:1px solid #2458a6;border-radius:999px;background:#fff!important;color:#2458a6!important;cursor:pointer;line-height:1;box-shadow:none}
.ln-engine-say:hover,.ln-engine-say:focus,.ln-engine-say:active{background:#edf3fc!important;color:#183e79!important;border-color:#183e79}
.ln-engine-panel .ln-engine-say:focus-visible,.ln-engine-say:focus-visible{outline:3px solid #183e79;outline-offset:2px}
.ln-engine-say[hidden]{display:none!important}
.ln-engine-say .ln-say-icon{display:none}
.ln-engine-say[data-state="idle"] .ln-say-icon--speaker,
.ln-engine-say:not([data-state]) .ln-say-icon--speaker{display:inline}
.ln-engine-say[data-state="loading"] .ln-say-icon--loading,
.ln-engine-say[data-state="playing"] .ln-say-icon--stop{display:inline}
.ln-engine-say[data-state="loading"]{background:#edf3fc!important;color:#183e79!important;border-style:dashed;cursor:progress}
.ln-engine-say[data-state="loading"] svg{animation:ln-say-spin 0.9s linear infinite}
.ln-engine-say[data-state="playing"],
.ln-engine-say[data-state="playing"]:hover,
.ln-engine-say[data-state="playing"]:focus,
.ln-engine-say[data-state="playing"]:active{background:#2458a6!important;color:#fff!important;border-color:#183e79}
.ln-engine-say--prompt{margin:-0.75rem 0 1.25rem}
.ln-engine-choice-row{display:flex;align-items:center;gap:0.5rem}
.ln-engine-choice-row .ln-engine-choice{flex:1 1 auto;min-width:0}
@keyframes ln-say-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ln-engine-say[data-state="loading"] svg{animation:none}}
.ln-engine-audio-note{margin:-0.5rem 0 1rem;font-size:0.9375rem;color:#4a5568}
.ln-engine-audio-note[hidden]{display:none!important}
.ln-engine-audio-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
