/* PP-008 · líneas documentales, orientación permanente y Cuaderno compacto */

.ten-pp-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    align-items: center;
    margin: 18px 0 12px;
    padding: 15px 18px;
    border: 1px solid var(--ten-line);
    border-left: 4px solid var(--ten-copper);
    border-radius: var(--ten-radius-sm);
    background: var(--ten-white);
}

.ten-pp-line__main {
    min-width: 0;
}

.ten-pp-line__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--ten-copper);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.ten-pp-line__title {
    display: block;
    font-family: "EB Garamond", Georgia, serif;
    font-size: 22px;
    line-height: 1.15;
}

.ten-pp-line__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ten-line);
    border-radius: 999px;
    padding: 6px 11px;
    background: var(--ten-soft-blue);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ten-pp-line__scope {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    color: var(--ten-muted);
}

.ten-pp-line--empty {
    display: none;
}

.ten-pp-orientation {
    margin: 22px 0 26px;
    padding: 22px;
    border: 1px solid var(--ten-line);
    border-left: 4px solid var(--ten-copper);
    border-radius: var(--ten-radius-sm);
    background: var(--ten-white);
    box-shadow: 0 10px 28px rgba(19, 35, 53, 0.05);
}

.ten-pp-orientation__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.ten-pp-orientation__heading h1,
.ten-pp-orientation__heading h3 {
    margin: 0;
}

.ten-pp-orientation__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.ten-pp-orientation__cell {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--ten-line);
    border-radius: 10px;
    background: var(--ten-paper);
}

.ten-pp-orientation__cell--now {
    background: var(--ten-soft-blue);
    border-left: 4px solid var(--ten-ink);
}

.ten-pp-orientation__cell strong {
    display: block;
    margin-bottom: 6px;
}

.ten-pp-orientation__cell p,
.ten-pp-orientation__cell ul {
    margin: 0;
}

.ten-pp-orientation__cell ul {
    padding-left: 20px;
}

.ten-pp-orientation__cell li + li {
    margin-top: 4px;
}

.ten-pp-orientation--compact {
    margin: 14px 0 20px;
    padding: 16px 18px;
    box-shadow: none;
}

.ten-pp-orientation--compact .ten-pp-orientation__grid {
    display: none;
}

.ten-pp-next {
    margin: 22px 0;
    padding: 26px;
    border: 1px solid var(--ten-line);
    border-radius: var(--ten-radius-sm);
    background: var(--ten-white);
}

.ten-pp-journal > h2 {
    margin-bottom: 6px;
}

.ten-pp-journal__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
}

.ten-pp-journal__metrics span,
.ten-pp-thread__status {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ten-line);
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--ten-paper);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}


.ten-pp-journal__line-list {
    padding: 0 17px 17px;
    display: grid;
    gap: 8px;
}

.ten-pp-journal__line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    padding: 11px 13px;
    border: 1px solid var(--ten-line);
    border-radius: 10px;
    background: var(--ten-paper);
}

.ten-pp-journal__line--active {
    border-left: 4px solid var(--ten-copper);
}

.ten-pp-journal__line small {
    grid-column: 1 / -1;
    color: var(--ten-muted);
}

.ten-pp-journal__line-heading {
    margin: 18px 0 8px;
    color: var(--ten-ink);
}

.ten-pp-journal__detail,
.ten-pp-thread {
    margin: 12px 0;
    border: 1px solid var(--ten-line);
    border-radius: var(--ten-radius-sm);
    background: var(--ten-white);
    overflow: hidden;
}

.ten-pp-journal__detail > summary,
.ten-pp-thread__summary {
    cursor: pointer;
    list-style: none;
    padding: 15px 17px;
    font-weight: 750;
}

.ten-pp-journal__detail > summary::-webkit-details-marker,
.ten-pp-thread__summary::-webkit-details-marker {
    display: none;
}

.ten-pp-journal__detail > summary::after {
    content: 'Mostrar';
    float: right;
    color: var(--ten-muted);
    font-size: 12px;
    font-weight: 700;
}

.ten-pp-journal__detail[open] > summary::after {
    content: 'Ocultar';
}

.ten-pp-journal__detail-body,
.ten-pp-thread__body {
    padding: 0 17px 17px;
}

.ten-pp-thread--current {
    border-left: 4px solid var(--ten-copper);
}

