/* ---- Content Gate ---- */
    .ns-gate { position: relative; overflow: hidden; border-radius: 0 0 12px 12px; }
    .ns-gate__blur {
        filter: blur(6px);
        user-select: none;
        pointer-events: none;
        max-height: 320px;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    }
    .ns-gate__overlay {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        background: linear-gradient(to top, var(--brand-offwhite, #F8F9FA) 60%, transparent);
        padding: 20px;
    }
    .ns-gate__box {
        background: var(--brand-white, #fff);
        border: 1.5px solid var(--brand-border, #E8ECF0);
        border-radius: 16px;
        padding: 28px 24px;
        max-width: 420px;
        width: 100%;
        text-align: center;
        box-shadow: 0 8px 32px rgba(0,0,0,.08);
    }
    .ns-gate__icon { font-size: 2rem; margin-bottom: 10px; }
    .ns-gate__prompt { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--brand-dark); margin-bottom: 18px; line-height: 1.5; }
    .ns-gate__actions { display: flex; flex-direction: column; gap: 10px; }
    .ns-gate__form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .ns-gate__input { flex: 1; min-width: 180px; padding: 10px 14px; border: 1.5px solid var(--brand-border); border-radius: 8px; font-size: .9rem; font-family: var(--font-body); background: var(--brand-offwhite); color: var(--brand-dark); }
    .ns-gate__input:focus { outline: none; border-color: var(--brand-green, #007A3D); box-shadow: 0 0 0 3px rgba(0,122,61,.1); }
    .ns-gate__btn { padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: .85rem; cursor: pointer; border: none; font-family: var(--font-body); transition: opacity .15s, transform .15s; }
    .ns-gate__btn:hover { opacity: .88; transform: translateY(-1px); }
    .ns-gate__btn--primary { background: var(--brand-green, #007A3D); color: #fff; }
    .ns-gate__btn--wa { background: #25D366; color: #fff; }
    .ns-gate__btn--skip { background: none; color: var(--brand-muted); font-size: .8rem; font-weight: 500; padding: 6px; }

    /* ---- Font Size Control ---- */
    .ns-font-ctrl {
        position: fixed;
        bottom: 80px;
        left: 16px;
        z-index: 800;
        display: none;
        flex-direction: column;
        gap: 2px;
        background: var(--brand-white, #fff);
        border: 1.5px solid var(--brand-border, #E8ECF0);
        border-radius: 12px;
        padding: 6px;
        box-shadow: 0 4px 20px rgba(0,0,0,.1);
    }
    @media (min-width: 768px) { .ns-font-ctrl { display: flex; } }
    .ns-font-ctrl__btn {
        width: 36px; height: 36px;
        border: none; background: none; border-radius: 8px;
        cursor: pointer; display: flex; align-items: center; justify-content: center;
        font-family: var(--font-head); font-weight: 700; color: var(--brand-dark);
        font-size: .9rem; transition: background .15s;
    }
    .ns-font-ctrl__btn:hover { background: var(--brand-offwhite, #F8F9FA); }
    .ns-font-ctrl__btn--reset { font-size: .75rem; color: var(--brand-muted); }

    /* ---- Text to Speech ---- */
    .ns-tts {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        background: var(--brand-offwhite, #F8F9FA);
        border: 1px solid var(--brand-border, #E8ECF0);
        border-radius: 10px;
        margin: 0 0 20px;
        flex-wrap: wrap;
    }
    .ns-tts__btn {
        display: flex; align-items: center; gap: 6px;
        background: var(--brand-green, #007A3D); color: #fff;
        border: none; border-radius: 8px; padding: 8px 16px;
        font-weight: 700; font-size: .85rem; cursor: pointer;
        font-family: var(--font-body); transition: background .15s;
    }
    .ns-tts__btn:hover { background: #005C2E; }
    .ns-tts__controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .ns-tts__ctrl {
        width: 32px; height: 32px; border: 1.5px solid var(--brand-border);
        border-radius: 8px; background: var(--brand-white, #fff); cursor: pointer;
        font-size: 1rem; display: flex; align-items: center; justify-content: center;
        transition: background .15s;
    }
    .ns-tts__ctrl:hover { background: var(--brand-offwhite); }
    .ns-tts__speed-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--brand-muted); }
    .ns-tts__speed { padding: 4px 8px; border: 1px solid var(--brand-border); border-radius: 6px; font-size: .8rem; background: var(--brand-white, #fff); color: var(--brand-dark); }

    /* ---- Freshness Badge ---- */
    .ns-freshness-wrap { margin-bottom: 12px; }
    .ns-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; font-family: var(--font-body); letter-spacing: .02em; }
    .ns-badge--breaking { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; animation: ns-pulse 2s infinite; }
    .ns-badge--updated  { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
    @keyframes ns-pulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }

    /* ---- Recently Viewed ---- */
    .ns-rv__list { list-style: none; padding: 0; margin: 0; }
    .ns-rv__list li { padding: 10px 0; border-bottom: 1px solid var(--brand-border, #E8ECF0); }
    .ns-rv__list li:last-child { border-bottom: none; }
    .ns-rv__list a { font-size: .85rem; font-weight: 600; color: var(--brand-dark); font-family: var(--font-head); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .ns-rv__list a:hover { color: var(--brand-green, #007A3D); }
    .ns-rv__meta { font-size: .72rem; color: var(--brand-muted); margin-top: 3px; }

    /* ---- Dark mode overrides ---- */
    [data-theme="dark"] .ns-gate__box { background: #161b22; border-color: #30363d; }
    [data-theme="dark"] .ns-gate__overlay { background: linear-gradient(to top, #0d1117 60%, transparent); }
    [data-theme="dark"] .ns-tts { background: #161b22; border-color: #21262d; }
    [data-theme="dark"] .ns-tts__ctrl { background: #0d1117; border-color: #30363d; }
    [data-theme="dark"] .ns-tts__speed { background: #0d1117; border-color: #30363d; color: #e6edf3; }
    [data-theme="dark"] .ns-font-ctrl { background: #161b22; border-color: #21262d; }
    [data-theme="dark"] .ns-badge--breaking { background: #3b0d0d; color: #fca5a5; border-color: #7f1d1d; }
    [data-theme="dark"] .ns-badge--updated  { background: #2a1f00; color: #fcd34d; border-color: #92400e; }
    [data-theme="dark"] .ns-rv__list li { border-color: #21262d; }
    @media (prefers-color-scheme: dark) {
        html:not([data-theme="light"]) .ns-gate__box { background: #161b22; border-color: #30363d; }
        html:not([data-theme="light"]) .ns-gate__overlay { background: linear-gradient(to top, #0d1117 60%, transparent); }
        html:not([data-theme="light"]) .ns-tts { background: #161b22; border-color: #21262d; }
        html:not([data-theme="light"]) .ns-font-ctrl { background: #161b22; border-color: #21262d; }
        html:not([data-theme="light"]) .ns-badge--breaking { background: #3b0d0d; color: #fca5a5; border-color: #7f1d1d; }
        html:not([data-theme="light"]) .ns-badge--updated { background: #2a1f00; color: #fcd34d; border-color: #92400e; }
    }
