:root{
    --black:#0a0a0a;
    --white:#f5f5f2;
    --yellow:#d9ff32;
    --gray:#9b9b96;
    --line:#252525;
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:var(--black);
    color:var(--white);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input{
    font:inherit;
}

button{
    cursor:pointer;
}


/* ============================================================
   APP
   ============================================================ */

.app{
    min-height:100vh;
    padding-bottom:78px;
}


/* ============================================================
   HEADER
   ============================================================ */

header{
    height:72px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 22px;
    max-width:1280px;
    margin:auto;
}

.logo{
    color:var(--yellow);
    font-weight:950;
    font-size:25px;
    letter-spacing:-.07em;
    text-decoration:none;
}

.logo b{
    color:#fff;
    font-size:31px;
    margin-left:2px;
}

.install{
    background:var(--yellow);
    color:#090909;
    border:0;
    border-radius:999px;
    padding:8px 14px;
    font-weight:850;
}


/* ============================================================
   HERO
   ============================================================ */

.hero{
    padding:72px 22px 35px;
    max-width:1280px;
    margin:auto;
}

.eyebrow{
    color:var(--yellow);
    font-size:10px;
    font-weight:900;
    letter-spacing:.2em;
    margin:0 0 18px;
}

.hero h1{
    font-size:clamp(58px,10vw,128px);
    line-height:.86;
    letter-spacing:-.075em;
    margin:0;
    max-width:1000px;
}

.hero h1 i{
    font-style:normal;
    color:var(--yellow);
}

.sub{
    font-size:18px;
    color:var(--gray);
    max-width:480px;
    line-height:1.5;
    margin:34px 0;
}


/* ============================================================
   SEARCH FORM
   ============================================================ */

.hero form{
    display:flex;
    align-items:center;
    max-width:860px;
    border:1px solid var(--line);
    background:#111;
    border-radius:20px;
    padding:7px;
}

.hero form>span{
    font-size:28px;
    padding:0 12px;
    color:var(--gray);
}

input{
    flex:1;
    min-width:0;
    background:transparent;
    color:#fff;
    border:0;
    outline:0;
    padding:16px 8px;
    font-size:16px;
}

input::placeholder{
    color:#666;
}

.hero form button{
    border:0;
    background:var(--yellow);
    color:#090909;
    border-radius:14px;
    padding:15px 17px;
    font-weight:900;
}

.hero form button strong{
    font-size:19px;
    margin-left:8px;
}


/* ============================================================
   SEARCH CHIPS
   ============================================================ */

.chips{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:12px;
}

.chips button{
    border:1px solid var(--line);
    background:#101010;
    color:var(--gray);
    border-radius:999px;
    padding:8px 12px;
    font-size:12px;
}

.chips button:hover{
    border-color:#444;
    color:var(--white);
}


/* ============================================================
   PEOPLE / PLACES / BUSINESSES
   ============================================================ */

.tri{
    max-width:1280px;
    margin:85px auto 0;
    padding:0 22px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    border-top:1px solid var(--line);
}

.tri article{
    padding:25px 22px 35px 0;
    border-right:1px solid var(--line);
}

.tri article+article{
    padding-left:22px;
}

.tri article:last-child{
    border-right:0;
}

.tri small{
    color:var(--yellow);
    font-weight:900;
    letter-spacing:.15em;
}

.tri h2{
    font-size:30px;
    letter-spacing:-.05em;
    margin:24px 0 8px;
}

.tri p{
    color:var(--gray);
    line-height:1.5;
    max-width:300px;
}


/* ============================================================
   RESULTS
   ============================================================ */

.results{
    max-width:1000px;
    margin:20px auto;
    padding:50px 22px;
}

.resultTop{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:end;
}

.resultTop h2{
    font-size:clamp(32px,6vw,58px);
    letter-spacing:-.06em;
    margin:0;
    overflow-wrap:anywhere;
}

.resultTop>button{
    background:transparent;
    border:1px solid var(--line);
    color:#fff;
    border-radius:999px;
    padding:9px 13px;
    white-space:nowrap;
}

.loading{
    color:var(--yellow);
    padding:35px 0;
}


/* ============================================================
   OLD / FALLBACK RESULT ARTICLE
   ============================================================ */

.results article{
    line-height:1.7;
    background:#111;
    border:1px solid var(--line);
    border-radius:20px;
    padding:24px;
    margin-top:25px;
}

#answer,
#answer *{
    white-space:normal;
}

