:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --text: #14213d;
    --muted: #61708a;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #dbe4f0;
    --shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    padding: 32px 18px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.app-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.hero {
    max-width: 780px;
    margin: 30px auto 34px;
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    font-size: 0.92rem;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.eyebrow,
.section-label {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.25rem, 7vw, 4.65rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.hero-description {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.18rem);
}

.search-card {
    padding: 28px;
    border: 1px solid rgba(219, 228, 240, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.search-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 750;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-row input {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-row button {
    min-height: 58px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.search-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.search-row button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.example-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.example-button {
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.example-button:hover {
    border-color: var(--primary);
    background: #e3edff;
}

.status {
    min-height: 28px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.results-section {
    padding: 52px 0 18px;
}

.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: clamp(1.65rem, 4vw, 2.3rem);
    letter-spacing: -0.025em;
}

.result-count {
    color: var(--muted);
    font-size: 0.9rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tool-card,
.welcome-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tool-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 22px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12);
}

.tool-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.tool-category {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 13px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
}

.tool-description {
    flex: 1;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.93rem;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 15px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.tool-link:hover {
    background: var(--primary);
}

.welcome-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 25px;
}

.welcome-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 1.25rem;
}

.welcome-card h3 {
    margin-bottom: 5px;
}

.welcome-card p {
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 38px;
    padding: 24px 0 10px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.84rem;
}

.site-footer a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 850px) {
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    body {
        padding: 20px 14px;
    }

    .hero {
        margin-top: 16px;
    }

    .search-card {
        padding: 19px;
    }

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

    .search-row button {
        width: 100%;
    }

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

    .results-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        gap: 8px;
    }
}