.source-shell{
    width:100%;
    max-width:760px;
    margin:0 auto;
    padding:28px 20px 48px;
}

/* --- TOPBAR --- */

.source-topbar{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

/* BUTTON STYLE */

.source-topbar .btn,
.source-topbar .source-lang-form button,
.source-topbar .source-lang-form select{
    height:42px;
    min-width:138px;
    padding:0 18px;
    border-radius:999px;
    font-size:.9rem;
    font-weight:800;
    border:1px solid var(--line-strong);
    background:#fff;
    color:var(--text);
    box-shadow:none;
}

.source-topbar .source-lang-form select{
    min-width:86px;
    background:
        #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
        no-repeat right 14px center;
    cursor:pointer;
    appearance:none;
}

/* ONLY Watch Video = blue */

.source-topbar > a.btn.btn-dark{
    border:1px solid #2563eb;
    background:rgba(37,99,235,.10);
    color:#1d4ed8;
}

.source-topbar > a.btn.btn-dark:hover{
    background:rgba(37,99,235,.16);
    color:#1e40af;
}

/* --- CARD --- */

.source-article-card,
.source-fallback-card{
    width:100%;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:22px;
    overflow:hidden;
    box-shadow:var(--shadow);
}

/* --- ARTICLE HEADER ABOVE IMAGE --- */

.source-article-header{
    padding:30px 30px 26px;
    background:var(--surface);
    border-bottom:1px solid var(--line);
}

.source-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-bottom:14px;
    font-size:.78rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--accent-2);
}

.video-tag{
    display:inline-flex;
    align-items:center;
    color:var(--accent-2);
    font-weight:700;
}

.source-title{
    margin:0 0 16px;
    font-size:clamp(1.45rem, 5vw, 2.1rem);
    line-height:1.08;
    letter-spacing:-.04em;
    font-weight:800;
    color:var(--text);
    overflow-wrap:anywhere;
}

.source-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    margin:0;
    color:var(--muted);
    font-size:.9rem;
}

.source-meta-sep{
    color:var(--muted);
}

/* --- HERO --- */

.source-hero-wrap{
    width:100%;
    background:#dde4ee;
    border-bottom:1px solid var(--line);
}

.source-hero-image{
    display:block;
    width:100%;
    aspect-ratio:16 / 8;
    object-fit:cover;
}

/* --- BODY --- */

.source-article-body{
    padding:30px;
}

.source-content{
    font-size:1.05rem;
    line-height:1.8;
    overflow-wrap:anywhere;
}

.source-content p{
    margin:0 0 1.2em;
}

.source-content img,
.source-content video,
.source-content iframe{
    max-width:100%;
    height:auto;
}

/* --- ACTIONS --- */

.source-bottom-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:26px;
    padding-top:16px;
    border-top:1px solid var(--line);
}

/* --- FALLBACK --- */

.source-fallback-card{
    padding:34px 28px;
    text-align:center;
}

.source-fallback-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-bottom:14px;
    padding:8px 14px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface-soft);
    color:var(--muted);
    font-size:.8rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.06em;
}

.source-fallback-title{
    margin:0 0 12px;
    font-size:clamp(1.4rem, 5vw, 1.9rem);
    line-height:1.08;
}

.source-fallback-text{
    max-width:600px;
    margin:0 auto 12px;
    color:var(--muted);
    font-size:.95rem;
    line-height:1.65;
}

.source-fallback-note{
    margin:0 0 18px;
    color:var(--muted);
    font-size:.86rem;
}

