/* === Design Tokens — Editorial / Paper === */
:root {
    --ink: #1a1a14;
    --ink-soft: #3d3a32;
    --ink-muted: #6b6758;
    --ink-faint: #9a9582;
    --surface: #fdfaf3;
    --surface-warm: #f8f4ec;
    --surface-hover: #f2ecdb;
    --border: #e5ddc8;
    --border-light: #efe9d9;
    --primary: #1d4ed8;
    --primary-hover: #1e3a8a;
    --primary-soft: #e6ecf9;
    --green: #166534;
    --green-soft: #e6f2e8;
    --accent: #b45309;
    --radius: 4px;
    --radius-lg: 6px;
    --shadow-sm: 0 1px 2px rgba(60,50,30,0.05);
    --shadow-md: 0 2px 10px rgba(60,50,30,0.07);
    --shadow-lg: 0 6px 22px rgba(60,50,30,0.09);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
    --max-w: 860px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--surface-warm);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.04  0 0 0 0.028 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === Header === */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-logo img { height: 26px; width: auto; }
.logo-dark { display: none; }
html.dark .logo-light { display: none; }
html.dark .logo-dark  { display: inline; }
.search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--surface-warm);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    padding: 0 6px 0 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.search-form input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 10px 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    min-width: 0;
}
.search-form input[type="text"]::placeholder { color: var(--ink-faint); }
.search-form button {
    background: var(--primary);
    border: none;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 100px;
    font-size: 0;
    line-height: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}
.search-form button:hover { background: var(--primary-hover); }
.search-form button svg { width: 16px; height: 16px; fill: #fff; }

/* Theme Toggle */
.theme-toggle {
    background: var(--surface-warm);
    border: 1px solid var(--border);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.theme-toggle:hover { background: var(--surface-hover); border-color: var(--ink-faint); }
.theme-toggle svg { fill: var(--ink-soft); }
.theme-icon-dark { display: none; }
html.dark .theme-icon-light { display: none; }
html.dark .theme-icon-dark { display: flex; }
.landing-theme-toggle { position: absolute; top: 20px; right: 20px; z-index: 10; }

/* Quick-access bar */
.quick-bar { background: var(--surface); border-bottom: 1px solid var(--border-light); }
.quick-bar:empty { display: none; }
.quick-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.quick-bar-inner::-webkit-scrollbar { display: none; }
.quick-chip {
    display: inline-block;
    padding: 5px 14px;
    background: var(--surface-warm);
    border-radius: 100px;
    font-size: 12px;
    color: var(--ink-soft);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
    font-weight: 500;
    border: 1px solid var(--border);
}
.quick-chip:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* === Background Canvas === */
.results-main { position: relative; overflow: hidden; min-height: calc(100vh - 60px); }
.bg-canvas {
    display: none;
}

/* === Main Content === */
.content-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* === Results Intro === */
.results-intro {
    padding: 24px 0 8px;
}
.results-intro-top {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.results-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 48, "SOFT" 30;
    letter-spacing: -0.02em;
}
.trust-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.trust-item {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
    white-space: nowrap;
}
.trust-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ink-faint);
    flex-shrink: 0;
}
.results-context {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.5;
    max-width: 600px;
}
.price-tag {
    color: var(--green);
    font-weight: 600;
}

/* === Urgency Strip - toned down === */
.urgency-strip {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
    padding: 4px 0;
}
.urgency-strip::before {
    content: '';
}

/* === Filter Pills === */
.filter-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
    display: inline-block;
    padding: 6px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
.filter-pill--active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.filter-pill--active:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

