html {
    background: #f4f7fb;
}

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

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

.nwmd-app-shell {
    min-height: 100svh;
    padding:
        max(22px, env(safe-area-inset-top))
        18px
        max(30px, env(safe-area-inset-bottom));
}

.admin-bar .nwmd-app-shell {
    min-height: calc(100svh - 32px);
}

.nwmd-app-shell__panel {
    width: min(
        var(--nwmd-page-shell-max-width),
        100%
    );
    margin: 0 auto;
}

.nwmd-app-bar {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 34px;
}

.nwmd-app-bar__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #172033;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
}

.nwmd-app-shell__panel > :not(.nwmd-app-bar) {
    width: min(760px, 100%);
    margin-right: auto;
    margin-left: auto;
}

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

.nwmd-app-heading {
    margin-bottom: 26px;
}

.nwmd-app-heading__eyebrow {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nwmd-app-heading h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.03;
}

.nwmd-app-heading p:last-child {
    margin: 12px 0 0;
    color: #65738a;
}

.nwmd-app-button-grid,
.nwmd-city-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.nwmd-app-button,
.nwmd-city-button {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(23, 32, 51, 0.045);
}

.nwmd-app-button:hover,
.nwmd-app-button:focus-visible,
.nwmd-city-button:hover,
.nwmd-city-button:focus-visible {
    border-color: #93c5fd;
    color: #172033;
    outline: none;
}

.nwmd-app-button span {
    color: #2563eb;
    font-size: 1.2rem;
}

.nwmd-city-groups {
    display: grid;
    gap: 30px;
}

.nwmd-city-group h2 {
    margin: 0 0 14px;
    color: #2563eb;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.015em;
    text-transform: none;
}

.nwmd-city-group-divider {
    width: 100%;
    height: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid #dbe4f0;
}

.nwmd-city-button span {
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 900;
}

.nwmd-business-list {
    display: grid;
    gap: 12px;
}

.nwmd-business-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
}

.nwmd-business-row__type {
    margin: 0 0 6px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nwmd-business-row h2 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.25;
}

.nwmd-business-row h2 a {
    color: #172033;
    text-decoration: none;
}

.nwmd-business-row__location {
    margin: 6px 0 0;
    color: #526078;
    font-size: 0.9rem;
    font-weight: 700;
}

.nwmd-business-row__excerpt {
    margin: 10px 0 0;
    color: #65738a;
    font-size: 0.92rem;
}

.nwmd-business-row__deal {
    grid-column: 1 / -1;
    display: grid;
    width: 100%;
    box-sizing: border-box;
    gap: 6px;
    padding: 12px 14px;
    border: 2px dashed #22c55e;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    font-size: 0.88rem;
    line-height: 1.4;
}

