:root{
    --border: #e3e3e3;
    --border-focus: #999;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --link: #2563eb;
    --url: #1a6b1a;
    --radius: 14px;
}
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body{
    background:#ffffff;
    color:var(--text);
    display:flex;
    flex-direction:column;
    align-items:center;
    min-height:100vh;
}
.hero{
    min-height:70vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:min(600px,90%);
    display:flex;
    flex-direction:column;
    align-items:center;
}
h1{
    text-align:center;
    font-size:56px;
    font-weight:700;
    letter-spacing:-0.02em;
    margin-bottom:32px;
}

/* Single merged pill, matching DuckDuckGo's search bar shape — an icon
   button embedded inside the input's own rounded border, not a separate
   rectangular button sitting beside it. */
.search-box{
    display:flex;
    align-items:center;
    width:100%;
    border:1.5px solid var(--border);
    border-radius:999px;
    padding:4px 4px 4px 20px;
    transition:border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within{
    border-color:var(--border-focus);
    box-shadow:0 1px 6px rgba(0,0,0,0.08);
}
input{
    flex:1;
    border:none;
    outline:none;
    font-size:17px;
    padding:14px 8px;
    background:transparent;
}
input::placeholder{
    color:#999;
}
button{
    display:flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:black;
    color:white;
    flex-shrink:0;
}
button:hover{
    background:#222;
}
button svg{
    width:18px;
    height:18px;
}

#micButton{
    background:transparent;
    color:#666;
    width:38px;
    height:38px;
}
#micButton:hover{
    background:#f0f0f0;
    color:var(--text);
}
#micButton.listening{
    color:#dc2626;
}
#micButton.listening svg{
    animation:pulse 1.2s ease-in-out infinite;
}
@keyframes pulse{
    0%,100%{ opacity:1; }
    50%{ opacity:0.4; }
}
.mic-error{
    margin-top:10px;
    font-size:13px;
    color:var(--text-muted);
    text-align:center;
}

.page-count{
    margin-top:14px;
    font-size:13px;
    color:var(--text-muted);
    text-align:center;
}

#results{
    width:min(700px,90%);
    margin-top:48px;
    margin-bottom:60px;
}
.result{
    margin-bottom:28px;
    padding-bottom:20px;
    border-bottom:1px solid #f0f0f0;
}
.result a{
    font-size:20px;
    font-weight:500;
    color:var(--link);
    text-decoration:none;
}
.result a:hover{
    text-decoration:underline;
}
.result p{
    margin-top:8px;
    line-height:1.55;
    color:var(--text);
}
.result .url{
    color:var(--url);
    font-size:13px;
    margin-top:4px;
}
.pagination{
    display:flex;
    gap:10px;
    margin-top:30px;
    justify-content:center;
}
.pagination button{
    width:auto;
    height:auto;
    border-radius:10px;
    padding:10px 22px;
    font-size:14px;
}
.sitelinks{
    margin-top:14px;
    margin-left:20px;
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:8px 24px;
}
.sitelink{
    min-width:0;
}
.sitelink a,
.sitelink .url{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sitelink a{
    font-size:15px;
    color:var(--link);
    text-decoration:none;
}
.sitelink .url{
    color:var(--url);
    font-size:12px;
    margin-top:2px;
}

/* Sponsored Results block */
.sponsored-block{
    margin-bottom:36px;
}
.sponsored-title{
    font-size:13px;
    color:var(--text-muted);
    margin-bottom:10px;
}
.sponsored-divider{
    border:none;
    border-top:1px solid #f0f0f0;
    margin-bottom:4px;
}
.sponsored-list{
    display:none;
}
.sponsored-list.expanded{
    display:block;
}
.sponsored-item{
    margin-top:18px;
}
.sponsored-meta{
    display:flex;
    align-items:center;
    gap:8px;
}
.sponsored-icon{
    width:20px;
    height:20px;
    border-radius:50%;
    object-fit:cover;
    background:#f0f0f0;
}
.sponsored-sitename{
    font-size:13px;
    color:var(--text-muted);
}
.sponsored-url{
    color:var(--url);
    font-size:12px;
    margin-left:28px;
    margin-top:2px;
}
.sponsored-headline{
    display:block;
    margin-left:28px;
    margin-top:4px;
    font-size:18px;
    font-weight:500;
    color:var(--link);
    text-decoration:none;
}
.sponsored-headline:hover{
    text-decoration:underline;
}
.sponsored-toggle{
    width:auto;
    height:auto;
    display:flex;
    align-items:center;
    gap:6px;
    margin:16px auto 0;
    padding:9px 20px;
    border-radius:999px;
    border:1px solid var(--border);
    background:#fafafa;
    color:var(--text);
    font-size:13px;
}
.sponsored-toggle:hover{
    background:#f2f2f2;
}
.sponsored-toggle .chevron{
    display:inline-block;
    transition:transform 0.2s ease;
}
.sponsored-toggle.expanded .chevron{
    transform:rotate(180deg);
}

/* Mobile: the fixed 100px+ side ad rails have nowhere to go on a narrow
   screen — they were overlapping the hero/search box directly on top of
   the actual content. Side-rail ads are inherently a wide-viewport
   pattern (same reason A-ADS's own snippet only made sense at desktop
   widths), so they're hidden below this breakpoint rather than squeezed
   into a size where they'd still collide with content. */
@media (max-width: 1000px){
    .privadcy-ad-slot{
        display:none;
    }
    .hero{
        width:92%;
    }
    h1{
        font-size:40px;
    }
    .search-box{
        padding:4px 4px 4px 16px;
    }
    input{
        font-size:16px; /* below 16px, iOS Safari auto-zooms on focus */
        padding:12px 6px;
    }
    button{
        width:40px;
        height:40px;
    }
    #results{
        margin-top:32px;
        width:92%;
    }
    .result a{
        font-size:18px;
    }
    .sponsored-headline{
        font-size:16px;
    }
    .pagination{
        flex-wrap:wrap;
    }
}