/* === PLA / Product Ads === */
.pla-section { margin-bottom: 20px; }
.pla-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}
.pla-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.pla-scroll::-webkit-scrollbar { display: none; }
.pla-card {
    display: flex;
    flex-direction: column;
    min-width: 155px;
    max-width: 185px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--border);
}
.pla-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}
.pla-image {
    width: 100%;
    height: 130px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-warm);
}
.pla-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding: 12px;
}
.pla-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.pla-title {
    font-size: 13px;
    line-height: 1.35;
    color: var(--ink);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pla-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
    margin-top: 2px;
}
.pla-seller { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.pla-rating img { height: 12px; width: auto; display: inline; margin-top: 2px; }

/* === Buyer Tip === */
.buyer-tip {
    font-size: 13px;
    color: var(--ink-muted);
    padding: 8px 0;
    font-weight: 400;
    border-top: 1px solid var(--border-light);
    margin-bottom: 4px;
}

/* === Text Ad Listings === */
.ad-listing {
    display: block;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    margin-bottom: 8px;
    transition: all 0.15s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: visible;
}
.ad-listing:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-1px);
}
/* Subtle chevron on hover */
.ad-listing::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--ink-faint);
    border-bottom: 2px solid var(--ink-faint);
    transform: translateY(-50%) rotate(-45deg);
    transition: all 0.2s;
    opacity: 0;
}
.ad-listing:hover::after {
    opacity: 1;
    border-color: var(--primary);
    right: 14px;
}
.ad-url-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.ad-favicon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--surface-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ad-favicon { width: 14px; height: 14px; border-radius: 2px; }
.ad-domain {
    color: var(--green);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}
.ad-badge {
    font-size: 10px;
    color: var(--ink-faint);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    flex-shrink: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.ad-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary);
    margin-bottom: 4px;
    word-wrap: break-word;
    transition: color 0.15s;
}
.ad-title a { color: inherit; text-decoration: none; }
.ad-listing:hover .ad-title,
.ad-listing:hover .ad-title a { color: var(--primary-hover); text-decoration: underline; }
.ad-description {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-muted);
    word-wrap: break-word;
}
.ad-annotation {
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ad-rating { margin-top: 5px; }
.ad-rating img { height: 14px; width: auto; display: inline; }

/* Top Result - subtle, not shouty */
.ad-top-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ad-listing--top { border-color: var(--border); }
.ad-listing--top:hover { border-color: var(--primary); }

/* CTA Button - subtle, not aggressive */
.ad-cta { margin-top: 10px; display: flex; }
.ad-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 18px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
    position: relative;
}
.ad-cta-btn svg { width: 14px; height: 14px; fill: #fff; transition: transform 0.22s ease; }
.ad-listing:hover .ad-cta-btn {
    background: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
    transform: translateX(5px);
}
.ad-listing:hover .ad-cta-btn svg { transform: translateX(2px); }

/* Desktop (≥600px): float CTA to the right, vertically centered.
   Mobile: CTA stays in flow below description (see default rules above). */
@media (min-width: 600px) {
    .ad-listing { padding-right: 130px; }
    .ad-cta {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
    }
    /* Hover chevron collides with CTA button — hide on desktop */
    .ad-listing::after { display: none; }
}

/* === Animated gradient border (Gemini-style): activates on hover, cools down on leave === */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes ad-border-spin {
    to { --border-angle: 360deg; }
}
.ad-listing::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: calc(var(--radius-lg) + 1.5px);
    padding: 1.5px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0%,
        transparent 55%,
        #2563eb 70%,
        #8b5cf6 82%,
        #ec4899 92%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.55s ease-out;
    animation: ad-border-spin 3s linear infinite;
    animation-play-state: paused;
}
.ad-listing:hover::before {
    opacity: 1;
    animation-play-state: running;
    transition: opacity 0.18s ease-in;
}

/* Top ad: slow always-on shimmer at rest, brightens + speeds up on hover */
.ad-listing--top::before {
    opacity: 0.42;
    animation-duration: 6s;
    animation-play-state: running;
    transition: opacity 0.35s ease;
}
.ad-listing--top:hover::before {
    opacity: 1;
    animation-duration: 3s;
}
/* When another (non-top) ad is being hovered, dim the top ad's always-on shimmer
   so attention isn't split. Uses :has() — supported in all modern browsers. */
.content-wrap:has(.ad-listing:not(.ad-listing--top):hover) .ad-listing--top::before {
    opacity: 0;
}

/* Fallback for browsers without @property (pre-2024 Firefox): static gradient, no motion */
@supports not (background: conic-gradient(from 0deg, red)) {
    .ad-listing::before { display: none; }
}

