/* =========================================================================
   Academia Utility — centro de tutoriales.
   Mismo lenguaje visual que la landing: fondo claro, tarjetas blancas
   redondeadas, sombras suaves, botones pill y acento azul --primary.
   ========================================================================= */

.tt {
    --tt-ink: var(--ink, #0F1B2D);
    --tt-muted: var(--muted, #64748B);
    --tt-primary: var(--primary, #2185D0);
    --tt-green: #10B981;
    --tt-surface: #fff;
    --tt-border: #E1E7EF;
    --tt-border-light: #EDF1F6;
    --tt-soft: #F5F8FC;
    --tt-shadow: 0 20px 60px rgba(16, 42, 67, .07);
    --tt-shadow-hover: 0 26px 70px rgba(16, 42, 67, .12);
    --tt-radius: 22px;
}

.tt * { box-sizing: border-box; }
.tt-wrap { width: min(1240px, 100%); margin: 0 auto; }

/* =========================================================================
   Hero: banda de marca (patrón LMS) + buscador
   ========================================================================= */
.tt-hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: clamp(34px, 4.6vw, 62px) clamp(26px, 4vw, 58px) clamp(58px, 6vw, 84px);
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(16, 185, 129, .28), transparent 62%),
        linear-gradient(135deg, #1B6FB0 0%, #2185D0 45%, #1A5C97 100%);
    color: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin-top: 6px;
}

.tt-hero::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -140px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 44px solid rgba(255, 255, 255, .07);
    pointer-events: none;
}

.tt-hero > * { position: relative; z-index: 1; }

.tt-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(226, 240, 252, .85);
}

.tt-eyebrow::before {
    content: '';
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--tt-green);
}

.tt-hero h1 {
    margin: 18px 0 14px;
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -.025em;
    color: #fff;
    max-width: 16ch;
}

.tt-hero h1 .tt-accent { color: #6EE7B7; }

.tt-hero > div > p {
    margin: 0;
    max-width: 48ch;
    color: rgba(226, 240, 252, .82);
    font-size: 1.06rem;
    line-height: 1.6;
}

/* Tarjeta flotante del hero */
.tt-hero-card {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tt-hero-card-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(226, 240, 252, .7);
}

.tt-hero-card h3 {
    margin: 10px 0 14px;
    font-family: var(--font-heading), sans-serif;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: #fff;
}

.tt-hero-card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: rgba(226, 240, 252, .75); margin-bottom: 16px; }
.tt-hero-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tt-hero-card-meta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.tt-hero-card .tt-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: #fff;
    color: #12507F;
    font-weight: 700;
    font-size: .93rem;
    transition: transform .16s ease;
}
.tt-hero-card .tt-btn-light:hover { transform: translateY(-1px); }
.tt-hero-card .tt-btn-light svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== Buscador ===== */
.tt-search { position: relative; max-width: 560px; margin: 26px 0 0; text-align: left; }

.tt-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 8px 7px 20px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    box-shadow: 0 20px 44px rgba(6, 32, 56, .26);
}

.tt-search-box svg { width: 20px; height: 20px; flex: none; stroke: var(--tt-muted); fill: none; stroke-width: 2; }

.tt-search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: .99rem;
    color: var(--tt-ink);
    padding: 12px 0;
}

.tt-search-go {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: var(--tt-primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: .89rem;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .16s ease;
}
.tt-search-go:hover { background: #1B76BA; }
.tt-search-go svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.tt-kbd {
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--tt-border);
    background: var(--tt-soft);
    color: var(--tt-muted);
    font-size: .74rem;
    font-weight: 700;
}

.tt-search.is-plain { margin: 0; max-width: none; }
.tt-search.is-plain .tt-search-box { box-shadow: none; border-radius: 14px; padding: 4px 6px 4px 16px; border-color: var(--tt-border); }
.tt-search.is-plain .tt-search-box input { padding: 11px 0; font-size: .92rem; }
.tt-search.is-plain .tt-search-go { padding: 9px 14px; font-size: .84rem; }
.tt-search.is-plain .tt-search-go span { display: none; }

/* ===== Barra de métricas (misma tarjeta que la landing) ===== */
.tt-stats {
    background: var(--tt-surface);
    border: 1px solid var(--tt-border-light);
    border-radius: 24px;
    box-shadow: var(--tt-shadow);
    padding: clamp(22px, 3vw, 32px) clamp(20px, 4vw, 48px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 3vw, 36px);
    text-align: center;
    margin: -42px auto 0;
    width: min(100%, 1080px);
    position: relative;
    z-index: 2;
}

.tt-stats > div + div { border-left: 1px solid var(--tt-border-light); }

.tt-stat-value {
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--tt-primary);
    font-variant-numeric: tabular-nums;
}

