:root {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --text: #202124;
    --muted: #5f6368;
    --border: #dfe1e5;
    --border-soft: #edf0f2;
    --primary: #1a73e8;
    --primary-hover: #1558b0;
    --green: #188038;
    --card: #ffffff;
    --shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================
   TOP NAV HOMEPAGE
========================= */

.top-nav {
    width: 100%;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}

.top-nav .brand {
    margin-right: auto;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f3f4;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand-icon.small {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* =========================
   HOMEPAGE SEARCH
========================= */

.home-wrapper {
    min-height: calc(100vh - 130px);
    padding: 20px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-search {
    width: 100%;
    max-width: 720px;
    margin: 92px auto 40px;
    text-align: center;
}

.hero-logo {
    display: none;
}

.hero-search h1 {
    margin: 0 0 20px;
    font-size: clamp(58px, 9vw, 92px);
    line-height: 1;
    font-weight: 500;
    letter-spacing: -4px;
    color: var(--text);
}

.hero-search h1::first-letter {
    color: var(--primary);
}

.hero-search p {
    max-width: 620px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 15px;
}

.search-form {
    width: 100%;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.search-form:hover,
.search-form:focus-within {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.home-search-form {
    max-width: 620px;
    margin: 0 auto;
    height: 48px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 18px 0 22px;
    font-size: 16px;
    color: var(--text);
}

.search-form input::placeholder {
    color: #9aa0a6;
}

.search-form button {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    padding: 0 22px;
    height: 100%;
    cursor: pointer;
}

.search-form button:hover {
    color: var(--primary-hover);
}

.quick-links {
    margin-top: 26px;
    display: flex;
    justify-content: center;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}

.quick-links a:hover {
    text-decoration: underline;
}

/* =========================
   HOMEPAGE FEATURE GRID
========================= */

.feature-grid {
    width: 100%;
    max-width: 760px;
    margin: 20px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    text-align: left;
}

.feature-card h2 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   SEARCH PAGE HEADER
========================= */

.search-header {
    width: 100%;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-bottom: 1px solid var(--border-soft);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-brand {
    flex: 0 0 auto;
    font-size: 18px;
}

.search-page-form {
    max-width: 720px;
    height: 44px;
    flex: 1;
}

/* =========================
   SEARCH RESULTS
========================= */

.search-container {
    width: 100%;
    max-width: 860px;
    margin: 0;
    padding: 26px 24px 80px;
    margin-left: 120px;
}

.result-info {
    margin-bottom: 24px;
}

.result-info p {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 13px;
}

.result-info h1 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 400;
    color: var(--text);
}

.result-info span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.result-item {
    max-width: 720px;
    padding: 0;
    border: none;
    background: transparent;
}

.result-title {
    display: inline-block;
    color: #1a0dab;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 3px;
}

.result-title:hover {
    text-decoration: underline;
}

.result-url {
    color: var(--green);
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-all;
}

.result-snippet {
    color: #4d5156;
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.55;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f3f4;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.result-item.manual_result {
    padding: 14px 16px;
    border: 1px solid #d2e3fc;
    border-radius: 12px;
    background: #f8fbff;
}

.result-item.boosted_result {
    padding: 14px 16px;
    border: 1px solid #ceead6;
    border-radius: 12px;
    background: #f8fffb;
}

.manual-badge {
    background: #e8f0fe;
    color: #1967d2;
}

.boosted-badge {
    background: #e6f4ea;
    color: #137333;
}

/* =========================
   EMPTY STATE
========================= */

.empty-state {
    max-width: 560px;
    margin: 80px auto;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 34px 24px;
}

.empty-state h1,
.empty-state h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

/* =========================
   STATIC PAGES
========================= */

.page-container {
    max-width: 780px;
    margin: 48px auto 90px;
    padding: 0 24px;
}

.page-container h1 {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 500;
    letter-spacing: -1px;
    margin: 0 0 22px;
}

.page-container h2 {
    margin: 34px 0 10px;
    font-size: 22px;
    font-weight: 500;
}

.page-container p,
.page-container li {
    color: #3c4043;
    font-size: 16px;
}

.content-list {
    padding-left: 22px;
}

.faq-item {
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 0;
}

.faq-item h2 {
    margin: 0 0 8px;
}

/* =========================
   FOOTER
========================= */

.footer {
    padding: 24px 28px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}

.footer div {
    display: flex;
    gap: 16px;
}

.footer a:hover {
    text-decoration: underline;
}

.search-footer {
    margin-top: 40px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .search-container {
        margin-left: 70px;
    }
}

@media (max-width: 820px) {
    .top-nav {
        padding: 16px 18px;
    }

    .nav-links {
        gap: 14px;
        font-size: 13px;
    }

    .home-wrapper {
        padding: 16px 18px 50px;
    }

    .hero-search {
        margin-top: 72px;
    }

    .hero-search h1 {
        font-size: clamp(50px, 14vw, 76px);
        letter-spacing: -3px;
    }

    .home-search-form {
        height: 48px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .search-header {
        padding: 12px 16px;
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }

    .search-brand {
        width: fit-content;
    }

    .search-page-form {
        width: 100%;
        max-width: none;
        flex: none;
    }

    .search-container {
        margin-left: 0;
        max-width: none;
        padding: 22px 18px 70px;
    }

    .result-item {
        max-width: none;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .top-nav {
        justify-content: center;
        flex-direction: column;
        gap: 12px;
    }

    .top-nav .brand {
        margin-right: 0;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-search {
        margin-top: 48px;
    }

    .hero-search p {
        font-size: 14px;
    }

    .home-search-form {
        height: 46px;
    }

    .search-form input {
        font-size: 15px;
        padding-left: 16px;
    }

    .search-form button {
        padding: 0 16px;
    }

    .quick-links {
        flex-wrap: wrap;
    }

    .result-title {
        font-size: 18px;
    }

    .result-url,
    .result-snippet {
        font-size: 13px;
    }

    .page-container {
        margin-top: 32px;
        padding: 0 18px;
    }
}