/* ============================================================
   SEARCH META
   ============================================================ */

.searchMeta{
    color:#777;
    font-size:11px;
    margin:12px 0 0;
}


/* ============================================================
   ENTITY DISCOVERY
   ============================================================ */

.entityDiscovery{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin-top:18px;
    padding:18px 20px;
    background:#111;
    border:1px solid var(--line);
    border-radius:18px;
}

.entityDiscovery .eyebrow{
    width:100%;
    margin:0;
}

.entityDiscovery strong{
    font-size:17px;
    letter-spacing:-.02em;
}

.entityDiscovery span{
    color:var(--gray);
    font-size:13px;
}

.entityDiscovery a{
    margin-left:auto;
    color:#090909;
    background:var(--yellow);
    text-decoration:none;
    border-radius:999px;
    padding:9px 14px;
    font-size:12px;
    font-weight:900;
}


/* ============================================================
   PHASE 2 — SEARCH ENTITY CARD
   ============================================================ */

.entityCard{
    width:100%;
    margin:25px 0 24px;
    padding:20px;
    box-sizing:border-box;
    background:#111;
    border:1px solid var(--line);
    border-radius:18px;
}

.entityCardType{
    display:flex;
    align-items:center;
    gap:7px;
    margin:0 0 11px;
    color:var(--gray);
    font-size:10px;
    line-height:1.2;
    font-weight:800;
    letter-spacing:.14em;
    text-transform:uppercase;
}

.entityCardDot{
    opacity:.55;
}

.entityCardBody{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.entityCardInfo{
    min-width:0;
    flex:1;
}

.entityCardName{
    margin:0 0 7px;
    color:var(--white);
    font-size:24px;
    line-height:1.1;
    letter-spacing:-.035em;
}

.entityCardDescription{
    margin:0;
    color:var(--gray);
    font-size:13px;
    line-height:1.5;
}

.entityCardLink{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:10px 14px;
    background:var(--yellow);
    color:#090909;
    border-radius:999px;
    text-decoration:none;
    font-size:12px;
    font-weight:900;
    white-space:nowrap;
}

.entityCardLink:hover{
    opacity:.88;
}

.entityCardArrow{
    font-size:15px;
}


/* ============================================================
   CONNECT2 — AI ANSWER
   ============================================================ */

.aiAnswerContent{
    width:100%;
    color:var(--white);
}

.aiAnswerContent p{
    margin:0 0 18px;
    line-height:1.65;
}

.aiAnswerContent p:last-child{
    margin-bottom:0;
}

.aiAnswerContent h2,
.aiAnswerContent h3{
    margin:28px 0 10px;
    color:var(--white);
    line-height:1.25;
}

.aiAnswerContent h2:first-child,
.aiAnswerContent h3:first-child{
    margin-top:0;
}

.aiAnswerContent strong{
    font-weight:800;
}

.aiAnswerContent em{
    font-style:italic;
}

.aiAnswerContent ul{
    margin:8px 0 18px 22px;
    padding:0;
}

.aiAnswerContent li{
    margin:4px 0;
    line-height:1.55;
}
/* ============================================================
   SOURCES
   ============================================================ */

.results #sources{
    display:grid;
    gap:8px;
    margin-top:22px;
}

.sourceList{
    display:grid;
    gap:8px;
}

.sourceList .eyebrow{
    margin-bottom:4px;
}

.results #sources a,
.sourceList a{
    color:#fff;
    text-decoration:none;
    border:1px solid var(--line);
    padding:13px 15px;
    border-radius:14px;
    overflow:hidden;
    text-overflow:ellipsis;
}

.results #sources a:hover,
.sourceList a:hover{
    border-color:#444;
}


/* ============================================================
   ERROR
   ============================================================ */

.error{
    color:#ff806b;
}

.errorCard{
    padding:20px;
    background:#111;
    border:1px solid var(--line);
    border-radius:16px;
}

.errorCard strong{
    color:var(--white);
}

.errorCard p{
    color:var(--gray);
    margin-bottom:0;
}


/* ============================================================
   ENTITY PAGE
   ============================================================ */

.entityPage{
    max-width:1100px;
    margin:0 auto;
    padding:55px 22px 100px;
}

.entityHero{
    padding:45px 0 30px;
    border-bottom:1px solid var(--line);
}

