/**
 * Ficha de ley (/teoria/{slug})
 */

.tly-page {
    padding-bottom: 3rem;
}

.tly-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.tly-breadcrumb a {
    color: #cbd5e1;
    text-decoration: none;
}

.tly-breadcrumb a:hover {
    color: #fff;
}

.tly-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.tly-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
}

.tly-badge-accent {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(147, 197, 253, 0.35);
    color: #bfdbfe;
}

.tly-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #cbd5e1;
}

.tly-hero-meta a {
    color: #93c5fd;
    text-decoration: none;
}

.tly-hero-meta a:hover {
    color: #fff;
}

.tly-body {
    padding: 2.5rem 0 1rem;
    background: #f8fafc;
}

.tly-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.tly-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tly-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
}

.tly-index-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tly-index-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    min-width: 220px;
}

.tly-index-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    min-width: 160px;
}

.tly-index-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 12px;
}

.tly-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
}

.tly-index-list li {
    border-top: 1px solid #f1f5f9;
}

.tly-index-list li:first-child {
    border-top: none;
}

.tly-index-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
}

.tly-index-list a:hover {
    background: #f8fafc;
    color: #2563eb;
}

.tly-index-type {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}

.tly-index-empty {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.tly-block h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px;
}

.tly-block p {
    color: #475569;
    line-height: 1.65;
    margin: 0;
}

.tly-steps {
    margin: 12px 0 0;
    padding-left: 1.2rem;
    color: #475569;
    line-height: 1.65;
}

.tly-steps li {
    margin-bottom: 8px;
}

.tly-faq-item {
    border-top: 1px solid #e2e8f0;
    padding: 12px 0;
}

.tly-faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.tly-faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    list-style: none;
}

.tly-faq-item summary::-webkit-details-marker {
    display: none;
}

.tly-faq-item p {
    margin-top: 10px;
    font-size: 0.92rem;
}

.tly-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 88px;
}

.tly-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
}

.tly-panel h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
}

.tly-panel p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.5;
}

.tly-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 8px;
}

.tly-btn:last-child {
    margin-bottom: 0;
}

.tly-btn-primary {
    background: #2563eb;
    color: #fff;
}

.tly-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.tly-btn-outline {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.tly-btn-outline:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.tly-related,
.tly-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tly-related li,
.tly-links li {
    border-top: 1px solid #f1f5f9;
}

.tly-related li:first-child,
.tly-links li:first-child {
    border-top: none;
}

.tly-related a,
.tly-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
}

.tly-related a:hover,
.tly-links a:hover {
    color: #2563eb;
}

.tly-related span {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

@media (max-width: 991px) {
    .tly-layout {
        grid-template-columns: 1fr;
    }

    .tly-aside {
        position: static;
    }
}