.tt-stat-label { margin-top: 6px; font-size: .92rem; color: var(--tt-muted); }

/* =========================================================================
   Filtros por producto
   ========================================================================= */
.tt-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: clamp(34px, 5vw, 54px) 0 clamp(22px, 3vw, 32px);
}

.tt-filter {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 11px 22px 11px 13px;
    border-radius: 999px;
    border: 1px solid var(--tt-border);
    background: var(--tt-surface);
    font: inherit;
    font-weight: 600;
    font-size: .96rem;
    color: var(--tt-ink);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tt-filter:hover { transform: translateY(-1px); border-color: #C6D2E0; }

.tt-filter.is-active {
    border-color: var(--tt-primary);
    box-shadow: 0 10px 26px -6px rgba(33, 133, 208, .35);
}

.tt-filter-dot {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
    background: linear-gradient(140deg, #2E9BEA, #1B6FB0);
}

.tt-filter[data-tt-tab="lite"] .tt-filter-dot { background: linear-gradient(140deg, #34D399, #059669); }
.tt-filter[data-tt-tab="erp"] .tt-filter-dot { background: linear-gradient(140deg, #A78BFA, #6D3FD4); }

.tt-filter-count {
    font-size: .8rem;
    font-weight: 700;
    color: var(--tt-muted);
    background: var(--tt-soft);
    border-radius: 999px;
    padding: 2px 9px;
}

.tt-filter.is-active .tt-filter-count { background: rgba(33, 133, 208, .1); color: var(--tt-primary); }

/* =========================================================================
   Módulos (tarjeta de curso + currículo)
   ========================================================================= */
.tt-panel { display: none; }
.tt-panel.is-active { display: block; }

.tt-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.tt-panel-head h2 {
    margin: 0;
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    letter-spacing: -.02em;
}

.tt-panel-head p { margin: 6px 0 0; color: var(--tt-muted); font-size: 1rem; }

.tt-resume {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--tt-primary);
    color: #fff;
    font-size: .93rem;
    font-weight: 600;
    box-shadow: 0 8px 16px -2px rgba(33, 133, 208, .24);
    transition: transform .16s ease;
}
.tt-resume:hover { transform: translateY(-1px); }
.tt-resume[hidden] { display: none; }
.tt-resume svg { width: 16px; height: 16px; fill: currentColor; }

.tt-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Un solo modulo no debe quedar en media columna huerfana. */
.tt-modules:has(> .tt-module:only-child) { grid-template-columns: minmax(0, 1fr); }
.tt-modules:has(> .tt-module:only-child) .tt-module-cover { aspect-ratio: 32 / 9; }

.tt-module {
    background: var(--tt-surface);
    border: 1px solid var(--tt-border-light);
    border-radius: var(--tt-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .22s ease, transform .22s ease;
}

.tt-module:hover { box-shadow: var(--tt-shadow-hover); transform: translateY(-2px); }

.tt-module-cover {
    position: relative;
    aspect-ratio: 21 / 9;
    background: linear-gradient(135deg, #13263E 0%, #1E5C93 100%);
    overflow: hidden;
}

.tt-module-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }

.tt-module-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 20, 35, .82), rgba(7, 20, 35, .1));
}

.tt-module-cover-body {
    position: absolute;
    inset: auto 0 0;
    padding: 18px 22px;
    z-index: 1;
    color: #fff;
}

.tt-module-num {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
    margin-bottom: 6px;
}

.tt-module-cover-body h3 {
    margin: 0;
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -.015em;
    line-height: 1.2;
}

.tt-level {
    position: absolute;
    top: 16px;
    left: 18px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .93);
    color: var(--tt-ink);
    font-size: .76rem;
    font-weight: 700;
}

.tt-module-body { padding: 20px 22px 0; }
.tt-module-body > p { margin: 0 0 16px; color: var(--tt-muted); font-size: .97rem; line-height: 1.6; }

.tt-module-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: .88rem;
    color: var(--tt-muted);
    margin-bottom: 14px;
}

.tt-module-meta span { display: inline-flex; align-items: center; gap: 7px; }
.tt-module-meta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.tt-bar { position: relative; height: 6px; border-radius: 999px; background: var(--tt-border-light); overflow: hidden; }
.tt-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--tt-primary), var(--tt-green)); transition: width .4s ease; }

