:root{
    --bg:#040814;
    --panel:rgba(15,23,42,.78);
    --panel-strong:rgba(15,23,42,.94);
    --line:rgba(255,255,255,.12);
    --text:#f8fafc;
    --muted:#cbd5e1;
    --blue:#38bdf8;
    --purple:#8b5cf6;
    --green:#10b981;
    --orange:#fb923c;
    --red:#fb7185;
    --radius:30px;
    --shadow:0 30px 90px rgba(0,0,0,.45);
}
.wire-brand{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.wire-brand-text{
    font-weight:900;
    letter-spacing:.02em;
    font-size:18px;
    color:#fff;
    text-decoration:none;
}

.wire-brand-logo{
    height:26px !important;
    width:auto !important;
    max-width:34px !important;
    object-fit:contain;
    display:block;
    flex:0 0 auto;
}
*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    color:var(--text);
    background:
        radial-gradient(circle at 15% 0%,rgba(56,189,248,.18),transparent 32%),
        radial-gradient(circle at 85% 10%,rgba(139,92,246,.18),transparent 34%),
        radial-gradient(circle at 50% 100%,rgba(16,185,129,.10),transparent 28%),
        var(--bg);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

body.wire-embed{
    background:transparent;
    overflow:hidden;
}

a{
    color:#fff;
    text-decoration:none;
}

.wrap{
    max-width:1280px;
    margin:auto;
    padding:28px 18px 70px;
}

.embed-wrap{
    padding:0;
    margin:0;
    max-width:none;
}

.glass{
    background:var(--panel);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.hero{
    padding:42px;
    overflow:hidden;
    position:relative;
}

.hero:after{
    content:"";
    position:absolute;
    width:360px;
    height:360px;
    right:-120px;
    top:-120px;
    background:radial-gradient(circle,rgba(56,189,248,.20),transparent 70%);
}

.kicker{
    color:var(--blue);
    font-size:12px;
    letter-spacing:.12em;
    font-weight:900;
    text-transform:uppercase;
}

h1{
    font-size:clamp(42px,7vw,84px);
    line-height:.92;
    margin:10px 0 18px;
}

h2{
    margin:10px 0 12px;
}

.lead{
    font-size:18px;
    line-height:1.7;
    color:var(--muted);
    max-width:860px;
}

.actions{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin-top:24px;
    align-items:center;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    max-width:100%;
    padding:14px 22px;
    border-radius:999px;
    color:#fff;
    text-decoration:none;
    font-weight:800;
    border:1px solid rgba(255,255,255,.12);
    transition:all .2s ease;
    cursor:pointer;
    font-size:14px;
    line-height:1.15;
    text-align:center;
    white-space:normal;
}

.btn:hover{
    transform:translateY(-2px);
}

.btn-blue{
    background:linear-gradient(135deg,#2563eb,#06b6d4);
}

.btn-green{
    background:linear-gradient(135deg,#059669,#10b981);
}

.btn-purple{
    background:linear-gradient(135deg,#7c3aed,#db2777);
}

.btn-orange{
    background:linear-gradient(135deg,#ea580c,#fb923c);
}

.btn-red{
    background:linear-gradient(135deg,#be123c,#fb7185);
}

.btn-dark{
    background:rgba(15,23,42,.92);
}

/* Stats / general grid */
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
}

.stat{
    padding:20px;
}

.stat strong{
    display:block;
    font-size:36px;
}

.stat span{
    color:var(--muted);
}

/* Feed grid: 3 desktop, 2 tablet, 1 phone */
.feed{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    padding:12px 0 24px;
    overflow:visible;
}

.feed-card{
    width:100%;
    min-width:0;
    max-width:none;
    overflow:hidden;
    transition:all .22s ease;
}

.feed-card:hover{
    transform:translateY(-4px);
}

.feed-image{
    height:220px;
    background:linear-gradient(135deg,#2563eb,#8b5cf6);
    display:grid;
    place-items:center;
    color:#dbeafe;
    font-weight:900;
}

.feed-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.feed-content{
    padding:22px;
}

.feed-category,
.badge{
    display:inline-flex;
    padding:6px 10px;
    border-radius:999px;
    background:rgba(56,189,248,.12);
    border:1px solid rgba(56,189,248,.24);
    color:#7dd3fc;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.06em;
}

.badge-green{
    background:rgba(16,185,129,.14);
    border-color:rgba(16,185,129,.28);
    color:#86efac;
}

.badge-red{
    background:rgba(251,113,133,.14);
    border-color:rgba(251,113,133,.28);
    color:#fda4af;
}

.badge-orange{
    background:rgba(251,146,60,.14);
    border-color:rgba(251,146,60,.28);
    color:#fdba74;
}

.feed-title{
    font-size:26px;
    line-height:1.08;
    margin:14px 0 12px;
}

.feed-meta{
    color:var(--muted);
    line-height:1.5;
}

/* Embed feed stays horizontal for city-page stripe */
.embed-feed{
    display:flex;
    gap:14px;
    overflow-x:auto;
    padding:8px 6px 12px;
    scroll-snap-type:x mandatory;
}

.embed-feed .feed-card{
    min-width:165px;
    max-width:165px;
    height:215px;
    scroll-snap-align:start;
    border-radius:18px;
    overflow:hidden;
}

.embed-feed .feed-image{
    height:82px;
}

.embed-feed .feed-content{
    padding:9px 10px;
}

.embed-feed .feed-category{
    font-size:9px;
    padding:4px 7px;
}

.embed-feed .feed-title{
    font-size:13px;
    line-height:1.12;
    margin:7px 0 5px;
    max-height:45px;
    overflow:hidden;
}

.embed-feed .feed-meta{
    font-size:11px;
    line-height:1.35;
}

/* Articles / forms */
.article{
    padding:34px;
}

.article img{
    width:100%;
    border-radius:24px;
    margin:22px 0;
}

.article-body{
    font-size:18px;
    line-height:1.8;
    color:#e2e8f0;
}

input,
textarea,
select{
    width:100%;
    padding:16px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(15,23,42,.92);
    color:#fff;
    margin-top:8px;
}

textarea{
    min-height:180px;
}

label{
    display:block;
    margin-top:18px;
    font-size:13px;
    font-weight:800;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.notice,
.error{
    padding:16px 18px;
    border-radius:18px;
    margin:18px 0;
}

.notice{
    background:rgba(16,185,129,.12);
    border:1px solid rgba(16,185,129,.24);
}

.error{
    background:rgba(251,113,133,.12);
    border:1px solid rgba(251,113,133,.24);
}

/* Admin */
.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.admin-card{
    padding:24px;
    margin-bottom:18px;
}

.filters{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.filters form{
    align-items:center;
}

.filters input,
.filters select{
    width:auto;
    min-width:180px;
    margin-top:0;
}

.table-card{
    padding:22px;
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th,
td{
    text-align:left;
    padding:13px;
    border-bottom:1px solid rgba(255,255,255,.10);
    vertical-align:top;
}

th{
    color:#93c5fd;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.08em;
}

td{
    color:#e2e8f0;
}

.small{
    font-size:13px;
    color:var(--muted);
}

.pass{
    color:#86efac;
    font-weight:900;
}

.fail{
    color:#fda4af;
    font-weight:900;
}

.warn{
    color:#fdba74;
    font-weight:900;
}

.inline-form{
    display:inline-flex;
    width:auto;
    margin:0;
}

.inline-form button{
    margin:0;
}

/* iPad / tablet */
@media(max-width:1024px){
    .feed{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .wrap{
        padding:22px 14px 56px;
    }

    .hero{
        padding:30px;
    }
}

/* large phone / small tablet */
@media(max-width:760px){
    .feed{
        grid-template-columns:1fr;
        gap:18px;
    }

    .feed-card{
        width:100%;
    }

    .feed-title{
        font-size:24px;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .filters input,
    .filters select{
        width:100%;
    }

    h1{
        font-size:44px;
    }
}

/* iPhone */
@media(max-width:520px){
    .wrap{
        padding:16px 10px 46px;
    }

    .hero{
        padding:22px;
    }

    .article{
        padding:22px;
    }

    .grid{
        grid-template-columns:1fr;
    }

    .stat{
        padding:18px;
    }

    .stat strong{
        font-size:42px;
    }

    .actions{
        gap:10px;
        align-items:center;
    }

    .btn{
        width:auto;
        flex:0 1 auto;
        padding:13px 16px;
        font-size:13px;
    }

    .feed{
        grid-template-columns:1fr;
        padding-left:0;
        padding-right:0;
    }

    .feed-card{
        width:100%;
        min-width:0;
        max-width:none;
    }

    .embed-feed .feed-card{
        min-width:155px;
        max-width:155px;
    }
}

.wire-nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:22px;
    padding:14px;
}

.wire-brand{
    font-weight:900;
    letter-spacing:.02em;
    font-size:18px;
}

.wire-nav-links{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.wire-nav-links a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    max-width:100%;
    padding:10px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.12);
    color:#fff;
    font-weight:800;
    font-size:13px;
    line-height:1.15;
    text-align:center;
    white-space:normal;
}

@media(max-width:520px){
    .wire-nav{
        align-items:flex-start;
    }

    .wire-nav-links{
        width:100%;
        gap:8px;
    }

    .wire-nav-links a{
        flex:0 1 auto;
        width:auto;
        padding:9px 12px;
        font-size:12px;
    }
}

.wire-nav-links a.nav-home{
    background:rgba(255,255,255,.06);
}

.wire-nav-links a.nav-submit{
    background:linear-gradient(135deg,rgba(37,99,235,.85),rgba(6,182,212,.85));
}

.wire-nav-links a.nav-feed{
    background:linear-gradient(135deg,rgba(5,150,105,.85),rgba(16,185,129,.85));
}

.wire-nav-links a.nav-admin{
    background:linear-gradient(135deg,rgba(124,58,237,.85),rgba(219,39,119,.85));
}

.wire-nav-links a.nav-publishers{
    background:linear-gradient(135deg,rgba(234,88,12,.85),rgba(251,146,60,.85));
}

.wire-nav-links a.nav-smoke{
    background:linear-gradient(135deg,rgba(190,18,60,.85),rgba(251,113,133,.85));
}