/* Respect prefers-reduced-motion: no rotation; keep a static gradient ring on hover */
@media (prefers-reduced-motion: reduce) {
    .ad-listing::before {
        animation: none;
        background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 50%, #ec4899 100%);
    }
    .ad-listing--top::before { opacity: 0.42; }
    .ad-listing:hover::before { opacity: 1; }
}

/* Sitelinks */
.ad-sitelinks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 20px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.ad-sitelink {
    font-size: 13px;
    color: var(--primary);
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.1s;
}
.ad-sitelink::before {
    content: '\203A';
    color: var(--ink-faint);
    font-size: 14px;
    flex-shrink: 0;
}
.ad-sitelink:hover { color: var(--primary-hover); text-decoration: underline; }

/* Show More */
.show-more-wrap { text-align: center; padding: 12px 0 4px; }
.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    color: var(--ink-soft);
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.15s;
}
.show-more-btn:hover { border-color: var(--primary); color: var(--primary); }

/* === Related Searches === */
.related-section { padding: 20px 0 8px; margin-top: 8px; }
.related-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}
.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.related-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    transition: all 0.15s;
    overflow: hidden;
    min-width: 0;
}
.related-chip span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}
.related-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
.related-chip svg {
    width: 14px;
    height: 14px;
    fill: var(--ink-faint);
    flex-shrink: 0;
    transition: fill 0.15s;
}
.related-chip:hover svg { fill: var(--primary); }

/* === Also Searched === */
.also-searched-section { padding: 16px 0 8px; }
.also-searched-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}
.also-searched-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* === FAQ Section === */
.faq-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.faq-heading {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.faq-item h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
    letter-spacing: -0.005em;
}
.faq-item p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-muted);
    margin: 0;
}

/* === No Results === */
.no-results { text-align: center; padding: 60px 16px; color: var(--ink-muted); }
.no-results h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }

/* === Landing Page === */
.landing {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 680px;
    margin: 0 auto;
}
.landing .logo-large img {
    height: 44px;
    width: auto;
    margin: 0 auto 16px;
}
.landing-greeting {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 500;
    font-style: italic;
    color: var(--ink);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    letter-spacing: -0.02em;
}
.landing-greeting:empty { display: none; }
.landing-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 17px;
    color: var(--ink-muted);
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 0.005em;
}

/* Weather */
.weather-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--ink-soft);
}
.weather-widget:empty { display: none; }
.weather-icon { font-size: 18px; line-height: 1; }
.weather-temp { font-weight: 600; color: var(--ink); }
.weather-desc { color: var(--ink-muted); }

/* Trending */
.trending-section { text-align: left; margin-bottom: 24px; }
.trending-header { margin-bottom: 10px; }
.trending-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.trending-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--ink);
    transition: all 0.15s;
}
.trending-chip:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.trending-chip-query { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trending-chip-meta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    flex-shrink: 0;
}
.trending-chip-meta svg { fill: var(--primary); }