.tt-module-progress { display: flex; align-items: center; gap: 12px; }
.tt-module-progress .tt-bar { flex: 1; }
.tt-module-progress b { font-size: .8rem; font-weight: 700; color: var(--tt-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== Currículo ===== */
.tt-lessons { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--tt-border-light); }

.tt-lesson {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 22px;
    border-bottom: 1px solid var(--tt-border-light);
    transition: background .16s ease;
}

.tt-lesson:last-child { border-bottom: 0; }
.tt-lesson:hover { background: var(--tt-soft); }
.tt-lesson.is-hidden { display: none; }

.tt-lesson-state {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(33, 133, 208, .08);
    border: 1px solid rgba(33, 133, 208, .16);
    color: var(--tt-primary);
    font-size: .78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tt-lesson-state svg { width: 14px; height: 14px; display: none; stroke: currentColor; fill: none; stroke-width: 3; }
.tt-lesson.is-seen .tt-lesson-state { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .26); color: var(--tt-green); }
.tt-lesson.is-seen .tt-lesson-state span { display: none; }
.tt-lesson.is-seen .tt-lesson-state svg { display: block; }

.tt-lesson-body { flex: 1; min-width: 0; }
.tt-lesson-title { display: block; font-size: .99rem; font-weight: 600; letter-spacing: -.005em; }
.tt-lesson-sub { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 3px; font-size: .83rem; color: var(--tt-muted); }
.tt-lesson-sub span { display: inline-flex; align-items: center; gap: 5px; }
.tt-lesson-sub svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

.tt-lesson-go {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--tt-soft);
    color: var(--tt-ink);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.tt-lesson:hover .tt-lesson-go { background: var(--tt-primary); color: #fff; transform: scale(1.06); }
.tt-lesson-go svg { width: 15px; height: 15px; fill: currentColor; margin-left: 2px; }

.tt-module-foot {
    margin-top: auto;
    padding: 16px 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 24px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: .93rem;
    cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.tt-btn:hover { transform: translateY(-1px); }
.tt-btn-primary { background: var(--tt-primary); color: #fff; box-shadow: 0 8px 16px -2px rgba(33, 133, 208, .24); }
.tt-btn-primary:hover { background: #1B76BA; }
.tt-btn svg { width: 16px; height: 16px; fill: currentColor; }

.tt-more {
    background: none;
    border: 0;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--tt-primary);
    cursor: pointer;
    padding: 6px 0;
}

.tt-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--tt-muted);
    border: 1px dashed var(--tt-border);
    border-radius: var(--tt-radius);
    background: var(--tt-surface);
    grid-column: 1 / -1;
}
.tt-empty strong { display: block; color: var(--tt-ink); font-size: 1.05rem; margin-bottom: 6px; }

/* =========================================================================
   Detalle de la lección
   ========================================================================= */
.tt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 26px;
    align-items: start;
    padding-top: 8px;
}

.tt-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--tt-muted);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.tt-breadcrumb a:hover { color: var(--tt-primary); }

.tt-player {
    position: relative;
    background: #05101D;
    border-radius: var(--tt-radius);
    overflow: hidden;
    box-shadow: var(--tt-shadow);
    aspect-ratio: 16 / 9;
    user-select: none;
}