.ten-pp-thread__summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.ten-pp-thread__number {
    color: var(--ten-copper);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ten-pp-thread__title {
    min-width: 0;
    font-family: "EB Garamond", Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.ten-pp-thread__status--pending {
    background: var(--ten-soft-blue);
}

.ten-pp-thread__status--done {
    background: var(--ten-paper);
}

.ten-muted-copy {
    color: var(--ten-muted);
    margin-top: -4px;
}

@media (max-width: 760px) {
    .ten-pp-line {
        grid-template-columns: 1fr;
    }

    .ten-pp-line__status {
        justify-self: start;
    }

    .ten-pp-orientation__grid {
        grid-template-columns: 1fr;
    }

    .ten-pp-orientation__heading {
        flex-direction: column;
    }

    .ten-pp-orientation--compact .ten-pp-orientation__heading .ten-button {
        width: 100%;
    }

    .ten-pp-thread__summary {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .ten-pp-thread__status {
        justify-self: start;
    }
}

/* PP-008 · expediente por líneas independientes */
.ten-pp-lines__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.ten-pp-lines__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    padding: 18px;
    border: 1px solid var(--ten-line);
    border-radius: 16px;
    background: var(--ten-surface, #fff);
}

.ten-pp-lines__card--active {
    border-width: 2px;
}

.ten-pp-lines__card--closed {
    opacity: .9;
}

.ten-pp-lines__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ten-pp-lines__card-head strong {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 22px;
    line-height: 1.15;
}

.ten-pp-lines__next {
    margin: 0;
    color: var(--ten-muted);
}

.ten-pp-lines__card .ten-form-actions {
    margin-top: auto;
}

.ten-pp-lines__current {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    font-size: 13px;
    font-weight: 750;
}

@media (max-width: 760px) {
    .ten-pp-lines__grid {
        grid-template-columns: 1fr;
    }
    .ten-pp-lines__card-head {
        flex-direction: column;
    }
}


/* PP-008 · modales propios dentro del viewport, incluso fuera de .ten-app */
.ten-quick-help--pp {
    box-sizing: border-box;
    width: min(620px, 100%);
    min-width: 0;
}

@media (max-width: 520px) {
    .ten-quick-help--pp .ten-method02-diagnostic__top {
        min-width: 0;
    }

    .ten-quick-help--pp .ten-method02-diagnostic__top > * {
        min-width: 0;
    }
}

/* PP-008 RC4 · staging real: expediente por líneas y navegación inequívoca */
.ten-pp-lines {
    margin-top: 24px;
}

.ten-pp-lines__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ten-pp-lines__card {
    min-width: 0;
    min-height: 190px;
    box-shadow: 0 8px 22px rgba(19, 35, 53, 0.035);
}

.ten-pp-lines__card-head > strong {
    min-width: 0;
}

.ten-pp-lines__context {
    margin: 0;
    color: var(--ten-ink);
    font-weight: 700;
}

.ten-pp-lines__next {
    line-height: 1.5;
}

.ten-footer-nav--pp .ten-method-nav__help {
    background: transparent;
    color: var(--ten-muted);
    box-shadow: inset 0 0 0 1px var(--ten-line);
}

.ten-footer-nav--pp .ten-method-nav__help:hover,
.ten-footer-nav--pp .ten-method-nav__help:focus-visible {
    background: var(--ten-paper);
    color: var(--ten-ink);
    box-shadow: inset 0 0 0 1px var(--ten-copper);
}

.ten-footer-nav--pp button[aria-current="page"] {
    background: var(--ten-soft-blue);
    color: var(--ten-ink);
    box-shadow: inset 0 0 0 2px rgba(19, 35, 53, 0.08);
}

.ten-pp-profile-onboarding {
    border-left: 4px solid var(--ten-copper);
}

@media (max-width: 760px) {
    .ten-pp-lines__grid {
        grid-template-columns: 1fr;
    }
}


/* PP-008 RC6 · los botones secundarios no cambian a negro al pulsarlos. */
.ten-shell--pp .ten-button--secondary:active,
.ten-shell--pp .ten-button--secondary:focus,
.ten-shell--pp .ten-button--ghost:active,
.ten-shell--pp .ten-button--ghost:focus {
    background: #F5F0E8 !important;
    border-color: rgba(182, 131, 90, 0.62) !important;
    color: var(--ten-ink) !important;
    box-shadow: 0 3px 9px rgba(19, 35, 53, 0.06) !important;
    transform: translateY(0) !important;
}

/* PP-008 RC7 · respuestas institucionales complejas: resultado principal + facetas. */
.ten-pp-facets {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--ten-line);
    border-radius: 14px;
    background: var(--ten-paper);
}

.ten-pp-facets legend {
    padding: 0 6px;
    font-weight: 800;
    color: var(--ten-ink);
}

.ten-pp-facets .ten-help {
    margin: 2px 0 12px;
}

.ten-pp-facets__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ten-pp-facet {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--ten-line);
    border-radius: 10px;
    background: #fff;
    line-height: 1.4;
    cursor: pointer;
}

.ten-pp-facet input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.ten-pp-facet:has(input:checked) {
    border-color: rgba(182, 131, 90, 0.75);
    background: #F8F2EA;
}

.ten-pp-facet:has(input:disabled) {
    opacity: 0.52;
    cursor: default;
}

@media (max-width: 760px) {
    .ten-pp-facets__grid {
        grid-template-columns: 1fr;
    }
}


/* PP-008 RC23 · navegación estable de Juan Pablo: menú superior + GPS. */
.ten-shell--pp .ten-method-nav--top {
    position: static;
    bottom: auto;
    z-index: auto;
    box-shadow: none;
}

@media (max-width: 820px) {
    .ten-shell--pp .ten-method-nav--top {
        position: static;
        bottom: auto;
        padding-bottom: 14px;
        box-shadow: none;
    }
}