/* Daily Tip */
.daily-tip { margin-bottom: 24px; }
.daily-tip:empty { display: none; }
.tip-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    text-align: left;
}
.tip-icon {
    width: 28px; height: 28px;
    background: var(--primary-soft);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tip-icon svg { width: 16px; height: 16px; fill: var(--primary); }
.tip-text { font-size: 13px; line-height: 1.5; color: var(--ink-soft); flex: 1; }

/* Landing Search */
.search-form-large-wrap {
    position: relative;
    max-width: 540px;
    margin: 0 auto 32px;
}
.landing .search-form-large {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 100px;
    padding: 0 8px 0 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}
.landing .search-form-large:focus-within {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.landing .search-form-large input {
    flex: 1; border: none; outline: none;
    font-size: 16px; padding: 14px 0;
    background: transparent; min-width: 0;
    color: var(--ink);
    font-family: var(--font-body);
}
.landing .search-form-large input::placeholder { color: var(--ink-faint); }
.landing .search-form-large button {
    background: var(--primary);
    border: none; cursor: pointer;
    padding: 10px 14px;
    font-size: 0; flex-shrink: 0;
    border-radius: 100px;
    transition: background 0.15s;
}
.landing .search-form-large button:hover { background: var(--primary-hover); }
.landing .search-form-large button svg { width: 20px; height: 20px; fill: #fff; }

/* Search Suggestions */
.search-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow: hidden;
}
.suggestion-item {
    display: flex; align-items: center;
    gap: 12px; padding: 11px 18px;
    font-size: 14px; color: var(--ink);
    transition: background 0.1s; cursor: pointer;
}
.suggestion-item:hover { background: var(--surface-warm); }
.suggestion-item svg { width: 16px; height: 16px; fill: var(--ink-faint); flex-shrink: 0; }

/* Section Labels */
.section-label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0;
    text-transform: none;
}

/* Recent Searches */
.recent-section { text-align: left; margin-bottom: 32px; }
.recent-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 10px;
}
.clear-history-btn {
    background: none; border: none;
    font-size: 12px; color: var(--ink-faint);
    cursor: pointer; padding: 2px 6px;
    border-radius: 4px; transition: color 0.1s;
    font-family: var(--font-body);
}
.clear-history-btn:hover { color: var(--primary); }
.recent-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip {
    display: inline-flex; align-items: center;
    gap: 8px; padding: 8px 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 100px; font-size: 13px;
    color: var(--ink-soft); transition: all 0.15s;
}
.recent-chip:hover { border-color: var(--primary); color: var(--primary); }
.recent-chip svg { width: 14px; height: 14px; fill: var(--ink-faint); flex-shrink: 0; }
.recent-chip:hover svg { fill: var(--primary); }
.recent-section--results {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Categories */
.categories-section { text-align: left; }
.categories-section > .section-label { display: block; margin-bottom: 12px; }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: left;
    transition: all 0.15s;
}
.category-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.category-header {
    display: flex; align-items: center;
    gap: 10px; margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
.category-icon {
    width: 32px; height: 32px;
    background: var(--primary-soft);
    border-radius: 8px;
    display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.category-icon svg { width: 18px; height: 18px; fill: var(--primary); }
.category-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.category-links { display: flex; flex-direction: column; gap: 1px; }
.category-links a {
    font-size: 13px; color: var(--ink-soft);
    padding: 5px 0; transition: color 0.1s;
    display: block; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.category-links a:hover { color: var(--primary); }

/* === Footer === */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 24px 20px;
    margin-top: 40px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; text-align: center; }
.footer-links {
    display: flex; justify-content: center;
    flex-wrap: wrap; gap: 6px 24px; margin-bottom: 14px;
}
.footer-links a { font-size: 13px; color: var(--ink-muted); transition: color 0.1s; }
.footer-links a:hover { color: var(--primary); }
.footer-copyright { font-size: 11px; color: var(--ink-faint); line-height: 1.6; }

/* === Cookie Consent === */
.cookie-notice {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--ink);
    color: rgba(255,255,255,0.85);
    padding: 12px 20px;
    display: flex; align-items: center;
    justify-content: center; gap: 16px;
    z-index: 200; font-size: 13px;
}
.cookie-notice p { margin: 0; }
.cookie-notice button {
    background: var(--primary); color: #fff;
    border: none; border-radius: 6px;
    padding: 7px 18px; font-size: 13px;
    font-weight: 500; cursor: pointer;
    white-space: nowrap; transition: background 0.15s;
    font-family: var(--font-body);
}
.cookie-notice button:hover { background: var(--primary-hover); }
.cookie-hidden { display: none !important; }

/* === Freestar Injected Content === */
.content-wrap .related_search,
.content-wrap .related_sidebar,
.content-wrap .rh_list1 { margin-top: 20px; padding: 0; }
.content-wrap .related_searches_title {
    font-size: 12px; font-weight: 600;
    color: var(--ink-muted); text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 12px;
}
.content-wrap .related_search ul,
.content-wrap .related_sidebar ul,
.content-wrap .rh_list1 ul {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 6px; padding: 0; margin: 0; list-style: none;
}
.content-wrap .related_search li,
.content-wrap .related_sidebar li,
.content-wrap .rh_list1 li { list-style: none; margin: 0; padding: 0; }
.content-wrap .related_search li a,
.content-wrap .related_sidebar li a,
.content-wrap .rh_list1 li a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 13px;
    color: var(--ink-soft); font-weight: 500;
    transition: all 0.15s; text-decoration: none;
}
.content-wrap .related_search li a:hover,
.content-wrap .related_sidebar li a:hover,
.content-wrap .rh_list1 li a:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-soft);
}
.content-wrap .left-sec,
.content-wrap .right-sec { width: 100%; display: block; padding: 0; }
.content-wrap .left-sec li,
.content-wrap .right-sec li { width: 100%; float: none; margin: 0 0 8px 0; }
.content-wrap .displaybottom { display: none; }
.content-wrap .slinks-list {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2px 20px; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--border-light); overflow: visible;
}
.content-wrap .slinks-list ul { display: contents; }
.content-wrap .slinks-list li {
    list-style: none; width: 100% !important;
    float: none !important; margin: 0 !important;
    padding: 3px 0; display: flex; align-items: center;
    gap: 6px; font-size: 13px;
}
.content-wrap .slinks-list li::before {
    content: '\203A'; color: var(--ink-faint);
    font-size: 14px; flex-shrink: 0;
}
.content-wrap .slinks-list li a {
    color: var(--primary); text-decoration: none; font-size: 13px;
}
.content-wrap .slinks-list li a:hover { color: var(--primary-hover); text-decoration: underline; }

