:root{
    --ink:#0b1020;
    --paper:#ffffff;
    --muted:#667085;
    --line:#e7e9ef;
    --cyan:#00d7d7;
    --pink:#ff2d9a;
    --orange:#ff7a00;
    --yellow:#ffd500;
    --green:#2ee66b;
    --purple:#7a4dff;
    --grad:linear-gradient(90deg,var(--orange),var(--yellow),var(--green),var(--cyan),var(--purple),var(--pink));
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
    color:var(--ink);
    background:#f7f8fb;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.wrap{
    width:min(100%,1240px);
    margin:auto;
    padding:0 22px;
}

/* HEADER */

.rainbow-line{
    height:5px;
    background:var(--grad);
}

.site-header{
    position:sticky;
    top:0;
    z-index:50;
    background:#fff;
    box-shadow:0 4px 18px rgba(16,24,40,.08);
}

.topbar{
    min-height:92px;
    display:grid;
    grid-template-columns:auto minmax(260px,360px) auto;
    align-items:center;
    gap:22px;
}

.brand{
    display:flex;
    align-items:center;
}

.brand img{
    width:200px;
    max-width:32vw;
    height:auto;
}

.desktop-search{
    display:flex;
    width:100%;
    border:1px solid var(--line);
    border-radius:999px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 2px 8px rgba(16,24,40,.04);
}

.desktop-search input{
    flex:1;
    min-width:0;
    border:0;
    padding:13px 18px;
    outline:0;
    font:inherit;
}

.desktop-search button,
.mobile-search button{
    border:0;
    background:var(--ink);
    color:#fff;
    padding:0 20px;
    font-weight:800;
    cursor:pointer;
}

.desktop-search button:hover,
.mobile-search button:hover{
    background:#161d31;
}

.writer-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    border-radius:999px;
    background:var(--ink);
    color:#fff;
    font-weight:800;
    white-space:nowrap;
    box-shadow:0 6px 16px rgba(11,16,32,.14);
}

.writer-btn:hover{
    background:var(--cyan);
    color:var(--ink);
}

/* NAV */

.main-nav{
    display:flex;
    align-items:center;
    gap:2px;
    padding:0 max(22px,calc((100vw - 1240px)/2 + 22px));
    background:var(--ink);
    overflow-x:auto;
    scrollbar-width:none;
}

.main-nav::-webkit-scrollbar{display:none}

.main-nav>a{
    position:relative;
    color:#fff;
    padding:16px 14px 13px;
    font-weight:800;
    font-size:.92rem;
    white-space:nowrap;
    border-bottom:3px solid transparent;
    background:transparent!important;
    background-image:none!important;
}

.main-nav>a:hover{
    color:var(--cyan);
    border-bottom-color:var(--cyan);
    background:#ffffff0d!important;
}

.main-nav>a.active{
    color:var(--cyan)!important;
    border-bottom-color:var(--cyan)!important;
    background:transparent!important;
    background-image:none!important;
}

.main-nav>a::before,
.main-nav>a::after{
    content:none!important;
    display:none!important;
}

.mobile-brand,
.mobile-search,
.menu-toggle{
    display:none;
}

/* MAIN CONTENT */

main{min-height:60vh}

.hero{
    background:#fff;
    padding:34px 0;
    border-bottom:1px solid var(--line);
}

.hero-grid{
    display:grid;
    grid-template-columns:1.7fr 1fr;
    gap:28px;
}

.lead-card{
    position:relative;
    min-height:460px;
    background:var(--ink);
    overflow:hidden;
    border-radius:18px;
}

.lead-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:.84;
}

