body {
    padding-top: 5rem; /* 80px aprox */
}

.navbar {
    transform: translateY(0) !important;
}

.navbar.navbar--hidden {
    transform: translateY(0) !important;
}

/* #region ---------- Sección principal ------------------------ */
.tc-section {
    padding: 60px 0 80px;
    background-color: var(--color-light-gray);
}

.tc-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    position: relative;
}

.tc-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    border-radius: 3px;
    background: var(--gradient-bar);
}

.tc-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--color-secondary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.tc-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tc-updated {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
}

.tc-updated span {
    color: var(--color-primary);
    font-weight: 600;
}
/* #endregion */

/* #region ---------- Intro (párrafo destacado) ---------------- */
.tc-intro {
    background: var(--color-white);
    border-left: 4px solid var(--color-accent);
    border-radius: 12px;
    padding: 22px 26px;
    margin: 0 auto 45px;
    max-width: 900px;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    color: var(--color-text-soft);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
}

.tc-intro::before {
    content: "\201C";
    position: absolute;
    top: -12px;
    left: 18px;
    font-family: Georgia, serif;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--color-accent);
    opacity: 0.35;
    pointer-events: none;
}

.tc-intro strong {
    color: var(--color-secondary);
}
/* #endregion */

/* #region ---------- Layout (índice + contenido) -------------- */
.tc-section .container {
    max-width: 1140px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

.tc-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 2rem;
}

.tc-layout > * {
    min-width: 0;
}

.tc-toc-wrapper {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    flex: 0 0 auto;
    width: 100%;
    max-width: 25%;
    z-index: 1;
}

.tc-content {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
}
/* #endregion */

/* #region ---------- Índice (TOC) ----------------------------- */
.tc-toc {
    background: var(--color-white);
    border-radius: 12px;
    padding: 22px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--color-primary);

    max-height: calc(100vh - 140px);
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-light) transparent;
}

.tc-toc::-webkit-scrollbar {
    width: 6px;
}

.tc-toc::-webkit-scrollbar-track {
    background: transparent;
}

.tc-toc::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 10px;
}

.tc-toc-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-light-gray);
    position: relative;
}

.tc-toc-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-bar);
}

.tc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tc-toc li {
    margin-bottom: 6px;
}

.tc-toc li:last-child {
    margin-bottom: 0;
}

.tc-toc a {
    display: block;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
    line-height: 1.4;
}

.tc-toc a:hover {
    color: var(--color-primary);
    background: rgba(67, 85, 240, 0.06);
    border-left-color: var(--color-primary);
    padding-left: 16px;
}

.tc-toc a.active {
    color: var(--color-white);
    background: var(--gradient-primary);
    border-left-color: var(--color-accent);
    font-weight: 600;
    box-shadow: var(--shadow-primary-soft);
}
/* #endregion */

/* #region ---------- Artículos -------------------------------- */
.tc-article {
    background: var(--color-white);
    border-radius: 12px;
    padding: 30px 35px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    scroll-margin-top: 100px;
    transition: box-shadow 0.3s ease;
    border-left: 4px solid transparent;
}

.tc-article:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.10);
    border-left-color: var(--color-accent);
}

.tc-article h2 {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    position: relative;
    line-height: 1.3;
}

.tc-article h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    border-radius: 2px;
    background: var(--gradient-bar);
}

.tc-article h3 {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 22px;
    margin-bottom: 10px;
}

.tc-article p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.tc-article p:last-child {
    margin-bottom: 0;
}

.tc-article strong {
    color: var(--color-secondary);
    font-weight: 700;
}

/* Listas */
.tc-article ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 14px;
}

.tc-article ul li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.tc-article ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    box-shadow: 0 0 0 3px rgba(67, 85, 240, 0.12);
}

/* Sublistas */
.tc-article ul ul {
    margin-top: 10px;
    margin-bottom: 0;
}

.tc-article ul ul li {
    padding-left: 24px;
    font-size: 0.9rem;
}

.tc-article ul ul li::before {
    width: 6px;
    height: 6px;
    top: 11px;
    background: var(--color-accent);
    box-shadow: none;
}

/* Enlaces */
.tc-article a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--color-primary);
    transition: all 0.2s ease;
}

.tc-article a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    border-bottom-style: solid;
}

/* Placeholders [completar] */
.tc-article span[id^="pp-"] {
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(67, 85, 240, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
/* #endregion */

/* #region ---------- Código inline (tokens de MP) ------------- */
.tc-article code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--color-secondary);
    background: rgba(67, 85, 240, 0.08);
    border: 1px solid rgba(67, 85, 240, 0.15);
    padding: 2px 8px;
    border-radius: 5px;
    white-space: nowrap;
}
/* #endregion */

/* #region ---------- Responsive ------------------------------- */
@media (max-width: 992px) {
    .tc-section {
        padding: 40px 0 60px;
    }

    .tc-header {
        margin-bottom: 25px;
    }

    .tc-intro {
        padding: 18px 20px;
        margin-bottom: 35px;
    }

    .tc-intro::before {
        font-size: 2.8rem;
        top: -8px;
        left: 14px;
    }

    .tc-toc-wrapper {
        position: static;
        max-width: 100%;
        width: 100%;
        margin-bottom: 30px;
    }

    .tc-toc {
        max-height: none;
        overflow-y: visible;
    }

    .tc-layout {
        row-gap: 0;
    }
}

@media (max-width: 650px) {
    .tc-draft-alert {
        font-size: 0.82rem;
        padding: 12px 14px;
    }

    .tc-section {
        padding: 30px 0 50px;
    }

    .tc-header h1 {
        font-size: 1.6rem;
    }

    .tc-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }

    .tc-intro {
        font-size: 0.9rem;
        padding: 16px 18px;
        border-left-width: 3px;
    }

    .tc-article {
        padding: 22px 20px;
        border-radius: 10px;
        margin-bottom: 18px;
    }

    .tc-article h2 {
        font-size: 1.1rem;
    }

    .tc-article h3 {
        font-size: 1rem;
    }

    .tc-article p,
    .tc-article ul li {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .tc-toc {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .tc-toc a {
        font-size: 0.8rem;
        padding: 7px 10px;
    }
}
/* #endregion */

/* #region ---------- Modo impresión --------------------------- */
@media print {
    .navbar,
    #copyright,
    .tc-draft-alert,
    .tc-toc-wrapper {
        display: none !important;
    }

    .tc-section {
        padding: 0;
        background: white;
    }

    .tc-intro {
        box-shadow: none;
        border: 1px solid var(--color-border-soft);
        background: white;
    }

    .tc-article {
        box-shadow: none;
        border: 1px solid var(--color-border-soft);
        page-break-inside: avoid;
        margin-bottom: 15px;
    }

    .tc-article h2,
    .tc-header h1 {
        color: var(--color-black);
    }

    .tc-article code {
        background: #f5f5f5;
        border-color: #ddd;
    }
}
/* #endregion */