:root {
    --purple: #6d35ac;
    --purple-dark: #4e1f86;
    --purple-soft: #f1eafb;
    --ink: #231b2d;
    --muted: #6e6875;
    --line: #e8e1ee;
    --white: #ffffff;
    --success: #177b4d;
    --success-soft: #e9f8f0;
    --warning: #8a5a00;
    --warning-soft: #fff5dc;
    --error: #a42b32;
    --error-soft: #fff0f1;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f8f5fb;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(109, 53, 172, 0.16), transparent 32rem),
        linear-gradient(180deg, #fbf9fd 0%, #f4eff9 100%);
}

button,
input {
    font: inherit;
}

.page-shell {
    width: min(100% - 32px, 720px);
    margin: 0 auto;
    padding: clamp(36px, 7vw, 72px) 0 32px;
}

.search-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 52px);
    border: 1px solid rgba(109, 53, 172, 0.13);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(68, 33, 103, 0.13);
}

.search-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(90deg, var(--purple), #9a5ada);
}

.brand {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--white);
    background: var(--purple);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow {
    margin-top: 22px;
    color: var(--purple);
    font-size: 0.86rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

h1 {
    max-width: 580px;
    margin: 8px 0 12px;
    font-size: clamp(2.1rem, 7vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.intro {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.6;
}

form {
    margin-top: 32px;
}

label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.93rem;
    font-weight: 750;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

input {
    width: 100%;
    min-height: 54px;
    padding: 0 17px;
    border: 2px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: var(--white);
    font-size: 1.05rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(109, 53, 172, 0.13);
}

button {
    min-height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: var(--purple);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(109, 53, 172, 0.24);
    transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

button:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.help,
.privacy-note {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.help {
    margin: 8px 0 0;
}

.status {
    display: none;
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.45;
}

.status:not(:empty) {
    display: block;
}

.status--loading,
.status--info {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.status--success {
    color: var(--success);
    background: var(--success-soft);
}

.status--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.status--error {
    color: var(--error);
    background: var(--error-soft);
}

.results {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.result-card {
    padding: 22px;
    border: 1px solid #dfd2ed;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #fbf7ff);
}

.result-badge {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 0.76rem;
    font-weight: 800;
}

.result-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-local {
    display: block;
    margin-top: 6px;
    color: var(--purple-dark);
    font-size: clamp(1.15rem, 4vw, 1.5rem);
    line-height: 1.25;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.result-grid > div {
    padding: 14px 16px;
    border-radius: 13px;
    background: var(--purple-soft);
}

.result-grid span,
.result-grid strong {
    display: block;
}

.result-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.result-grid strong {
    margin-top: 2px;
    color: var(--purple-dark);
    font-size: 1.55rem;
}

.simulator-cta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
    margin-top: 20px;
    padding: 22px;
    border: 1px solid rgba(109, 53, 172, 0.22);
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple-dark), var(--purple) 58%, #9050d1);
    box-shadow: 0 14px 32px rgba(78, 31, 134, 0.2);
}

.simulator-cta[hidden] {
    display: none;
}

.simulator-cta__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: var(--purple-dark);
    background: var(--white);
    font-size: 1.25rem;
    font-weight: 900;
}

.simulator-cta h2 {
    margin: 0;
    font-size: clamp(1.12rem, 4vw, 1.4rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.simulator-cta p {
    margin: 7px 0 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    line-height: 1.5;
}

.simulator-cta__button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border-radius: 12px;
    color: var(--purple-dark);
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(39, 13, 71, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.simulator-cta__button:hover,
.simulator-cta__button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(39, 13, 71, 0.28);
}

.simulator-cta__button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
}

.privacy-note {
    margin: 25px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

footer {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 22px 12px 0;
    color: var(--purple-dark);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 20px, 720px);
        padding-top: 16px;
    }

    .search-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

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

    button {
        width: 100%;
    }

    .simulator-cta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .simulator-cta__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