.nwmd-business-row__deal-label {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nwmd-business-row__deal-text {
    font-weight: 700;
}

.nwmd-business-row__actions {
    display: flex;
    align-items: center;
    align-self: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nwmd-business-row__actions a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.nwmd-business-row__actions
.nwmd-business-row__details {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.nwmd-app-empty {
    padding: 30px 22px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
}

.nwmd-app-empty h2 {
    margin: 0;
    font-size: 1.35rem;
}

.nwmd-app-empty p {
    margin: 10px 0 18px;
    color: #65738a;
}

.nwmd-app-empty a {
    color: #2563eb;
    font-weight: 800;
}

.nwmd-app-pagination {
    margin-top: 24px;
}

.nwmd-app-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nwmd-app-pagination .page-numbers {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
}

.nwmd-app-footer {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid #dbe4f0;
    text-align: center;
}

.nwmd-app-footer p {
    margin: 0;
    color: #65738a;
    font-size: 0.86rem;
}

.nwmd-app-footer a {
    display: inline-block;
    margin-top: 5px;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.nwmd-ad {
    margin: 18px 0;
}

.nwmd-ad__link {
    display: grid;
    overflow: hidden;
    border: 1px dashed #93c5fd;
    border-radius: 18px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
}

.nwmd-ad__media {
    max-height: 220px;
    overflow: hidden;
}

.nwmd-ad__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nwmd-ad__content {
    display: grid;
    gap: 5px;
    padding: 18px;
}

.nwmd-ad__label {
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nwmd-ad__title {
    font-size: 1.05rem;
}

.nwmd-ad__advertiser {
    color: #65738a;
    font-size: 0.88rem;
}

.nwmd-ad__action {
    margin-top: 4px;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 800;
}

@media (max-width: 782px) {
    .admin-bar .nwmd-app-shell {
        min-height: calc(100svh - 46px);
    }
}

@media (max-width: 620px) {
    .nwmd-app-shell {
        padding-top: 18px;
    }

    .nwmd-app-bar {
        margin-bottom: 26px;
    }

    .nwmd-app-button-grid,
    .nwmd-city-grid {
        grid-template-columns: 1fr;
    }

    .nwmd-business-row {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .nwmd-business-row__actions {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}
/* Larger state headings */
.nwmd-city-group h2 {
    margin-bottom: 16px;
    color: #34435b;
    font-size: clamp(1.4rem, 4vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 0.025em;
}
/* Page 6 sponsored advertising inquiry */
.nwmd-ad--sponsored-result {
    position: relative;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
}

.nwmd-ad--sponsored-result .nwmd-ad__link {
    border: 0;
    border-radius: 0 0 18px 18px;
}

.nwmd-ad__topbar {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 10px 8px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.nwmd-ad-menu {
    position: relative;
    z-index: 5;
}

.nwmd-ad-menu__toggle {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #526078;
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
    list-style: none;
}

.nwmd-ad-menu__toggle::-webkit-details-marker {
    display: none;
}

.nwmd-ad-menu__toggle::marker {
    content: "";
}

.nwmd-ad-menu__toggle:hover,
.nwmd-ad-menu__toggle:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
}

.nwmd-ad-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    min-width: 176px;
    padding: 6px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(23, 32, 51, 0.18);
}

.nwmd-ad-menu__panel button {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #172033;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
}

.nwmd-ad-menu__panel button:hover,
.nwmd-ad-menu__panel button:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
}

.nwmd-ad-inquiry-notice {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 14px;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.5;
}

.nwmd-ad-inquiry-notice--success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.nwmd-ad-inquiry-notice--error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.nwmd-ad-inquiry-form {
    position: relative;
    display: grid;
    gap: 16px;
}

.nwmd-ad-inquiry-form__field {
    display: grid;
    gap: 7px;
}

.nwmd-ad-inquiry-form__field label {
    color: #172033;
    font-size: 0.9rem;
    font-weight: 850;
}

.nwmd-ad-inquiry-form__field input,
.nwmd-ad-inquiry-form__field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font: inherit;
}

.nwmd-ad-inquiry-form__field textarea {
    min-height: 126px;
    resize: vertical;
}

.nwmd-ad-inquiry-form__field input:focus,
.nwmd-ad-inquiry-form__field textarea:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.nwmd-ad-inquiry-form__submit {
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid #2563eb;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.nwmd-ad-inquiry-form__submit:hover,
.nwmd-ad-inquiry-form__submit:focus-visible {
    background: #1d4ed8;
    color: #ffffff;
    outline: none;
}

.nwmd-ad-inquiry-form__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 520px) {
    .nwmd-ad__topbar {
        padding-left: 14px;
    }

    .nwmd-ad-menu__panel {
        right: -2px;
    }
}

/* Scrollable information and inquiry dialogs */
.nwmd-info-dialog[open] {
    display: flex;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    flex-direction: column;
    overflow: hidden;
}

.nwmd-info-dialog__header {
    flex: 0 0 auto;
}

.nwmd-info-dialog__content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 520px) {
    .nwmd-info-dialog[open] {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }
}

/* Emphasized all-category option. */
.nwmd-app-button--all {
    grid-column: 1 / -1;
    margin-top: 6px;
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1e3a8a;
}

.nwmd-app-button--all span {
    color: currentColor;
}

.nwmd-app-button--all:hover,
.nwmd-app-button--all:focus-visible {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}