/* === Debug === */
.debug-output {
    max-width: var(--max-w); margin: 24px auto; padding: 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: 'Courier New', monospace; font-size: 12px;
    overflow-x: auto; white-space: pre-wrap; word-break: break-all;
    color: var(--ink-muted);
}

/* === Responsive === */
@media (min-width: 600px) {
    .pla-scroll { display: grid; grid-template-columns: repeat(3, 1fr); overflow-x: visible; }
    .pla-card { min-width: 0; max-width: none; }
    .related-grid { grid-template-columns: 1fr 1fr 1fr; }
    .also-searched-grid { grid-template-columns: 1fr 1fr 1fr; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .content-wrap .related_search ul,
    .content-wrap .related_sidebar ul,
    .content-wrap .rh_list1 ul { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 960px) {
    .header-inner, .footer-inner, .content-wrap { max-width: var(--max-w); }
    .pla-scroll { grid-template-columns: repeat(4, 1fr); }
    .related-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .also-searched-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
@media (max-width: 599px) {
    .landing { padding-top: 40px; }
    .categories-grid { grid-template-columns: 1fr; }
    .results-title { font-size: 20px; }
    .results-intro-top { flex-direction: column; gap: 4px; }
    .faq-grid { grid-template-columns: 1fr; }
    .cookie-notice { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 399px) {
    .header-logo img { height: 22px; }
    .header-inner { gap: 12px; padding: 10px 14px; }
    .ad-listing { padding: 14px; }
    .ad-title { font-size: 16px; }
    .pla-card { min-width: 135px; }
    .related-chip { font-size: 12px; padding: 8px 12px; }
}

/* === Dark Mode === */
html.dark {
    --ink: #ede8dc; --ink-soft: #c2bcad; --ink-muted: #a59e8a; --ink-faint: #6b6553;
    --surface: #1e1a14;         /* card — visibly lighter than body */
    --surface-warm: #0d0b09;    /* body — deep */
    --surface-hover: #2b2619;
    --border: #3a3528;
    --border-light: #2a2619;
    --primary: #6196f3; --primary-hover: #8ab3f8; --primary-soft: #1a2640;
    --green: #4ade80; --green-soft: #0d2620;
    --accent: #e89149;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.45);
    --shadow-md: 0 3px 12px rgba(0,0,0,0.55);
    --shadow-lg: 0 8px 26px rgba(0,0,0,0.65);
}
html.dark body { background-color: var(--surface-warm); color: var(--ink); }
html.dark .site-header {
    background: rgba(13,11,9,0.92); border-color: var(--border);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}
html.dark .search-form { background: var(--surface); border-color: var(--border); }
html.dark .search-form:focus-within { background: var(--surface-hover); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(97,150,243,0.18); }
html.dark .search-form input[type="text"] { color: var(--ink); }
html.dark .search-form button { background: var(--primary); }
html.dark .theme-toggle { background: var(--surface); border-color: var(--border); }
html.dark .theme-toggle:hover { background: var(--surface-hover); }
html.dark .theme-toggle svg { fill: #fbbf24; }
html.dark .ad-listing { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
html.dark .ad-listing:hover { background: var(--surface-hover); border-color: var(--primary); box-shadow: var(--shadow-md); }
html.dark .ad-favicon-wrap { background: var(--surface-hover); }
html.dark .ad-listing::after { border-color: var(--ink-muted); }
html.dark .ad-listing:hover::after { border-color: var(--primary); }
html.dark .ad-sitelinks { border-color: var(--border); }
html.dark .content-wrap .slinks-list { border-color: var(--border); }
html.dark .ad-top-badge { background: var(--primary-soft); color: var(--primary-hover); }
html.dark .ad-listing--top { border-color: var(--border); background: var(--surface); }
html.dark .ad-listing--top:hover { border-color: var(--primary); }
html.dark .pla-card { background: var(--surface); border-color: var(--border); }
html.dark .pla-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
html.dark .pla-image { background: var(--surface-hover); }
html.dark .faq-section { border-color: var(--border); }
html.dark .faq-item { background: var(--surface); border-color: var(--border); }
html.dark .related-chip { background: var(--surface); border-color: var(--border); }
html.dark .related-chip:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-hover); }
html.dark .filter-pill { border-color: var(--border); color: var(--ink-soft); background: var(--surface); }
html.dark .filter-pill:hover { border-color: var(--primary); color: var(--primary-hover); background: var(--primary-soft); }
html.dark .filter-pill--active { background: var(--primary); border-color: var(--primary); color: #fff; }
html.dark .show-more-btn { background: var(--surface); border-color: var(--border); color: var(--ink-soft); }
html.dark .show-more-btn:hover { border-color: var(--primary); color: var(--primary-hover); background: var(--surface-hover); }
html.dark .quick-bar { background: var(--surface); border-color: var(--border); }
html.dark .quick-chip { background: var(--surface); border-color: var(--border); color: var(--ink-soft); }
html.dark .quick-chip:hover { background: var(--primary-soft); color: var(--primary-hover); border-color: var(--primary); }
html.dark .recent-section--results { border-color: var(--border); }
html.dark .weather-widget { background: var(--surface); border-color: var(--border); }
html.dark .trending-chip { background: var(--surface); border-color: var(--border); }
html.dark .trending-chip:hover { border-color: var(--primary); background: var(--primary-soft); }
html.dark .tip-inner { background: var(--surface); border-color: var(--border); }
html.dark .tip-icon { background: var(--primary-soft); }
html.dark .landing .search-form-large { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-md); }
html.dark .landing .search-form-large:focus-within { border-color: var(--primary); }
html.dark .landing .search-form-large input { color: var(--ink); }
html.dark .search-suggestions { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-lg); }
html.dark .suggestion-item:hover { background: var(--surface-hover); }
html.dark .category-card { background: var(--surface-warm); border-color: var(--border); }
html.dark .category-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.3); border-color: transparent; }
html.dark .category-header { border-color: var(--border); }
html.dark .category-icon { background: var(--primary-soft); }
html.dark .site-footer { background: var(--surface-warm); border-color: var(--border); }
html.dark .cookie-notice { background: var(--surface-warm); }
html.dark .debug-output { background: var(--surface-warm); border-color: var(--border); }
html.dark .content-wrap .related_search li a,
html.dark .content-wrap .related_sidebar li a,
html.dark .content-wrap .rh_list1 li a { background: var(--surface-warm); border-color: var(--border); color: var(--ink-muted); }
html.dark .content-wrap .related_search li a:hover,
html.dark .content-wrap .related_sidebar li a:hover,
html.dark .content-wrap .rh_list1 li a:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
html.dark .content-wrap .slinks-list li a { color: var(--primary); }
html.dark .content-wrap .slinks-list li a:hover { color: var(--primary-hover); }

/* Sponsored results label (feed T&C / FTC ad labelling) */
.sponsored-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 2px 0 10px;
}

/* Larger legitimate tap target on mobile (whole-card click is prohibited by feed T&Cs) */
@media (max-width: 640px) {
    .ad-cta-btn {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
    }
}
