/* Matching LabLink: el contenido de la sección «Tu oferta» de Resultados (el fondo gris
   es del contenedor, en lablink-match-results.css). Colores de los tokens de lablink-landing.css, con el valor del
   contrato de respaldo; los errores, en rojo oscuro (#A40E26). */
.tl-rv {
    --rv-ink: var(--tl-ink, #002553);
    --rv-muted: var(--tl-muted, #375478);
    --rv-card-line: var(--tl-line, #D3DEEA);
    --rv-chip-line: var(--tl-field-border, #A4B1C2);
    --rv-dash: var(--tl-field-border, #A4B1C2);
    --rv-pill: var(--tl-neutral-bg, #F1F2F4);
    --rv-ok: var(--tl-ok, #1E7A4C);
    --rv-off: var(--tl-field-border, #A4B1C2);
    --rv-track: var(--tl-line, #D3DEEA);
    --rv-faint: var(--tl-bg, #F4F6F9);
    --rv-note: var(--tl-neutral, #4A5060);
    --rv-error: #A40E26;
    display: flex; flex-direction: column; gap: 14px;
    font-family: 'Roboto', sans-serif; color: var(--rv-ink);
}
.tl-rv *, .tl-rv *::before, .tl-rv *::after { box-sizing: border-box; }
.tl-rv button { font-family: inherit; cursor: pointer; }
.tl-rv :focus-visible { outline: 2px solid var(--tl-focus, #1D5C6B); outline-offset: 2px; }
.tl-rv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* La línea gris abre el contenido: el título «Tu oferta» es de la sección de Resultados. */
.tl-rv-lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--rv-muted); }
.tl-rv-lead:focus, .tl-rv-h2:focus { outline: none; }

/* Avisos de la oferta: informan, no bloquean; en el ámbar de «Parcial». */
.tl-rv-warns { display: flex; flex-direction: column; gap: 8px; }
.tl-rv-warn { display: flex; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--tl-partial-bg, #FFF4DC); font-size: 13px; line-height: 1.45; color: var(--tl-partial, #8A5A00); }
.tl-rv-warn svg { flex: 0 0 auto; margin-top: 1px; color: var(--tl-amber, #B4690E); }
.tl-rv-warn__text { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tl-rv-warn--crit { flex: 1 0 100%; }
.tl-rv-warns[hidden], .tl-rv-warn[hidden] { display: none; }

/* Layout */
.tl-rv-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.tl-rv-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tl-rv-aside { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.tl-rv-card { background: #fff; border: 1px solid var(--rv-card-line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.tl-rv-card--muted { background: var(--rv-faint); gap: 10px; }
.tl-rv-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.tl-rv-card__tools { display: flex; align-items: center; gap: 8px; }
.tl-rv-card__intro { display: flex; flex-direction: column; gap: 4px; }
.tl-rv-card__title { display: flex; align-items: center; gap: 8px; color: var(--rv-ink); }
.tl-rv-h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--rv-ink); }
.tl-rv-h2--sm { font-size: 14px; }
.tl-rv-h2--lg { font-size: 16px; line-height: 1.3; }
.tl-rv-desc { margin: 0; font-size: 13px; line-height: 1.45; color: var(--rv-muted); }
.tl-rv-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; background: var(--rv-pill); font-size: 12px; font-weight: 500; color: var(--rv-note); }
.tl-rv-label { font-size: 12px; font-weight: 500; color: var(--rv-muted); }
.tl-rv-note { font-size: 12px; color: var(--rv-muted); }

/* Edición: Texto de tu oferta, Cargo y nivel y Contexto del cargo se ven como texto; «Editar» muestra los campos y el pie
   con «Listo». El mismo botón, rótulo y borde en las tres. */
.tl-rv-card:not(.is-editing) [data-edit-field], .tl-rv-card:not(.is-editing) [data-edit-foot] { display: none; }
.tl-rv-card.is-editing [data-edit-view], .tl-rv-card.is-editing [data-edit-open] { display: none; }
.tl-rv-edit { min-height: 34px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--rv-ink); }
.tl-rv-edit:hover { color: var(--rv-ink); text-decoration: underline; }
.tl-rv-editfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.tl-rv-done { flex: 0 0 auto; min-height: 38px; padding: 0 16px; border: 1px solid var(--rv-chip-line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--rv-ink); }
.tl-rv-done:hover { border-color: var(--rv-ink); }
.tl-rv-value { font-size: 14px; line-height: 1.4; color: var(--rv-ink); overflow-wrap: anywhere; }
.tl-rv .tl-rv-value--none { color: var(--rv-muted); }
/* .tl-rv delante: main.css quita el borde a input[type=text]. */
.tl-rv .tl-rv-control { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--rv-chip-line); border-radius: 10px; background: #fff; font-family: inherit; font-size: 14px; color: var(--rv-ink); }
.tl-rv select.tl-rv-control { padding: 0 10px; }
.tl-rv .tl-rv-control:focus { border-color: var(--rv-ink); }
.tl-rv .tl-rv-control[aria-invalid="true"] { border-color: var(--rv-error); }
.tl-rv-error { font-size: 12px; line-height: 1.45; color: var(--rv-error); }

.tl-rv-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; }
.tl-rv-field, .tl-rv-sub { display: flex; flex-direction: column; gap: 5px; }
.tl-rv-sub { gap: 8px; }
.tl-rv-why { display: flex; gap: 6px; font-size: 12px; line-height: 1.45; color: var(--rv-note); }
.tl-rv-why svg { flex: 0 0 auto; margin-top: 2px; }

.tl-rv-icon { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--rv-muted); display: flex; align-items: center; justify-content: center; }
.tl-rv-icon:hover { background: var(--rv-pill); color: var(--rv-ink); }

.tl-rv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-rv-chips--inline { display: contents; }
.tl-rv-tag { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px solid var(--rv-chip-line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--rv-ink); }

/* Criterios */
.tl-rv-crit { display: flex; align-items: center; gap: 2px; max-width: 100%; padding: 4px 2px 4px 12px; border: 1px solid var(--rv-chip-line); border-radius: 10px; background: #fff; }
.tl-rv-crit--ind { border-color: var(--rv-chip-line); }
.tl-rv-crit--ghost, .tl-rv-crit--sug { gap: 8px; padding-right: 4px; border: 1px dashed var(--rv-chip-line); background: var(--rv-faint); }
.tl-rv-crit--sug { gap: 2px; padding: 2px 2px 2px 12px; border-color: var(--rv-dash); }
.tl-rv-crit__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-right: 4px; }
.tl-rv-crit__tipo { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--rv-muted); }
.tl-rv-crit__valor { font-size: 14px; color: var(--rv-ink); padding-right: 4px; overflow-wrap: anywhere; }
.tl-rv-crit__hint { font-size: 13px; color: var(--rv-note); }
.tl-rv-badge { padding: 0 5px; border-radius: 999px; background: var(--rv-pill); font-size: 10px; color: var(--rv-muted); }
.tl-rv-move { flex: 0 0 auto; min-height: 38px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; color: var(--rv-note); text-decoration: underline; }
.tl-rv-move:hover { color: var(--rv-ink); }
.tl-rv-link { flex: 0 0 auto; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--rv-ink, var(--tl-ink, #002553)); }
.tl-rv-link:hover { color: var(--rv-ink, var(--tl-ink, #002553)); text-decoration: underline; }
.tl-rv-link--quiet { font-weight: 400; color: var(--rv-note); }
.tl-rv-link--u { min-height: 36px; padding: 0 4px; font-size: 12px; text-decoration: underline; }
.tl-rv-empty { padding: 12px; border: 1px dashed var(--rv-chip-line); border-radius: 10px; font-size: 13px; color: var(--rv-muted); }
.tl-rv-empty[hidden], .tl-rv-sugs[hidden], .tl-rv-crit[hidden], .tl-rv-adder[hidden], .tl-rv-adder__level[hidden] { display: none; }
.tl-rv-sugs { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rv-card-line); }
.tl-rv-sugs__title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--rv-ink); }
.tl-rv-sugs__title svg { flex: 0 0 auto; color: var(--rv-note); }
.tl-rv-adder { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px dashed var(--rv-chip-line); border-radius: 10px; background: var(--rv-faint); }
.tl-rv-adder__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl-rv .tl-rv-adder__input { flex: 1 1 200px; min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--rv-chip-line); border-radius: 8px; background: #fff; font-family: inherit; font-size: 14px; color: var(--rv-ink); }
.tl-rv-adder__level { flex: 0 1 150px; }
.tl-rv-undo { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.tl-rv-undo:empty { display: none; }
.tl-rv-undo__item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rv-muted); }

/* Contexto */
.tl-rv-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; }
.tl-rv-dl > div { display: flex; flex-direction: column; gap: 3px; }
.tl-rv-dl dt { font-size: 12px; font-weight: 500; color: var(--rv-muted); }
.tl-rv-dl dd { margin: 0; font-size: 14px; color: var(--rv-ink); overflow-wrap: anywhere; }
.tl-rv-ctxform { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.tl-rv-out { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tl-rv-out > div { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; line-height: 1.45; }
.tl-rv-out dt { flex: 0 0 200px; color: var(--rv-ink); font-weight: 500; }
.tl-rv-out dd { margin: 0; flex: 1 1 240px; color: var(--rv-muted); }

/* Completitud en vivo */
.tl-rv-level { gap: 14px; }
.tl-rv-level__top { display: flex; flex-direction: column; gap: 10px; }
.tl-rv-scale { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tl-rv-scale li { display: flex; flex-direction: column; gap: 6px; }
.tl-rv-scale__bar { display: block; height: 6px; border-radius: 999px; background: var(--rv-track); }
.tl-rv-scale__name { font-size: 12px; color: var(--rv-muted); }
/* Básica, buena o completa: la barra se llena en azul, sin semáforo. */
.tl-rv-level .is-filled .tl-rv-scale__bar { background: var(--tl-blue, #156194); }
.tl-rv-scale .is-current .tl-rv-scale__name { font-weight: 500; color: var(--rv-ink); }
.tl-rv-group { display: flex; flex-direction: column; gap: 2px; }
.tl-rv-group--sep { padding-top: 10px; border-top: 1px solid var(--rv-card-line); }
.tl-rv-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tl-rv-check { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; color: var(--rv-ink); }
.tl-rv-check > span { display: flex; align-items: center; gap: 8px; }
.tl-rv-check--ok svg { color: var(--rv-ok); flex: 0 0 auto; }
.tl-rv-check--miss { min-height: 34px; color: var(--rv-muted); }
.tl-rv-check--miss svg { color: var(--rv-off); flex: 0 0 auto; }
.tl-rv-check .tl-rv-link { min-height: 34px; padding: 0 6px; }
.tl-rv-check[data-crit] .tl-rv-check__ok, .tl-rv-check[data-opt] .tl-rv-check__ok, .tl-rv-check[data-min-check] .tl-rv-check__ok { display: none; }
.tl-rv-check--ok[data-crit] .tl-rv-check__ok, .tl-rv-check--ok[data-opt] .tl-rv-check__ok, .tl-rv-check--ok[data-min-check] .tl-rv-check__ok { display: flex; }
.tl-rv-check--ok[data-crit] .tl-rv-check__miss, .tl-rv-check--ok[data-opt] .tl-rv-check__miss, .tl-rv-check--ok[data-min-check] .tl-rv-check__miss { display: none; }
.tl-rv-check--ok[data-crit], .tl-rv-check--ok[data-opt], .tl-rv-check--ok[data-min-check] { justify-content: flex-start; }

/* Texto de tu oferta: primera tarjeta de la columna principal, con la letra de las bajadas de las otras. */
.tl-rv-text { gap: 8px; }
.tl-rv-text__p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--rv-muted); white-space: pre-line; overflow-wrap: anywhere; }
.tl-rv .tl-rv-text__area { min-height: 280px; padding: 10px 12px; font-size: 13px; line-height: 1.55; resize: vertical; }
/* Cinco líneas y «Ver más»: un aviso completo dejaba la tarjeta más alta que todo el bloque. */
.tl-rv-text__p[data-clamp]:not(.is-open) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.tl-rv-text__more { align-self: flex-start; }
.tl-rv-text__more[hidden] { display: none; }

/* El pie: solo el conteo de criterios. «Buscar de nuevo» (.tl-rv-search) va en la barra de cambios de Resultados. */
.tl-rv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tl-rv-search { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--rv-ink, var(--tl-ink, #002553)); font-size: 15px; font-weight: 500; color: #fff; }
.tl-rv-search:hover { background: var(--tl-hero, #172033); }
.tl-rv-foot__count { margin: 0; font-size: 13px; color: var(--rv-muted); }

@media (min-width: 768px) {
    .tl-rv-aside { position: sticky; top: 16px; }
}
@media (max-width: 767px) {
    .tl-rv-card { padding: 16px; }
    .tl-rv-out dt { flex-basis: 100%; }
    .tl-rv-search { flex: 1 1 auto; }
}