.entityHero h1{
    font-size:clamp(48px,9vw,100px);
    line-height:.9;
    letter-spacing:-.075em;
    margin:0;
    max-width:1000px;
}

.entityRegion{
    color:var(--gray);
    font-size:14px;
    margin:25px 0 0;
}

.entityContent{
    max-width:850px;
    padding-top:25px;
}

.entitySummary{
    max-width:760px;
    color:var(--gray);
    font-size:19px;
    line-height:1.7;
}

.entityDetails{
    display:grid;
    gap:12px;
    margin-top:20px;
}

.entityDetail{
    padding:20px;
    border:1px solid var(--line);
    border-radius:16px;
}

.entityDetail small{
    display:block;
    margin-bottom:8px;
    color:var(--gray);
    font-size:11px;
    font-weight:700;
    letter-spacing:.1em;
    text-transform:uppercase;
}

.entityDetail p{
    margin:0;
    line-height:1.65;
}

.entityAnswer{
    white-space:pre-wrap;
    line-height:1.75;
    background:#111;
    border:1px solid var(--line);
    border-radius:20px;
    padding:25px;
}

.entityAnswer.error{
    color:#ff806b;
}

.entitySources{
    margin-top:30px;
    padding-top:10px;
}

.entitySources a{
    display:block;
    color:#fff;
    text-decoration:none;
    border:1px solid var(--line);
    border-radius:14px;
    padding:13px 15px;
    margin-top:8px;
    overflow:hidden;
    text-overflow:ellipsis;
}

.entitySources a:hover{
    border-color:#444;
}

.entityBack{
    margin-top:35px;
}

.entityBack a{
    display:inline-block;
    color:#090909;
    background:var(--yellow);
    text-decoration:none;
    border-radius:999px;
    padding:10px 15px;
    font-size:13px;
    font-weight:900;
}

.entityFooter{
    margin-top:55px;
    padding-top:25px;
    border-top:1px solid var(--line);
}

.entityFooter a{
    color:var(--white);
    font-weight:700;
    text-decoration:none;
}

.entityFooter p{
    color:var(--gray);
}

.entityNotFound{
    padding:100px 0;
}


/* ============================================================
   CONNECT2 FOOTER
   ============================================================ */

.connect2-footer{
    padding:42px 20px 110px;
    margin-top:20px;
    text-align:center;
    border-top:1px solid rgba(255,255,255,.08);
}

.footer-brand{
    font-size:15px;
    letter-spacing:.02em;
}

.footer-brand strong{
    font-weight:700;
}

.footer-brand span{
    opacity:.55;
}

.footer-tagline{
    margin:8px 0 20px;
    opacity:.65;
    font-size:13px;
}

.footer-links{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px 18px;
    margin-bottom:18px;
}

.footer-links a{
    color:inherit;
    text-decoration:none;
    opacity:.65;
    font-size:12px;
}

.footer-links a:hover{
    opacity:1;
}

.footer-copy{
    margin:0 0 14px;
    opacity:.45;
    font-size:11px;
}

.footer-disclaimer{
    max-width:720px;
    margin:0 auto;
    opacity:.45;
    font-size:11px;
    line-height:1.6;
}

.footer-disclaimer strong{
    opacity:.8;
}


/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */

nav{
    position:fixed;
    z-index:5;
    bottom:0;
    left:0;
    right:0;
    height:68px;
    background:rgba(10,10,10,.94);
    border-top:1px solid var(--line);
    display:flex;
    justify-content:center;
    gap:min(12vw,100px);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
}

nav a{
    color:#777;
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    font-size:19px;
    min-width:48px;
}

nav a span{
    font-size:9px;
    margin-top:2px;
    letter-spacing:.05em;
}

