html {
    background: #f0f4f9;
}

body.nwmd-app-body {
    min-width: 320px;
    margin: 0;
    background: #f0f4f9;
    color: #172033;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    line-height: 1.5;
}

.nwmd-app-home,
.nwmd-app-home * {
    box-sizing: border-box;
}

.nwmd-app-home {
    min-height: 100svh;
}

.nwmd-app-home__panel {
    width: min(1080px, calc(100% - 44px));
    margin: 0 auto;
    padding:
        max(28px, env(safe-area-inset-top))
        0
        max(28px, env(safe-area-inset-bottom));
}

.nwmd-app-home__panel--landing {
    width: 100%;
    padding: 0;
}

.nwmd-app-topbar {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 46px;
}

.nwmd-app-topbar--landing {
    min-height: 54px;
    margin: 0;
    padding-right: clamp(24px, 3.5vw, 56px);
    padding-left: clamp(24px, 3.5vw, 56px);
    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #ffffff 50%,
            #f0f4f9 50%,
            #f0f4f9 100%
        );
}

.nwmd-app-back,
.nwmd-app-brand {
    display: inline-flex;
    align-items: center;
    color: #172033;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
}

.nwmd-app-back {
    gap: 7px;
}

.nwmd-app-brand {
    gap: 9px;
    letter-spacing: -0.025em;
}

.nwmd-app-back:hover,
.nwmd-app-back:focus-visible,
.nwmd-app-brand:hover,
.nwmd-app-brand:focus-visible {
    color: #172033;
}

.nwmd-app-brand__mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    background: #172033;
    color: #ffffff;
    font-size: 0.72rem;
}

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

.nwmd-home-landing {
    display: grid;
    min-height: calc(100svh - 65px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nwmd-home-landing__visual,
.nwmd-home-landing__content {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
}

.nwmd-home-landing__visual {
    padding: 0;
    background: #ffffff;
}

.nwmd-home-landing__visual img {
    display: block;
    width: min(100%, 680px);
    max-height: calc(100svh - 70px);
    object-fit: contain;
}

.nwmd-home-landing__content {
    padding:
        clamp(12px, 2.5vw, 32px)
        clamp(24px, 5vw, 72px)
        clamp(30px, 4vw, 58px);
    background: #f0f4f9;
}

.nwmd-home-landing__content-inner {
    width: min(100%, 560px);
    margin: auto;
    container-type: inline-size;
}

.nwmd-home-landing__copy h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(2.15rem, 9.8cqw, 3.78rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1;
    white-space: nowrap;
}

.nwmd-home-intro {
    max-width: 640px;
    margin: 24px 0 0;
    color: #526078;
    font-size: clamp(1.15rem, 5.3cqw, 1.88rem);
    line-height: 1.4;
    white-space: nowrap;
}

.nwmd-state-selector {
    margin-top: clamp(36px, 5vh, 52px);
}

.nwmd-state-list {
    display: grid;
    gap: 16px;
}

.nwmd-state-button {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 26px;
    border: 1px solid #dbe4f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.035);
    color: #172033;
    font-size: 1.08rem;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.nwmd-state-button strong {
    font-weight: 850;
}

.nwmd-state-button > span {
    color: #2563eb;
    font-size: 1.12rem;
    font-weight: 500;
}

.nwmd-state-button:hover,
.nwmd-state-button:focus-visible {
    border-color: #93c5fd;
    color: #172033;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.07);
    outline: none;
    transform: translateY(-2px);
}

.nwmd-home-landing__content .nwmd-site-footer {
    margin-top: 46px;
}

.nwmd-home-landing__content .nwmd-site-footer__manage,
.nwmd-home-landing__content .nwmd-site-footer__install {
    width: 100%;
    max-width: none;
    min-height: 56px;
}

.nwmd-home-landing__content .nwmd-site-footer__meta {
    flex-direction: column;
    gap: 10px;
}

.nwmd-step-heading {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

.nwmd-step-heading > p:first-child {
    margin: 0 0 10px;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nwmd-step-heading h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1;
}

.nwmd-step-heading__intro {
    margin: 16px 0 0;
    color: #65738a;
}

.nwmd-choice-grid {
    display: grid;
    width: min(820px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 auto;
}

.nwmd-choice-button {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 20px;
    border: 1px solid #cbd9eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 7px 24px rgba(23, 32, 51, 0.045);
    color: #172033;
    font-weight: 800;
    text-decoration: none;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.nwmd-choice-button:hover,
.nwmd-choice-button:focus-visible {
    border-color: #2563eb;
    color: #172033;
    box-shadow: 0 10px 30px rgba(23, 32, 51, 0.09);
    outline: none;
    transform: translateY(-2px);
}

.nwmd-choice-button > span:first-child {
    display: grid;
}

.nwmd-choice-button small {
    font-size: 0.76rem;
    font-weight: 700;
    opacity: 0.8;
}

.nwmd-choice-button > span:last-child {
    color: #2563eb;
    font-size: 1.25rem;
}

.nwmd-app-home__panel:not(
    .nwmd-app-home__panel--landing
) .nwmd-site-footer {
    margin-top: 38px;
}

@media (max-width: 782px) {
    .admin-bar .nwmd-home-landing {
        min-height: calc(100svh - 111px);
    }
}

@media (max-width: 760px) {
    body.nwmd-app-body--landing,
    body.nwmd-app-body--landing .nwmd-app-home {
        background: #f0f4f9;
    }

    .nwmd-app-home__panel {
        width: min(100% - 30px, 620px);
    }

    .nwmd-app-home__panel--landing {
        width: 100%;
    }

    .nwmd-app-topbar {
        margin-bottom: 34px;
    }

    .nwmd-app-topbar--landing {
        min-height: 50px;
        margin: 0;
        padding-right: 18px;
        padding-left: 18px;
        background: #f0f4f9;
    }

    .nwmd-home-landing {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .nwmd-home-landing__visual {
        padding: 0;
        background: #f0f4f9;
    }

    .nwmd-home-landing__visual img {
        width: min(100%, 330px);
        max-height: none;
    }

    .nwmd-home-landing__content {
        padding: 8px 18px 26px;
    }

    .nwmd-home-landing__content-inner {
        width: min(100%, 360px);
    }

    .nwmd-home-landing__copy h1 {
        font-size: clamp(1.55rem, 9.9cqw, 2.55rem);
        letter-spacing: -0.045em;
        line-height: 1;
    }

    .nwmd-home-intro {
        margin-top: 12px;
        font-size: clamp(0.95rem, 5.7cqw, 1.38rem);
        line-height: 1.4;
    }

    .nwmd-state-selector {
        margin-top: 26px;
    }

    .nwmd-state-list {
        gap: 12px;
    }

    .nwmd-state-button {
        min-height: 64px;
        padding: 14px 18px;
        border-radius: 14px;
        font-size: 0.98rem;
    }

    .nwmd-state-button > span {
        font-size: 1rem;
    }

    .nwmd-home-landing__content .nwmd-site-footer {
        margin-top: 34px;
    }

    .nwmd-choice-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .nwmd-choice-button {
        min-height: 70px;
        padding: 15px 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nwmd-state-button,
    .nwmd-choice-button {
        transition: none;
    }
}
