/*
 * Web pública de Practica Listening. Sin framework: tipografía del sistema, la paleta de listen.css (variables --ln-*)
 * y tonos pastel. Nada de franjas verticales de color en las cajas.
 */

*, *::before, *::after { box-sizing: border-box; }

.pl {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #2b2a3a;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.pl a { color: #5a48d6; text-underline-offset: 2px; }
.pl a:hover { color: #3f2fb8; }
.pl img { max-width: 100%; height: auto; }
.pl h1, .pl h2, .pl h3 { line-height: 1.25; color: #1f1d2e; letter-spacing: -.01em; }
.pl h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); margin: 0 0 .75rem; }
.pl h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 2rem 0 .75rem; }
.pl h3 { font-size: 1.15rem; margin: 1.25rem 0 .4rem; }
.pl :focus-visible { outline: 3px solid rgba(123, 104, 238, .55); outline-offset: 2px; border-radius: 4px; }

.pl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.pl-narrow { max-width: 760px; }
.pl-center { text-align: center; }

.pl-skip { position: absolute; left: -999px; top: .5rem; background: #fff; padding: .5rem 1rem; z-index: 2000; }
.pl-skip:focus { left: .5rem; }

/* --- Cabecera ------------------------------------------------------------ */

.pl-header { border-bottom: 1px solid #efeef6; background: rgba(255, 255, 255, .95); position: sticky; top: 0; z-index: 1040; backdrop-filter: blur(6px); }
.pl-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.pl-logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; color: #1f1d2e !important; text-decoration: none; }
.pl-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.pl-nav a { color: #4a4862; text-decoration: none; }
.pl-nav a:hover { color: #5a48d6; }

@media (max-width: 720px) {
    .pl-header { position: static; }
    .pl-header-row { padding-block: .5rem; }
    .pl-nav { gap: .5rem .9rem; font-size: .9rem; }
    .pl-nav a:not(.pl-btn):nth-child(1), .pl-nav a:not(.pl-btn):nth-child(2) { display: none; }
}

.pl-crumbs { font-size: .85rem; color: #6b6984; padding-top: 1rem; }
.pl-crumbs a { color: #6b6984; }

/* --- Botones -------------------------------------------------------------- */

.pl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    background: #6652e0; color: #fff !important; border: 0; border-radius: 10px;
    padding: .8rem 1.35rem; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(123, 104, 238, .28); transition: background .15s, transform .15s;
}
.pl-btn:hover { background: #5844cf; transform: translateY(-1px); }
.pl-btn-sm { padding: .45rem .9rem; font-size: .9rem; box-shadow: none; }
.pl-btn-ghost { background: #f1eefe; color: #4b3bc4 !important; box-shadow: none; }
.pl-btn-ghost:hover { background: #e6e1fd; }
.pl-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 .5rem; }
.pl-note { color: #6b6984; font-size: .92rem; }
.pl-ai-notice { color: #6b6984; font-size: .85rem; margin: 1.5rem 0 0; }
.pl-ai-notice a { color: inherit; }

/* --- Portada ------------------------------------------------------------- */

.pl-hero { background: linear-gradient(180deg, #f6f4ff 0%, #fff 100%); padding: 3rem 0 2.5rem; }
.pl-hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.pl-shot { margin: 0; justify-self: center; text-align: center; }
.pl-shot img, .pl-shot-step { display: block; max-width: 100%; height: auto; border-radius: 18px; box-shadow: 0 18px 50px rgba(60, 50, 140, .12); background: #fff; }
.pl-shot-hero img { width: 320px; }
.pl-shot figcaption { color: #6b6984; font-size: .85rem; margin-top: .6rem; }
.pl-shot-step { width: 240px; margin: 1rem auto 0; }
.pl-level-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .pl-level-links { grid-template-columns: 1fr 1fr; } }
.pl-level-links a { display: block; padding: 1.1rem 1.25rem; border-radius: 14px; background: #f6f4ff; color: inherit; text-decoration: none; }
.pl-level-links a:hover { background: #eeeafd; }
.pl-level-links strong { display: block; color: #4b3fc9; font-size: 1.1rem; }
.pl-level-links span { color: #5d5b78; font-size: .95rem; }
@media (min-width: 900px) { .pl-hero-grid { grid-template-columns: 1.15fr .85fr; } }
.pl-kicker { display: inline-block; background: #e8f8f2; color: #17795c; border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; font-weight: 600; margin: 0 0 1rem; }
.pl-lead { font-size: 1.15rem; color: #4a4862; max-width: 40em; }


.pl-section { padding: 2.5rem 0; }
.pl-section > .pl-wrap > h2:first-child { margin-top: 0; }
.pl-section-alt { background: #faf9fe; }
.pl-cta { background: #f1eefe; }

.pl-steps { list-style: none; counter-reset: paso; padding: 0; display: grid; gap: 1rem; margin: 1.25rem 0 2rem; }
@media (min-width: 760px) { .pl-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .pl-steps { grid-template-columns: repeat(4, 1fr); } }
.pl-steps li { counter-increment: paso; background: #fff; border: 1px solid #efeef6; border-radius: 14px; padding: 1.1rem 1.2rem; }
.pl-steps li::before { content: counter(paso); display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: #f1eefe; color: #5a48d6; font-weight: 700; align-items: center; justify-content: center; }
.pl-steps h3 { margin-top: .6rem; }
.pl-steps p { margin: 0; font-size: .97rem; color: #4a4862; }

.pl-cards { display: grid; gap: 1rem; }
@media (min-width: 860px) { .pl-cards { grid-template-columns: repeat(3, 1fr); } }
.pl-card { background: #fff; border-radius: 14px; padding: 1.25rem; box-shadow: 0 2px 14px rgba(40, 30, 110, .06); }
.pl-card h3 { margin-top: 0; }
.pl-card h3 a { color: #1f1d2e; text-decoration: none; }
.pl-card h3 a:hover { color: #5a48d6; }
.pl-card p { margin: 0; color: #4a4862; font-size: .97rem; }

.pl-faq { background: #fff; border: 1px solid #efeef6; border-radius: 12px; padding: .2rem 1.1rem; margin-bottom: .6rem; }
.pl-faq summary { cursor: pointer; font-weight: 600; padding: .75rem 0; }
.pl-faq p { margin: 0 0 .9rem; color: #4a4862; }

/* --- Artículos (funcionalidades, legales) -------------------------------- */

.pl-article { max-width: 780px; padding-top: 1.25rem; padding-bottom: 3rem; }
.pl-article.pl-wide { max-width: 1120px; }
.pl-article p, .pl-article li { color: #3a384f; }
.pl-article ul, .pl-article ol { padding-left: 1.3rem; }
.pl-article li { margin-bottom: .35rem; }

.pl-callout { background: #f1eefe; border-radius: 16px; padding: 1.4rem 1.5rem; margin-top: 2.5rem; }
.pl-callout p { margin-top: 0; }

.pl-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; background: #fff; }
.pl-table caption { caption-side: bottom; text-align: left; font-size: .85rem; color: #6b6984; padding-top: .5rem; }
.pl-table th, .pl-table td { padding: .55rem .7rem; border-bottom: 1px solid #efeef6; text-align: left; vertical-align: top; }
.pl-table th { background: #faf9fe; font-weight: 600; color: #4a4862; }
.pl-table-small { font-size: .88rem; }
.pl-scroll { overflow-x: auto; }

/* --- Formularios --------------------------------------------------------- */

.pl-form { max-width: 560px; }
.pl-field { margin-bottom: 1rem; }
.pl-field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.pl-field input[type=text], .pl-field input[type=email], .pl-field textarea {
    width: 100%; font: inherit; padding: .65rem .8rem; border: 1px solid #dcdae8; border-radius: 10px; background: #fff;
}
.pl-field input:focus, .pl-field textarea:focus { border-color: #7b68ee; outline: none; box-shadow: 0 0 0 3px rgba(123, 104, 238, .18); }
.pl-field [aria-invalid=true] { border-color: #f25767; }
.pl-check { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.pl-check input { margin-top: .35rem; width: 18px; height: 18px; flex: none; }
.pl-check label { font-weight: 400; flex: 1; }
.pl-check .pl-error { flex-basis: 100%; }
.pl-error { color: #c23345; font-size: .9rem; margin: .3rem 0 0; }
.pl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pl-alert { border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1rem; }
.pl-alert p { margin: 0; }
.pl-alert-ok { background: #e8f8f2; color: #17795c; }
.pl-alert-error { background: #fdecee; color: #a52a3a; }

/* --- Muestra (/probar) --------------------------------------------------- */

.pl-try { padding-top: 1rem; padding-bottom: 2rem; }
.pl-try-head { max-width: 760px; margin: 0 auto 1rem; }
.pl-try-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.pl-levels { display: flex; gap: .5rem; margin: .75rem 0; }
.pl-level { display: inline-flex; min-width: 52px; justify-content: center; padding: .35rem .8rem; border-radius: 999px; background: #f1eefe; color: #4b3bc4 !important; font-weight: 600; text-decoration: none; }
.pl-table tr.is-current { background: #f1eefc; }
.pl-level.is-current { background: #6652e0; color: #fff !important; }
.pl-try .ln-page { padding-top: 0; }
.pl-try .ln-result-title { font-size: 1.25rem; margin: 0; }
.pl-next p { margin: 0 0 .75rem; }
.pl-qhead { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; }
.pl-qhead .ln-question-text { margin: 0; }

/* --- Pie ------------------------------------------------------------------ */

.pl-footer { background: #1f1d2e; color: #c9c7dc; padding: 2.5rem 0 3rem; font-size: .95rem; margin-top: 2rem; }
.pl-footer a { color: #e3e0fb; text-decoration: none; }
.pl-footer a:hover { color: #fff; text-decoration: underline; }
.pl-footer .pl-btn { color: #fff; }
.pl-footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .pl-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; } }
.pl-footer ul { list-style: none; padding: 0; margin: 0; }
.pl-footer li { margin-bottom: .4rem; }
.pl-footer-brand { font-weight: 700; color: #fff; font-size: 1.1rem; margin-top: 0; }
.pl-footer-title { font-weight: 600; color: #fff; margin-top: 0; }

/* En la muestra, la barra fija del móvil no tapa el pie. */
@media (max-width: 991.98px) { .pl:has(.ln-dock) .pl-footer { padding-bottom: 6rem; } }

/* Ir a otro nivel de la muestra: formulario GET con un botón (ronda 3, P1-1), en línea con el texto. */
.pl-inline-form { display: inline; margin: 0; }
.pl-linkbtn { display: inline; padding: 0; border: 0; background: none; font: inherit; color: #4b3fc9; font-weight: 600; text-decoration: underline; cursor: pointer; }
.pl-p { margin: 0 0 1rem; }
button.pl-level { border: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* Tablas anchas en el móvil: se desplaza la tabla dentro de su caja, nunca la página (ronda 3, P1-2). */
.pl-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; }
.pl-table-wrap > .pl-table { margin-bottom: 0; }
.pl-table td, .pl-table th { overflow-wrap: anywhere; }