.lead-overlay{
    position:absolute;
    inset:auto 0 0;
    padding:40px;
    background:linear-gradient(transparent,#000e);
    color:#fff;
}

.kicker{
    display:inline-block;
    background:var(--grad);
    color:#070b14;
    padding:6px 10px;
    border-radius:999px;
    font-size:.75rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.lead-overlay h1{
    font-size:clamp(2rem,4vw,4rem);
    line-height:.98;
    margin:14px 0;
}

.side-list{
    display:grid;
    gap:16px;
}

.story-mini{
    display:grid;
    grid-template-columns:145px 1fr;
    gap:15px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    overflow:hidden;
    padding:0;
}

.story-mini img{
    width:145px;
    height:100%;
    min-height:110px;
    object-fit:cover;
}

.story-mini h3{
    margin:14px 14px 6px 0;
    font-size:1.08rem;
}

.story-mini .meta{
    margin-right:14px;
    padding-bottom:14px;
}

.meta{
    color:var(--muted);
    font-size:.85rem;
}

.section{
    padding:42px 0;
}

.section-title{
    font-size:2rem;
    margin:0 0 22px;
    border-top:6px solid var(--pink);
    padding-top:12px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

.card{
    overflow:hidden;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 8px 30px rgba(16,24,40,.05);
    transition:transform .2s ease,box-shadow .2s ease;
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 16px 34px rgba(16,24,40,.11);
}

.card img,
.placeholder{
    width:100%;
    height:220px;
    object-fit:cover;
    background:var(--grad);
}

.card-body{padding:20px}

.card h2,
.card h3{
    margin:8px 0;
    line-height:1.12;
}

/* ARTICLE */

.article-shell{
    max-width:900px;
    margin:40px auto;
    background:#fff;
    padding:clamp(24px,5vw,64px);
    border-radius:18px;
    box-shadow:0 10px 40px rgba(16,24,40,.06);
}

.article-shell h1{
    font-size:clamp(2.4rem,6vw,5rem);
    line-height:.98;
    margin:12px 0;
}

.article-body{
    font-family:Georgia,serif;
    font-size:1.18rem;
    line-height:1.75;
}

.article-body img{
    height:auto;
    margin:24px auto;
    border-radius:14px;
}

.article-body img.img-small{max-width:320px}
.article-body img.img-medium{max-width:560px}
.article-body img.img-large{max-width:800px}

/* COMMENTS */

.comments{
    margin-top:50px;
    border-top:1px solid var(--line);
    padding-top:25px;
}

.comments form{
    display:grid;
    gap:12px;
}

.comments input,
.comments textarea{
    padding:13px;
    border:1px solid var(--line);
    border-radius:10px;
    font:inherit;
}

.btn{
    border:0;
    border-radius:10px;
    background:var(--grad);
    padding:13px 20px;
    font-weight:900;
    cursor:pointer;
}

.comment{
    padding:18px 0;
    border-bottom:1px solid var(--line);
}

/* FOOTER */

.site-footer{
    background:var(--ink);
    color:#fff;
    margin-top:50px;
    border-top:7px solid transparent;
    border-image:var(--grad) 1;
}

.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:40px;
    padding-top:45px;
    padding-bottom:35px;
}

.footer-logo{
    width:320px;
    height:120px;
    object-fit:contain;
    object-position:left center;
    background:none!important;
}

.footer-grid a{
    display:block;
    margin:8px 0;
    color:#d7dbea;
}

.footer-bottom{
    text-align:center;
    padding:20px;
    border-top:1px solid #ffffff1a;
    color:#aeb6c8;
}

.footer-bottom a{
    color:var(--cyan);
    font-weight:800;
}

.empty{
    padding:50px;
    background:#fff;
    text-align:center;
    border-radius:16px;
}

.menu-toggle{
    margin-left:auto;
    width:44px;
    height:44px;
    padding:5px;
    border:0;
    border-radius:10px;
    background:#f1f3f7;
    cursor:pointer;
}

.menu-toggle span{
    display:block;
    height:3px;
    margin:6px;
    border-radius:3px;
    background:var(--ink);
}

/* TABLET + MOBILE */

@media(max-width:900px){
    .topbar{
        min-height:76px;
        display:flex;
        align-items:center;
        gap:12px;
    }

    .brand{
        flex:1;
        min-width:0;
    }

    .brand img{
        width:190px;
        max-width:58vw;
    }

    .desktop-search,
    .writer-btn{
        display:none;
    }

    .menu-toggle{
        display:block;
        flex:0 0 auto;
    }

    .main-nav{
        position:fixed;
        top:0;
        right:-100%;
        width:min(86vw,360px);
        height:100vh;
        display:block;
        padding:22px;
        overflow-y:auto;
        background:var(--ink);
        transition:right .28s ease;
        z-index:80;
        box-shadow:-12px 0 30px rgba(0,0,0,.18);
    }

    .main-nav.open{
        right:0;
    }

    .main-nav>a{
        display:block;
        padding:15px 4px;
        border-bottom:1px solid #ffffff18;
    }

    .main-nav>a.active{
        border-bottom-color:var(--cyan)!important;
    }

    .mobile-brand{
        display:flex;
        align-items:center;
        gap:12px;
        color:#fff;
        padding-bottom:18px;
        border-bottom:1px solid #ffffff1a;
    }

    .mobile-brand img{
        width:54px;
        height:54px;
        object-fit:contain;
    }

    .mobile-search{
        display:flex;
        margin:18px 0;
        border-radius:999px;
        overflow:hidden;
        background:#fff;
    }

    .mobile-search input{
        min-width:0;
        flex:1;
        padding:12px 14px;
        border:0;
        outline:0;
    }

    .hero-grid,
    .cards,
    .footer-grid{
        grid-template-columns:1fr;
    }

    .lead-card{
        min-height:390px;
    }

    .side-list{
        grid-template-columns:1fr 1fr;
    }

    .story-mini{
        display:block;
    }

    .story-mini img{
        width:100%;
        height:150px;
    }

    .story-mini h3{
        margin:14px 14px 6px;
    }

    .story-mini .meta{
        margin:0 14px;
    }

    .article-shell{
        margin:18px 10px;
    }

    .footer-logo{
        width:260px;
        height:96px;
    }
}

@media(max-width:560px){
    .wrap{
        padding:0 14px;
    }

    .topbar{
        min-height:70px;
    }

    .brand img{
        width:165px;
        max-width:62vw;
    }

    .hero{
        padding:22px 0;
    }

    .lead-card{
        min-height:330px;
        border-radius:14px;
    }

    .lead-overlay{
        padding:22px;
    }

    .side-list{
        grid-template-columns:1fr;
    }

    .cards{
        grid-template-columns:1fr;
    }

    .card img,
    .placeholder{
        height:210px;
    }

    .article-shell h1{
        font-size:2.4rem;
    }

    .section{
        padding:30px 0;
    }

    .section-title{
        font-size:1.7rem;
    }
}


/* =========================
   FINAL MOBILE HEADER FIX
========================= */

@media (max-width:900px){
    .site-header{
        position:sticky;
        top:0;
    }

    .topbar{
        min-height:62px !important;
        height:62px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:10px !important;
        padding-top:0 !important;
        padding-bottom:0 !important;
        overflow:visible !important;
    }

    .brand{
        flex:0 1 auto !important;
        min-width:0 !important;
        max-width:calc(100% - 54px) !important;
    }

    .brand img{
        width:145px !important;
        max-width:100% !important;
        height:auto !important;
        object-fit:contain !important;
    }

    .menu-toggle{
        display:block !important;
        flex:0 0 44px !important;
        margin-left:auto !important;
        position:relative !important;
        z-index:90 !important;
    }

    .desktop-search,
    .writer-btn{
        display:none !important;
    }
}

@media (max-width:560px){
    .topbar{
        min-height:58px !important;
        height:58px !important;
    }

    .brand img{
        width:128px !important;
    }

    .menu-toggle{
        width:42px !important;
        height:42px !important;
    }

    .hero{
        padding:18px 0 !important;
    }

    .empty{
        padding:34px 18px !important;
        font-size:1rem !important;
    }

    .section{
        padding:26px 0 !important;
    }

    .section-title{
        font-size:1.55rem !important;
        margin-bottom:16px !important;
    }
}


/* =========================================================
   ELIXIR DARK THEME
========================================================= */

:root{
    --ink:#f7f8ff;
    --paper:#0d1424;
    --muted:#a8b0c3;
    --line:#263048;
    --surface:#111a2d;
    --surface-2:#172238;
    --deep:#070c17;
    --cyan:#20e0dc;
}

html{
    background:var(--deep);
}

body{
    color:var(--ink);
    background:
        radial-gradient(circle at 18% 0%,rgba(122,77,255,.13),transparent 28rem),
        radial-gradient(circle at 92% 5%,rgba(255,45,154,.09),transparent 25rem),
        var(--deep);
}

.site-header{
    background:rgba(7,12,23,.96);
    border-bottom:1px solid rgba(255,255,255,.06);
    box-shadow:0 8px 28px rgba(0,0,0,.28);
    backdrop-filter:blur(16px);
}

.topbar{
    background:transparent;
}

.desktop-search{
    background:var(--surface);
    border-color:var(--line);
    box-shadow:none;
}

.desktop-search input{
    color:#fff;
    background:transparent;
}

.desktop-search input::placeholder,
.mobile-search input::placeholder{
    color:#8993aa;
}

.desktop-search button,
.mobile-search button{
    background:#202c44;
    color:#fff;
}

.desktop-search button:hover,
.mobile-search button:hover{
    background:var(--cyan);
    color:#07101b;
}

.writer-btn{
    background:var(--grad);
    color:#07101b;
    box-shadow:0 8px 22px rgba(122,77,255,.2);
}

.writer-btn:hover{
    color:#fff;
    filter:brightness(1.08);
}

.main-nav{
    background:#090f1d;
    border-top:1px solid rgba(255,255,255,.05);
    border-bottom:1px solid rgba(255,255,255,.06);
}

.main-nav>a{
    color:#dce3f2;
}

.main-nav>a:hover,
.main-nav>a.active{
    color:var(--cyan)!important;
}

main{
    background:transparent;
}

.hero{
    background:transparent;
    border-bottom-color:var(--line);
}

.lead-card,
.card,
.story-mini,
.article-shell,
.empty{
    background:var(--surface);
    border-color:var(--line);
    color:var(--ink);
}

.card,
.story-mini,
.article-shell,
.empty{
    box-shadow:0 12px 34px rgba(0,0,0,.2);
}

.card:hover{
    box-shadow:0 18px 42px rgba(0,0,0,.34);
}

.section-title{
    color:#fff;
}

.meta{
    color:var(--muted);
}

.article-body{
    color:#e8ecf6;
}

.comments{
    border-top-color:var(--line);
}

.comments input,
.comments textarea{
    color:#fff;
    background:var(--surface-2);
    border-color:var(--line);
}

.comments input::placeholder,
.comments textarea::placeholder{
    color:#8993aa;
}

.comment{
    border-bottom-color:var(--line);
}

.site-footer{
    background:#050912;
}

.footer-grid a{
    color:#c4cbda;
}

.footer-bottom{
    color:#8f99ad;
}

.menu-toggle{
    background:var(--surface-2);
    border:1px solid var(--line);
}

.menu-toggle span{
    background:#fff;
}

@media(max-width:900px){
    .main-nav{
        background:#080e1b;
        box-shadow:-18px 0 44px rgba(0,0,0,.45);
    }

    .mobile-search{
        background:var(--surface);
        border:1px solid var(--line);
    }

    .mobile-search input{
        color:#fff;
        background:transparent;
    }

    .mobile-brand{
        border-bottom-color:rgba(255,255,255,.1);
    }
}

/* AGE-RESTRICTED ARTICLES */

.age-gate{
    width:min(calc(100% - 32px),700px);
    margin:48px auto;
    padding:clamp(28px,6vw,60px);
    text-align:center;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 18px 48px rgba(0,0,0,.32);
}

.age-gate__badge,
.age-label{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:58px;
    min-height:58px;
    margin-bottom:18px;
    padding:8px;
    color:#fff;
    background:#b42318;
    border-radius:50%;
    font-size:1.35rem;
    font-weight:900;
}

.age-label{
    min-width:42px;
    min-height:42px;
    margin:0 10px 8px 0;
    font-size:1rem;
    vertical-align:middle;
}

.age-gate h1{
    margin:18px 0;
    font-size:clamp(2rem,6vw,3.8rem);
    line-height:1;
}

.age-gate>p:not(.kicker){
    max-width:560px;
    margin:0 auto;
    color:var(--muted);
    font-size:1.08rem;
    line-height:1.65;
}

.age-gate__form{
    display:grid;
    gap:16px;
    max-width:520px;
    margin:28px auto 0;
}

.age-gate__confirm{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:16px;
    text-align:left;
    background:var(--surface-2);
    border:1px solid var(--line);
    border-radius:12px;
    cursor:pointer;
}

.age-gate__confirm input{
    width:20px;
    height:20px;
    margin:1px 0 0;
    flex:0 0 auto;
    accent-color:var(--cyan);
}

.age-gate__leave{
    padding:10px;
    color:var(--muted);
    font-weight:800;
    text-decoration:underline;
    text-underline-offset:3px;
}

.age-gate__leave:hover{
    color:var(--cyan);
}