.tt-player.is-theater { border-radius: 0; }
.tt-player video { width: 100%; height: 100%; display: block; background: #05101D; object-fit: contain; }

.tt-player-overlay { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }

.tt-bigplay {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .95);
    color: var(--tt-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 18px 44px rgba(6, 20, 36, .4);
    transition: transform .18s ease;
}
.tt-bigplay:hover { transform: scale(1.06); }
.tt-bigplay svg { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
.tt-player.is-playing .tt-player-overlay { opacity: 0; pointer-events: none; }

.tt-spinner { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; }
.tt-player.is-loading .tt-spinner { display: grid; }
.tt-spinner span {
    width: 44px; height: 44px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
    animation: tt-spin .8s linear infinite;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }

.tt-toast {
    position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
    background: rgba(5, 16, 29, .86); color: #fff; font-size: .82rem; font-weight: 600;
    padding: 7px 15px; border-radius: 999px; opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.tt-toast.is-visible { opacity: 1; }

.tt-controls {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 44px 14px 12px;
    background: linear-gradient(to top, rgba(3, 11, 20, .93), rgba(3, 11, 20, .5) 55%, transparent);
    color: #fff; transition: opacity .22s ease;
}

.tt-player.is-playing.is-idle .tt-controls { opacity: 0; }
.tt-player.is-playing.is-idle { cursor: none; }

.tt-progress { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }

.tt-progress-rail {
    position: relative; width: 100%; height: 5px; border-radius: 999px;
    background: rgba(255, 255, 255, .26); overflow: hidden; transition: height .14s ease;
}
.tt-progress:hover .tt-progress-rail { height: 8px; }

.tt-progress-buffer, .tt-progress-played { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.tt-progress-buffer { background: rgba(255, 255, 255, .3); width: 0; }
.tt-progress-played { background: var(--tt-primary); width: 0; }

.tt-progress-marks { position: absolute; inset: 0; pointer-events: none; }
.tt-progress-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .9); transform: translateX(-1px); }

.tt-progress-knob {
    position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff;
    transform: translate(-50%, -50%) scale(0); transition: transform .14s ease; pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.tt-progress:hover .tt-progress-knob { transform: translate(-50%, -50%) scale(1); }

.tt-progress-tip {
    position: absolute; bottom: 26px; transform: translateX(-50%);
    background: rgba(5, 16, 29, .95); color: #fff; font-size: .76rem; font-weight: 600;
    padding: 6px 10px; border-radius: 9px; white-space: nowrap; display: none; pointer-events: none;
    max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
.tt-progress:hover .tt-progress-tip { display: block; }

.tt-controls-row { display: flex; align-items: center; gap: 5px; margin-top: 2px; }

.tt-cbtn {
    border: 0; background: transparent; color: #fff; width: 37px; height: 37px;
    display: grid; place-items: center; border-radius: 10px; cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.tt-cbtn:hover { background: rgba(255, 255, 255, .16); }
.tt-cbtn:active { transform: scale(.94); }
.tt-cbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-cbtn.is-fill svg { fill: currentColor; stroke: none; }
.tt-cbtn[hidden] { display: none; }
.tt-cbtn.is-on { color: #7CC4F5; }

.tt-time { font-size: .81rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .9); padding: 0 6px; white-space: nowrap; }
.tt-chapter-label { font-size: .81rem; color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; padding-left: 6px; }

.tt-volume { display: flex; align-items: center; }
.tt-volume input[type="range"] { width: 0; opacity: 0; transition: width .2s ease, opacity .2s ease; accent-color: #fff; cursor: pointer; }
.tt-volume:hover input[type="range"], .tt-volume input[type="range"]:focus { width: 82px; opacity: 1; margin: 0 6px; }

.tt-menu-wrap { position: relative; }
.tt-menu {
    position: absolute; right: 0; bottom: 46px; background: rgba(9, 20, 33, .97);
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 6px; min-width: 190px;
    display: none; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.tt-menu.is-open { display: block; }
.tt-menu-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .5); padding: 6px 10px 4px; font-weight: 700; }
.tt-menu button {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    border: 0; background: transparent; color: #fff; font: inherit; font-size: .87rem;
    padding: 9px 11px; border-radius: 10px; cursor: pointer; text-align: left;
}
.tt-menu button:hover { background: rgba(255, 255, 255, .12); }
.tt-menu button.is-active { color: #7CC4F5; font-weight: 700; }

/* ===== Ficha de la lección ===== */
.tt-lesson-head {
    background: var(--tt-surface);
    border: 1px solid var(--tt-border-light);
    border-radius: var(--tt-radius);
    box-shadow: var(--tt-shadow);
    padding: 24px 26px;
    margin-top: 18px;
}

.tt-lesson-head h1 {
    margin: 0 0 14px;
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 2.6vw, 33px);
    line-height: 1.2;
    letter-spacing: -.02em;
}

.tt-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tt-meta-facts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tt-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 600; padding: 6px 14px; border-radius: 999px;
    background: rgba(33, 133, 208, .08); border: 1px solid rgba(33, 133, 208, .18); color: var(--tt-primary);
}

.tt-meta-sep { color: var(--tt-border); }
.tt-meta-item { font-size: .89rem; color: var(--tt-muted); display: inline-flex; align-items: center; gap: 6px; }

.tt-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tt-abtn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--tt-border); background: var(--tt-surface); color: var(--tt-ink);
    font: inherit; font-size: .9rem; font-weight: 600; padding: 11px 20px; border-radius: 999px;
    cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.tt-abtn:hover { border-color: #C6D2E0; transform: translateY(-1px); }
.tt-abtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-abtn.is-primary { background: var(--tt-primary); border-color: var(--tt-primary); color: #fff; box-shadow: 0 8px 16px -2px rgba(33, 133, 208, .24); }
.tt-abtn.is-primary:hover { background: #1B76BA; }

/* Tabs del contenido */
.tt-tabs { display: flex; gap: 4px; margin: 22px 0 0; border-bottom: 1px solid var(--tt-border-light); flex-wrap: wrap; }

.tt-tab {
    border: 0; background: none; font: inherit; font-weight: 600; font-size: .96rem;
    color: var(--tt-muted); padding: 13px 20px; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .16s ease, border-color .16s ease;
}
.tt-tab:hover { color: var(--tt-ink); }
.tt-tab.is-active { color: var(--tt-primary); border-bottom-color: var(--tt-primary); }

.tt-tabpanel { display: none; padding: 22px 2px 0; }
.tt-tabpanel.is-active { display: block; }

.tt-description { color: #33455C; font-size: 1rem; line-height: 1.75; white-space: pre-line; }

/* Capítulos como timeline */
.tt-chapters { position: relative; }
.tt-chapters::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--tt-border-light);
}

.tt-chapter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    color: inherit;
    padding: 11px 14px 11px 0;
    cursor: pointer;
    border-radius: 14px;
    transition: background .15s ease;
}
.tt-chapter:hover { background: var(--tt-soft); }

.tt-chapter-dot {
    position: relative;
    z-index: 1;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tt-surface);
    border: 2px solid var(--tt-border);
    display: grid;
    place-items: center;
    color: var(--tt-muted);
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.tt-chapter-dot svg { width: 12px; height: 12px; fill: currentColor; margin-left: 2px; }
.tt-chapter:hover .tt-chapter-dot { border-color: var(--tt-primary); color: var(--tt-primary); }
.tt-chapter.is-current .tt-chapter-dot { border-color: var(--tt-primary); background: var(--tt-primary); color: #fff; }
.tt-chapter.is-current .tt-chapter-title { color: var(--tt-primary); font-weight: 700; }

.tt-chapter-body { flex: 1; min-width: 0; }
.tt-chapter-title { font-size: .98rem; font-weight: 600; }
.tt-chapter-keys { display: block; font-size: .84rem; color: var(--tt-muted); margin-top: 2px; }

.tt-chapter-time {
    flex: none; font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 700;
    color: var(--tt-primary); background: rgba(33, 133, 208, .08); border-radius: 999px; padding: 5px 12px;
}

.tt-shortcuts { font-size: .9rem; color: var(--tt-muted); line-height: 2.15; }
.tt-shortcuts b {
    display: inline-block; min-width: 30px; text-align: center; color: var(--tt-ink);
    background: var(--tt-soft); border: 1px solid var(--tt-border); border-radius: 7px;
    padding: 1px 7px; font-size: .78rem; margin-right: 6px;
}

/* ===== Barra lateral ===== */
.tt-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }

.tt-side-card {
    background: var(--tt-surface);
    border: 1px solid var(--tt-border-light);
    border-radius: var(--tt-radius);
    box-shadow: var(--tt-shadow);
    overflow: hidden;
}

.tt-side-pad { padding: 16px; }

.tt-side-head { padding: 20px 22px 18px; border-bottom: 1px solid var(--tt-border-light); }
.tt-side-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tt-side-head h2 { margin: 0; font-size: 1.05rem; font-family: var(--font-heading), sans-serif; font-weight: 700; letter-spacing: -.01em; }
.tt-side-head p { margin: 4px 0 0; font-size: .85rem; color: var(--tt-muted); }

.tt-autoplay { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--tt-muted); cursor: pointer; white-space: nowrap; }
.tt-autoplay input { accent-color: var(--tt-primary); width: 16px; height: 16px; }

.tt-side-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.tt-side-progress .tt-bar { flex: 1; }
.tt-side-progress b { font-size: .8rem; color: var(--tt-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tt-playlist { max-height: 520px; overflow-y: auto; }

.tt-pl-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--tt-border-light);
    transition: background .15s ease;
}
.tt-pl-item:last-child { border-bottom: 0; }
.tt-pl-item:hover { background: var(--tt-soft); }
.tt-pl-item.is-current { background: rgba(33, 133, 208, .06); box-shadow: inset 3px 0 0 var(--tt-primary); }
.tt-pl-item.is-current .tt-pl-title { color: var(--tt-primary); font-weight: 700; }

.tt-pl-state {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; background: var(--tt-soft);
    border: 1px solid var(--tt-border); color: var(--tt-muted);
    font-size: .76rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tt-pl-state svg { width: 13px; height: 13px; display: none; fill: currentColor; }
.tt-pl-item.is-current .tt-pl-state { background: var(--tt-primary); border-color: var(--tt-primary); color: #fff; }
.tt-pl-item.is-current .tt-pl-state span { display: none; }
.tt-pl-item.is-current .tt-pl-state svg { display: block; margin-left: 1px; }
.tt-pl-item.is-seen .tt-pl-state { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .28); color: var(--tt-green); }

.tt-pl-body { min-width: 0; flex: 1; }
.tt-pl-title { font-size: .92rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-pl-meta { font-size: .79rem; color: var(--tt-muted); margin-top: 3px; display: flex; gap: 12px; }

.tt-side-nav { display: flex; gap: 10px; }
.tt-side-nav .tt-abtn { flex: 1; justify-content: center; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 980px) {
    .tt-hero { grid-template-columns: 1fr; padding-bottom: clamp(46px, 7vw, 64px); }
    .tt-hero h1 { max-width: none; }
    .tt-search { max-width: none; }
}

@media (max-width: 1080px) {
    .tt-modules { grid-template-columns: 1fr; }
    .tt-layout { grid-template-columns: 1fr; }
    .tt-side { position: static; }
    .tt-playlist { max-height: 420px; }
}

@media (max-width: 720px) {
    .tt-stats { grid-template-columns: repeat(2, 1fr); }
    .tt-stats > div:nth-child(odd) { border-left: 0; }
    .tt-stats > div:nth-child(n+3) { border-top: 1px solid var(--tt-border-light); padding-top: 16px; }
}

@media (max-width: 640px) {
    /* El campo manda: el boton se reduce a su icono. */
    .tt-search-go span { display: none; }
    .tt-search-go { padding: 11px 14px; }
    .tt-filters { gap: 8px; }
    .tt-filter { padding: 9px 16px 9px 10px; font-size: .89rem; }
    .tt-actions { width: 100%; }
    .tt-abtn { flex: 1; justify-content: center; }
    .tt-cbtn { width: 33px; height: 33px; }
    .tt-cbtn.is-optional { display: none; }
    .tt-time { font-size: .73rem; padding: 0 2px; }
    .tt-chapter-label { display: none; }
    .tt-tab { padding: 12px 14px; font-size: .9rem; }
}

/* Modo teatro */
body.tt-theater .tt-layout { grid-template-columns: 1fr; }
body.tt-theater .tt-side { position: static; }