.source-fallback-actions{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* --- LANGUAGE DROPDOWN --- */

.source-lang-form{
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:auto;
}

/* --- BUTTON FIX --- */

.source-topbar .btn,
.source-bottom-actions .btn,
.source-fallback-actions .btn{
    flex:0 0 auto;
    width:auto;
}

/* --- VIDEO EMBED --- */

.source-video-wrap{
    aspect-ratio:16 / 9;
}

.source-video{
    display:block;
    width:100%;
    height:100%;
    border:0;
    background:#000;
}

/* --- LOADING BUTTON --- */

.btn-loading-spinner{
    display:none;
    width:14px;
    height:14px;
    border:2px solid rgba(255,255,255,0.45);
    border-top-color:#ffffff;
    border-radius:50%;
    animation:btnSpin .7s linear infinite;
}

.btn.is-loading{
    pointer-events:none;
    opacity:.82;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.btn.is-loading .btn-loading-spinner{
    display:inline-block;
}

@keyframes btnSpin{
    to{
        transform:rotate(360deg);
    }
}

/* --- TABLET --- */

@media (max-width:860px){
    .source-shell{
        padding:22px 16px 40px;
    }

    .source-article-header{
        padding:24px 18px 22px;
    }

    .source-article-body,
    .source-fallback-card{
        padding:22px 18px;
    }

    .source-hero-image{
        aspect-ratio:16 / 9;
    }
}

/* --- MOBILE --- */

@media (max-width:640px){
    .source-shell{
        padding:14px 10px 30px;
    }

    .source-article-card,
    .source-fallback-card{
        border-radius:16px;
    }

    .source-topbar{
        display:flex;
        flex-direction:row;
        align-items:center;
        gap:8px;
        flex-wrap:nowrap;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        margin-bottom:14px;
    }

    .source-topbar::-webkit-scrollbar{
        display:none;
    }

    .source-topbar .btn,
    .source-topbar .source-lang-form{
        flex:0 0 auto;
        width:auto;
        min-width:0;
    }

    .source-topbar .btn{
        padding:8px 12px;
        font-size:.8rem;
        white-space:nowrap;
    }

    .source-lang-form{
        display:inline-flex;
        align-items:center;
        gap:6px;
        width:auto;
    }

    .source-lang-form select{
        width:auto;
        min-width:56px;
        height:34px;
        padding:0 26px 0 8px;
        font-size:.8rem;
    }

    .source-lang-form button{
        height:34px;
        padding:0 12px;
        font-size:.8rem;
        white-space:nowrap;
    }

    .source-article-header{
        padding:20px 14px 18px;
    }

    .source-kicker{
        margin-bottom:12px;
        font-size:.74rem;
    }

    .source-title{
        margin-bottom:14px;
        font-size:clamp(1.45rem, 8vw, 2rem);
        letter-spacing:-.035em;
    }

    .source-meta{
        font-size:.86rem;
        gap:6px;
    }

    .source-article-body,
    .source-fallback-card{
        padding:18px 14px;
    }

    .source-content{
        font-size:.95rem;
        line-height:1.7;
    }

    .source-bottom-actions,
    .source-fallback-actions{
        flex-direction:row;
        gap:8px;
        align-items:center;
        flex-wrap:wrap;
    }

    .source-bottom-actions .btn,
    .source-fallback-actions .btn{
        padding:8px 12px;
        font-size:.8rem;
    }
}

/* --- SMALL DEVICES --- */

@media (max-width:420px){
    .source-title{
        letter-spacing:-.02em;
    }

    .source-content{
        font-size:.93rem;
    }
}

.lang-select-wrap{
    position:relative;
    display:inline-flex;
    align-items:center;
}

.lang-select-spinner{
    display:none;
    position:absolute;
    right:13px;
    width:14px;
    height:14px;
    border:2px solid rgba(37,99,235,.25);
    border-top-color:#2563eb;
    border-radius:50%;
    animation:btnSpin .7s linear infinite;
    pointer-events:none;
}

.lang-select-wrap.is-loading select{
    color:transparent;
    background-image:none;
    pointer-events:none;
}

.lang-select-wrap.is-loading .lang-select-spinner{
    display:block;
}


/* --- TOPBAR LOADING SPINNER --- */

.lang-select-spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(15,23,42,0.15);
    border-top-color: #0f172a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.lang-select-spinner.is-visible {
    display: inline-block;
    vertical-align: middle;
}

/* optional: align nicely with buttons */
/* --- TOPBAR LOADING SPINNER --- */

.source-topbar > .lang-select-spinner{
    display:none;
    flex:0 0 auto;
    position:relative;
    top:1px;
    width:24px;
    height:24px;
    margin-left:16px;
    border:3px solid rgba(37,99,235,.18);
    border-top-color:#2563eb;
    border-radius:50%;
    animation:spin .7s linear infinite;
    pointer-events:none;
}

.source-topbar > .lang-select-spinner.is-visible{
    display:inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}