nav a.active{
    color:var(--yellow);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media(max-width:650px){

    .app{
        padding-bottom:74px;
    }

    header{
        height:64px;
        padding:0 16px;
    }

    .logo{
        font-size:23px;
    }

    .logo b{
        font-size:28px;
    }

    .hero{
        padding:48px 18px 30px;
    }

    .hero h1{
        font-size:clamp(52px,15vw,82px);
    }

    .sub{
        font-size:16px;
        margin:28px 0;
    }

    .hero form{
        flex-wrap:wrap;
        border-radius:17px;
        padding:6px;
    }

    .hero form>span{
        display:none;
    }

    .hero form input{
        width:100%;
        padding:14px 10px;
    }

    .hero form button{
        width:100%;
        border-radius:13px;
        padding:14px;
    }

    .chips{
        gap:6px;
    }

    .chips button{
        font-size:11px;
        padding:7px 10px;
    }


    /* --------------------------------------------
       THREE DIMENSIONS
       -------------------------------------------- */

    .tri{
        grid-template-columns:1fr;
        margin-top:60px;
        padding:0 18px;
    }

    .tri article,
    .tri article+article{
        padding:20px 0;
        border-right:0;
        border-bottom:1px solid var(--line);
    }

    .tri article:last-child{
        border-bottom:0;
    }

    .tri h2{
        font-size:27px;
    }


    /* --------------------------------------------
       RESULTS
       -------------------------------------------- */

    .results{
        padding:35px 18px 60px;
    }

    .resultTop{
        align-items:flex-start;
        flex-direction:column;
    }

    .resultTop h2{
        font-size:clamp(32px,10vw,50px);
    }


    /* --------------------------------------------
       ENTITY CARD
       -------------------------------------------- */

    .entityCard{
        margin-top:20px;
        padding:17px;
        border-radius:15px;
    }

    .entityCardBody{
        display:block;
    }

    .entityCardName{
        font-size:21px;
    }

    .entityCardDescription{
        font-size:13px;
    }

    .entityCardLink{
        margin-top:16px;
    }


    /* --------------------------------------------
       AI ANSWER
       -------------------------------------------- */

    .aiAnswerContent p{
        line-height:1.68;
    }


    /* --------------------------------------------
       ENTITY PAGE
       -------------------------------------------- */

    .entityPage{
        padding:30px 18px 110px;
    }

    .entityHero{
        padding:25px 0 30px;
    }

    .entityHero h1{
        font-size:clamp(46px,14vw,76px);
    }

    .entitySummary{
        font-size:17px;
    }

    .entityAnswer{
        padding:20px;
        font-size:15px;
    }

    .entityNotFound{
        padding:70px 0;
    }


    /* --------------------------------------------
       FOOTER
       -------------------------------------------- */

    .connect2-footer{
        padding:35px 18px 100px;
    }


    /* --------------------------------------------
       BOTTOM NAV
       -------------------------------------------- */

    nav{
        height:64px;
        gap:12vw;
    }

    nav a{
        font-size:18px;
    }

}

#connect2MusicButton {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;

    width: 46px;
    height: 46px;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);

    font-size: 21px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    -webkit-tap-highlight-color: transparent;
}

#connect2MusicButton:active {
    transform: scale(0.94);
}


/* ============================================================
   SMALL PHONES
   ============================================================ */

@media(max-width:380px){

    .hero h1{
        font-size:50px;
    }

    .entityCardName{
        font-size:20px;
    }

    .entityCardLink{
        width:100%;
        justify-content:center;
    }

    .resultTop h2{
        font-size:31px;
    }

}

/* ============================================================
   CONNECT2 AUTH
   ============================================================ */

.connect2-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.connect2-auth-login,
.connect2-auth-logout {
    cursor: pointer;
    border: 1px solid currentColor;
    background: transparent;
    padding: 8px 13px;
    border-radius: 999px;
    font: inherit;
}

.connect2-auth-user {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
}

.connect2-auth-email {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.connect2-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
}

.connect2-auth-overlay[hidden] {
    display: none;
}

.connect2-auth-modal {
    position: relative;
    width: min(420px, 100%);
    box-sizing: border-box;
    padding: 30px;
    border-radius: 18px;
    background: #ffffff;
    color: #111111;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
}

.connect2-auth-modal h2 {
    margin: 0 0 8px;
}

.connect2-auth-subtitle {
    margin: 0 0 22px;
    opacity: 0.75;
}

.connect2-auth-modal label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.connect2-auth-modal input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    margin-bottom: 14px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    font: inherit;
}

.connect2-auth-modal form > button {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.connect2-auth-close {
    position: absolute;
    top: 10px;
    right: 13px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.connect2-auth-back {
    margin-top: 9px;
    background: transparent !important;
    border: 1px solid #cccccc !important;
}

.connect2-auth-message {
    min-height: 22px;
    margin-top: 16px;
    font-size: 14px;
}

@media (max-width: 700px) {

    .connect2-auth {
        margin-left: 5px;
    }

    .connect2-auth-email {
        display: none;
    }

    .connect2-auth-modal {
        padding: 24px 20px;
    }
}