/* ---- 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 (v7.19.0 — forest-emerald tokens, expands only when active) ---- */
    .ns-tts {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        background: var(--paper, #F4F9F6);
        border: 1px solid var(--rule-md, rgba(1,26,11,.14));
        border-radius: 12px;
        margin: 0 0 18px;
        flex-wrap: wrap;
    }
    .ns-tts[hidden] { display: none; }
    .ns-tts__status {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-size: .82rem;
        font-weight: 700;
        color: var(--g-700, #025E34);
        font-family: var(--font-body);
    }
    .ns-tts__controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .ns-tts__ctrl {
        width: 34px; height: 34px; border: 1px solid var(--rule-md, rgba(1,26,11,.16));
        border-radius: 8px; background: var(--cream, #FAF8F2); color: var(--ink, #011A0B);
        cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
        transition: background .15s, border-color .15s, color .15s;
    }
    .ns-tts__ctrl:hover { background: var(--g-600, #007A3D); border-color: var(--g-600, #007A3D); color: #fff; }
    .ns-tts__speed-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted, #4B6458); }
    .ns-tts__speed { padding: 5px 9px; border: 1px solid var(--rule-md, rgba(1,26,11,.16)); border-radius: 8px; font-size: .8rem; font-weight: 600; background: var(--cream, #FAF8F2); color: var(--ink, #011A0B); }

    /* ---- Freshness Badge ---- */
    .ns-freshness-wrap { margin-bottom: 12px; }
    .ns-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; font-family: var(--font-body); letter-spacing: .02em; }
    .ns-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
    .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(--rule, rgba(1,26,11,.10)); }
    .ns-rv__list li:last-child { border-bottom: none; }
    .ns-rv__list a { font-size: .85rem; font-weight: 600; color: var(--ink, #011A0B); 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(--g-600, #007A3D); }
    .ns-rv__meta { font-size: .72rem; color: var(--muted, #4B6458); margin-top: 3px; }

    /* ---- Forest-Emerald Dark Mode Overrides (v7.19.0) ---- */
    [data-theme="dark"] .ns-gate__box { background: var(--paper, #0E2416); border-color: var(--rule-md, rgba(232,245,238,.18)); }
    [data-theme="dark"] .ns-gate__overlay { background: linear-gradient(to top, var(--cream, #0B1F12) 60%, transparent); }
    [data-theme="dark"] .ns-tts { background: var(--paper, #0E2416); border-color: var(--rule-md, rgba(232,245,238,.16)); }
    [data-theme="dark"] .ns-tts__status { color: var(--g-300, #4ADE80); }
    [data-theme="dark"] .ns-tts__ctrl { background: var(--cream, #0B1F12); border-color: var(--rule-md, rgba(232,245,238,.18)); color: var(--ink, #E8F5EE); }
    [data-theme="dark"] .ns-tts__speed { background: var(--cream, #0B1F12); border-color: var(--rule-md, rgba(232,245,238,.18)); color: var(--ink, #E8F5EE); }
    [data-theme="dark"] .ns-font-ctrl { background: var(--paper, #0E2416); border-color: var(--rule-md, rgba(232,245,238,.16)); }
    [data-theme="dark"] .ns-badge--breaking { background: rgba(185,28,28,.2); color: #FCA5A5; border-color: rgba(252,165,165,.35); }
    [data-theme="dark"] .ns-badge--updated  { background: rgba(245,166,35,.16); color: #FCD34D; border-color: rgba(252,211,77,.32); }
    [data-theme="dark"] .ns-rv__list li { border-color: var(--rule, rgba(232,245,238,.10)); }
