html {
    box-sizing: border-box;
    scrollbar-gutter: stable;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body.nevv-sdp-body {
    margin: 0;
    overflow-y: scroll;
    min-height: 100vh;
    font-family: var(--nevv-sdp-font-family, system-ui, sans-serif);
    color: var(--nevv-sdp-text-normal-color, #1f2933);
    background: var(--nevv-sdp-bg-page, #f4f5f7);
    font-size: var(--nevv-sdp-text-normal-size, 16px);
}

.nevv-sdp-app-shell {
    min-height: 100vh;
    padding-top: calc(var(--nevv-sdp-topbar-min-height, 64px) + 16px);
    padding-bottom: calc(var(--nevv-sdp-bottombar-min-height, 64px) + 16px);
}

.nevv-sdp-topbar-wrap,
.nevv-sdp-bottombar-wrap {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 3000;
    padding-left: 10px;
    padding-right: 10px;
    pointer-events: none;
}

.nevv-sdp-topbar-wrap {
    top: 0;
    padding-top: 8px;
}

.nevv-sdp-bottombar-wrap {
    bottom: 0;
    padding-bottom: 8px;
}

.nevv-sdp-topbar,
.nevv-sdp-bottombar {
    width: min(1200px, calc(100% - 20px));
    margin: 0 auto;
    pointer-events: auto;
    background: var(--nevv-sdp-topbar-bg, #fff);
    border: 1px solid var(--nevv-sdp-topbar-border, #d8dbe2);
    border-radius: var(--nevv-sdp-radius-global, 12px);
    box-shadow: var(--nevv-sdp-topbar-shadow, 0 2px 8px rgba(0,0,0,0.15));
}

.nevv-sdp-topbar {
    min-height: var(--nevv-sdp-topbar-min-height, 64px);
    padding: 10px 16px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, auto) minmax(120px, 1fr);
    align-items: center;
    gap: 10px;
}

.nevv-sdp-topbar__left {
    justify-self: start;
}

.nevv-sdp-topbar__center {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nevv-sdp-topbar__right {
    justify-self: end;
}

.nevv-sdp-topbar__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--nevv-sdp-control-height, 42px);
    text-decoration: none;
}

.nevv-sdp-topbar__logo,
.nevv-sdp-identity-chip__avatar {
    display: block;
    width: auto;
}

.nevv-sdp-topbar__logo {
    max-height: var(--nevv-sdp-topbar-left-logo-max-height, 42px);
    max-width: var(--nevv-sdp-topbar-left-logo-max-width, 220px);
    height: auto;
    object-fit: contain;
}

.nevv-sdp-topbar__text-logo {
    color: var(--nevv-sdp-topbar-left-text-color, #111827);
    font-size: var(--nevv-sdp-topbar-left-text-size, 18px);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.nevv-sdp-identity-chip {
    display: inline-flex;
    align-items: center;
}

.nevv-sdp-identity-chip__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--nevv-sdp-control-height, 42px);
    height: var(--nevv-sdp-control-height, 42px);
    min-width: var(--nevv-sdp-control-height, 42px);
    min-height: var(--nevv-sdp-control-height, 42px);
    padding: 0;
    border-radius: 999px;
    background: var(--nevv-sdp-bg-card, #fff);
    border: 1px solid var(--nevv-sdp-border-card, #d8dbe2);
    color: var(--nevv-sdp-text-normal-color, #1f2933);
    text-decoration: none;
    overflow: hidden;
}

.nevv-sdp-identity-chip__link:hover,
.nevv-sdp-identity-chip__link:focus {
    border-color: var(--nevv-sdp-btn-other-hover-border, #1e293b);
    outline: none;
}

.nevv-sdp-identity-chip.is-logged-in .nevv-sdp-identity-chip__link {
    background: var(--nevv-sdp-bg-card, #fff);
    color: var(--nevv-sdp-text-normal-color, #1f2933);
    border-color: var(--nevv-sdp-btn-save-border, #0f766e);
}

.nevv-sdp-identity-chip__avatar-wrap {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nevv-sdp-bg-card, #fff);
    overflow: hidden;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.nevv-sdp-identity-chip__avatar {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
}

.nevv-sdp-identity-chip__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.nevv-sdp-main {
    width: min(1200px, calc(100% - 20px));
    margin: 0 auto;
    min-height: calc(100vh - var(--nevv-sdp-topbar-min-height, 64px) - var(--nevv-sdp-bottombar-min-height, 64px) - 40px);
}

.nevv-sdp-main__inner {
    min-height: 100%;
}

.nevv-sdp-empty-state {
    background: var(--nevv-sdp-bg-card, #fff);
    border: 1px solid var(--nevv-sdp-border-card, #d8dbe2);
    border-radius: var(--nevv-sdp-radius-global, 12px);
    padding: 24px;
}

.nevv-sdp-empty-state h1 {
    margin-top: 0;
    color: var(--nevv-sdp-h1-color, #111827);
    font-size: var(--nevv-sdp-h1-size, 32px);
}

.nevv-sdp-bottombar {
    min-height: var(--nevv-sdp-bottombar-min-height, 64px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: var(--nevv-sdp-bottombar-bg, #fff);
    border-color: var(--nevv-sdp-bottombar-border, #d8dbe2);
    box-shadow: var(--nevv-sdp-bottombar-shadow, 0 -2px 8px rgba(0,0,0,0.12));
}

.nevv-sdp-bottombar__form {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.nevv-sdp-bottombar__item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: var(--nevv-sdp-bottombar-button-height, var(--nevv-sdp-button-height, 42px));
    padding: 0 12px;
    text-decoration: none;
    border-radius: var(--nevv-sdp-radius-global, 12px);
    background: var(--nevv-sdp-btn-other-bg, #334155);
    color: var(--nevv-sdp-btn-other-color, #fff);
    border: 1px solid var(--nevv-sdp-btn-other-border, #334155);
    font-size: var(--nevv-sdp-bottombar-button-font-size, var(--nevv-sdp-btn-other-font-size, 15px));
    font-weight: 700;
    font-family: inherit;
}

.nevv-sdp-bottombar__item--icon {
    padding: 0;
    min-width: 0;
}

.nevv-sdp-bottombar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 1;
}

.nevv-sdp-bottombar__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nevv-sdp-bottombar__item:hover,
.nevv-sdp-bottombar__item:focus {
    background: var(--nevv-sdp-btn-other-hover-bg, #1e293b);
    color: var(--nevv-sdp-btn-other-hover-color, #fff);
    border-color: var(--nevv-sdp-btn-other-hover-border, #1e293b);
}

.nevv-sdp-bottombar__item.is-active {
    background: var(--nevv-sdp-btn-other-selected-bg, #0f172a);
    color: var(--nevv-sdp-btn-other-selected-color, #fff);
    border-color: var(--nevv-sdp-btn-other-selected-border, #0f172a);
}

.nevv-sdp-bottombar__item.is-locked {
    opacity: 0.55;
    background: var(--nevv-sdp-btn-other-disabled-bg, #cbd5e1);
    color: var(--nevv-sdp-btn-other-disabled-color, #64748b);
    border-color: var(--nevv-sdp-btn-other-disabled-border, #cbd5e1);
}

.nevv-sdp-bottombar__item.is-locked:hover,
.nevv-sdp-bottombar__item.is-locked:focus {
    opacity: 0.75;
    background: var(--nevv-sdp-btn-other-hover-bg, #1e293b);
    color: var(--nevv-sdp-btn-other-hover-color, #fff);
    border-color: var(--nevv-sdp-btn-other-hover-border, #1e293b);
}


.nevv-sdp-bottombar__item--home .nevv-sdp-bottombar__icon {
    width: 27px;
    height: 27px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

@media (max-width: 700px) {
    .nevv-sdp-topbar {
        grid-template-columns: auto 1fr auto;
        padding: 8px 10px;
    }

    .nevv-sdp-topbar__logo {
        max-width: min(var(--nevv-sdp-topbar-left-logo-max-width, 220px), 120px);
    }

    .nevv-sdp-identity-chip__name {
        display: none;
    }

    .nevv-sdp-bottombar {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .nevv-sdp-bottombar__icon {
        width: 24px;
        height: 24px;
    }
}


.nevv-sdp-info-page {
    width: 100%;
    background: var(--nevv-sdp-bg-card, #ffffff);
    border: 1px solid var(--nevv-sdp-border-card, #d8dbe2);
    border-radius: var(--nevv-sdp-radius-global, 12px);
    padding: 24px;
}

.nevv-sdp-info-page__header {
    margin-bottom: 16px;
}

.nevv-sdp-info-page__content > *:first-child {
    margin-top: 0;
}

.nevv-sdp-info-page__content > *:last-child {
    margin-bottom: 0;
}

.nevv-sdp-empty-state--unavailable {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.nevv-sdp-unavailable__home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--nevv-sdp-button-height, 42px);
    padding: 0 16px;
    border-radius: var(--nevv-sdp-radius-global, 12px);
    background: var(--nevv-sdp-btn-other-bg, #334155);
    color: var(--nevv-sdp-btn-other-color, #ffffff);
    border: 1px solid var(--nevv-sdp-btn-other-border, #334155);
    text-decoration: none;
    font-size: var(--nevv-sdp-btn-other-font-size, 15px);
    font-weight: 700;
}

.nevv-sdp-unavailable__home-link:hover,
.nevv-sdp-unavailable__home-link:focus {
    background: var(--nevv-sdp-btn-other-hover-bg, #1e293b);
    color: var(--nevv-sdp-btn-other-hover-color, #ffffff);
    border-color: var(--nevv-sdp-btn-other-hover-border, #1e293b);
}

/* Community shortcut in the top bar, configured from NEVV SDP Core. */
.nevv-sdp-topbar__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.nevv-sdp-community-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--nevv-sdp-topbar-button-height, var(--nevv-sdp-control-height, 42px));
    height: var(--nevv-sdp-topbar-button-height, var(--nevv-sdp-control-height, 42px));
    max-height: var(--nevv-sdp-topbar-community-max-height, 42px);
    max-width: var(--nevv-sdp-topbar-community-max-width, 140px);
    padding: 0 12px;
    border-radius: 999px;
    background: var(--nevv-sdp-topbar-community-bg, #f3f4f6);
    color: var(--nevv-sdp-topbar-community-color, #111827);
    border: 1px solid var(--nevv-sdp-topbar-community-border, #d8dbe2);
    text-decoration: none;
    overflow: hidden;
    line-height: 1;
    font-weight: 800;
}

.nevv-sdp-community-chip:hover,
.nevv-sdp-community-chip:focus {
    transform: scale(1.04);
    text-decoration: none;
    outline: none;
}

.nevv-sdp-community-chip__image {
    display: block;
    width: auto;
    height: 100%;
    max-width: var(--nevv-sdp-topbar-community-max-width, 140px);
    max-height: var(--nevv-sdp-topbar-community-max-height, 42px);
    object-fit: contain;
}

.nevv-sdp-community-chip__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--nevv-sdp-topbar-button-font-size, 13px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .nevv-sdp-topbar__actions {
        gap: 6px;
    }

    .nevv-sdp-community-chip {
        max-width: min(var(--nevv-sdp-topbar-community-max-width, 140px), 96px);
        padding-left: 8px;
        padding-right: 8px;
    }

    .nevv-sdp-community-chip__label {
        font-size: 11px;
    }
}



.nevv-sdp-topbar__center .nevv-sdp-button,
.nevv-sdp-topbar__center button,
.nevv-sdp-topbar__center input[type="submit"] {
    min-height: var(--nevv-sdp-topbar-button-height, 36px);
    font-size: var(--nevv-sdp-topbar-button-font-size, var(--nevv-sdp-btn-other-font-size, 14px));
}

.nevv-sdp-bottombar__item {
    height: var(--nevv-sdp-bottombar-button-height, var(--nevv-sdp-button-height, 42px));
}

.nevv-sdp-public-topnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nevv-sdp-public-topnav form {
    margin: 0;
}
.nevv-sdp-public-topnav__button {
    appearance: none;
    -webkit-appearance: none;
    min-height: var(--nevv-sdp-topbar-button-height, 36px);
    padding: 0 16px;
    border-radius: var(--nevv-sdp-radius-global, 12px);
    border: 1px solid var(--nevv-sdp-btn-other-border, #334155);
    background: var(--nevv-sdp-btn-other-bg, #334155);
    color: var(--nevv-sdp-btn-other-color, #ffffff);
    font-family: inherit;
    font-size: var(--nevv-sdp-topbar-button-font-size, var(--nevv-sdp-btn-other-font-size, 14px));
    font-weight: 800;
    cursor: pointer;
}
.nevv-sdp-public-topnav__button:hover,
.nevv-sdp-public-topnav__button:focus,
.nevv-sdp-public-topnav__button.is-active {
    background: var(--nevv-sdp-btn-other-selected-bg, #0f172a);
    color: var(--nevv-sdp-btn-other-selected-color, #ffffff);
    border-color: var(--nevv-sdp-btn-other-selected-border, #0f172a);
}
.nevv-sdp-public-terms-fallback {
    display: none;
}
@media (max-width: 700px) {
    .nevv-sdp-public-topnav {
        gap: 5px;
    }
    .nevv-sdp-public-topnav__button {
        min-height: var(--nevv-sdp-topbar-button-height, 36px);
        padding: 0 9px;
        font-size: min(var(--nevv-sdp-topbar-button-font-size, 12px), 12px);
    }
}

/* v0.1.20: mobile-safe dynamic spacing for fixed bars. */
:root {
    --nevv-sdp-topbar-space: calc(var(--nevv-sdp-topbar-min-height, 64px) + 16px);
    --nevv-sdp-bottombar-space: calc(var(--nevv-sdp-bottombar-min-height, 64px) + 16px);
}

.nevv-sdp-app-shell {
    padding-top: var(--nevv-sdp-topbar-space, calc(var(--nevv-sdp-topbar-min-height, 64px) + 16px));
    padding-bottom: var(--nevv-sdp-bottombar-space, calc(var(--nevv-sdp-bottombar-min-height, 64px) + 16px));
}

.nevv-sdp-main {
    min-height: calc(100vh - var(--nevv-sdp-topbar-space, calc(var(--nevv-sdp-topbar-min-height, 64px) + 16px)) - var(--nevv-sdp-bottombar-space, calc(var(--nevv-sdp-bottombar-min-height, 64px) + 16px)));
}

@media (max-width: 700px) {
    .nevv-sdp-topbar {
        grid-template-columns: minmax(72px, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        align-items: center;
        row-gap: 8px;
    }

    .nevv-sdp-topbar__left {
        grid-area: brand;
        justify-self: start;
        min-width: 0;
    }

    .nevv-sdp-topbar__center {
        grid-area: nav;
        justify-self: stretch;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .nevv-sdp-topbar__right {
        grid-area: actions;
        justify-self: end;
    }

    .nevv-sdp-topbar__center .nevv-sdp-button,
    .nevv-sdp-topbar__center button,
    .nevv-sdp-topbar__center input[type="submit"],
    .nevv-sdp-public-topnav__button {
        min-height: var(--nevv-sdp-topbar-button-height, 34px);
        height: var(--nevv-sdp-topbar-button-height, 34px);
        padding-left: 9px;
        padding-right: 9px;
        font-size: min(var(--nevv-sdp-topbar-button-font-size, 12px), 12px);
        line-height: 1;
        white-space: nowrap;
    }

    .nevv-sdp-topbar__brand {
        min-height: min(var(--nevv-sdp-control-height, 42px), 36px);
    }

    .nevv-sdp-identity-chip__link {
        width: min(var(--nevv-sdp-control-height, 42px), 38px);
        height: min(var(--nevv-sdp-control-height, 42px), 38px);
        min-width: min(var(--nevv-sdp-control-height, 42px), 38px);
        min-height: min(var(--nevv-sdp-control-height, 42px), 38px);
    }

    .nevv-sdp-bottombar__item {
        min-height: var(--nevv-sdp-bottombar-button-height, 42px);
        height: var(--nevv-sdp-bottombar-button-height, 42px);
        font-size: var(--nevv-sdp-bottombar-button-font-size, 14px);
    }
}

/* v0.1.21: top navigation labels are always uppercase and scrollbar space is stable. */
.nevv-sdp-topbar__center .nevv-sdp-button,
.nevv-sdp-topbar__center button,
.nevv-sdp-topbar__center input[type="submit"],
.nevv-sdp-public-topnav__button,
.nevv-sdp-community-chip__label {
    text-transform: uppercase;
    letter-spacing: .02em;
}

