/*
 * Nexey One: the look of every page, built on glisse (css/glisse.css, js/glisse.js), Apple's Liquid Glass for the web.
 * Loaded after the older stylesheets (style_onev1.php for account pages, includes/auth_style.php for sign-in and
 * public pages), so it only has to restyle, not replace them.
 *
 *   html.nx-one   account pages (includes/header.php)
 *   .nx-auth      sign-in, sign-up and public pages (includes/auth_style.php)
 *
 * Glass is dark here: the pages sit on the obsidian background with the pink and blue glows.
 * js/glisse.js adds the lit rim to [data-glass="rim"], and rim plus refraction to [data-glass].
 */

/* ------------------------------------------------------------------ tokens */

html.nx-one,
.nx-auth {
    --lg-foreground: rgb(255 255 255);
    --lg-muted: rgb(235 235 245 / 0.6);
    --lg-glass: rgb(40 40 46 / 0.55);
    --lg-glass-active: rgb(70 70 78 / 0.62);
    --lg-edge: rgb(255 255 255 / 0.1);
    --lg-drop: transparent;
    --lg-selection: rgb(255 255 255 / 0.145);
    --lg-lens: rgb(255 255 255 / 0.055);
    --lg-surface: rgb(24 24 30 / 0.72);
    --lg-surface-edge: rgb(255 255 255 / 0.13);
    --lg-shadow: rgb(0 0 0 / 0.45);
    --lg-highlight: rgb(235 235 245 / 0.11);
    --lg-separator: rgb(235 235 245 / 0.14);
    --lg-destructive: #ff4245;
    --lg-track: rgb(235 235 245 / 0.22);
    --lg-on: #30d158;
    --lg-ring: rgb(255 255 255 / 0.5);
    --lg-rim-shine: 0.16;
    --nx-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --nx-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --nx-card-radius: 28px;
    color-scheme: dark;
}
html.nx-one {
    --lg-fill: #eb2880;          /* Nexey pink: the filled button */
    --nx-accent-rgb: 235 40 128;
}
.nx-auth {
    --lg-fill: var(--accent);    /* the colour of the app that asked for the sign-in */
    --nx-accent-rgb: var(--accent-rgb);
}

/* ------------------------------------------------------------------ shared pieces */

/* A glisse switch from a plain checkbox: grey track, green when on, white knob with the thumb's glass shadow. */
html.nx-one input[type="checkbox"],
.nx-auth input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: none;
    width: 51px;
    height: 31px;
    margin: 0 .7rem 0 0;
    border: 0;
    border-radius: 999px;
    background: var(--lg-track);
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 200ms var(--lg-ease, ease);
}
html.nx-one input[type="checkbox"]::before,
.nx-auth input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 3px 8px rgb(0 0 0 / .15), 0 3px 1px rgb(0 0 0 / .06);
    transition: transform 260ms cubic-bezier(.3, 1.4, .5, 1), width 160ms ease;
}
html.nx-one input[type="checkbox"]:active::before,
.nx-auth input[type="checkbox"]:active::before {
    width: 33px;
}
html.nx-one input[type="checkbox"]:checked,
.nx-auth input[type="checkbox"]:checked {
    background: var(--lg-on);
}
html.nx-one input[type="checkbox"]:checked::before,
.nx-auth input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}
html.nx-one input[type="checkbox"]:checked:active::before,
.nx-auth input[type="checkbox"]:checked:active::before {
    transform: translateX(14px);
}
html.nx-one input[type="checkbox"]:disabled,
.nx-auth input[type="checkbox"]:disabled {
    opacity: .35;
    cursor: default;
}
html.nx-one input[type="checkbox"]:focus-visible,
.nx-auth input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--lg-ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html.nx-one *,
    .nx-auth * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ================================================================== account pages */

html.nx-one,
html.nx-one body {
    font-family: var(--nx-font);
    color: rgb(235 235 245 / .86);
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
}
html.nx-one button,
html.nx-one input,
html.nx-one select,
html.nx-one textarea {
    font-family: inherit;
}
html.nx-one a {
    color: inherit;
}
html.nx-one ::selection {
    background: rgb(var(--nx-accent-rgb) / .45);
}

/* ---- the bar at the top: a floating glass capsule */
html.nx-one header.nx-bar {
    position: sticky;
    top: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    width: min(1050px, calc(100% - 24px));
    height: 64px;
    margin: 12px auto 0;
    padding: 0 10px 0 22px;
    border-radius: 32px;
    background-color: transparent;
    /* The frost sits on a layer underneath: with a backdrop-filter on the bar itself, the tab bar that is
       fixed to the bottom of a phone screen would be fixed to the bar instead. */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 10px 40px -12px rgb(0 0 0 / .6);
    flex-direction: row;
    isolation: isolate;
}
html.nx-one header.nx-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-color: rgb(28 28 34 / .55);
    background-image: var(--lg-rim, none);
    background-size: 100% 100%;
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    backdrop-filter: blur(20px) saturate(1.8);
}
html.nx-one header.nx-bar .img-one-logo {
    display: block;
    width: auto;
    height: 26px;
    margin: 0;
}
html.nx-one header.nx-bar .sfy-status {
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgb(var(--nx-accent-rgb) / .8);
    font-size: 11px;
    font-weight: 600;
}
html.nx-one header.nx-bar nav {
    margin-left: auto;
}

/* The page tabs: glisse's tab bar, with the current page under the selection. */
html.nx-one .nx-tabs {
    position: relative;
    display: inline-flex;
    gap: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    border-radius: 22px;
    background: rgb(118 118 128 / .18);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .nx-tabs li {
    padding: 0;
    background: none;
}
html.nx-one .nx-tabs a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    color: var(--lg-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 200ms ease, background-color 200ms ease;
}
html.nx-one .nx-tabs a svg {
    display: none;
    width: 24px;
    height: 24px;
}
html.nx-one .nx-tabs a:hover {
    color: var(--lg-foreground);
}
html.nx-one .nx-tabs a[aria-current="page"] {
    color: var(--lg-foreground);
    background: var(--lg-selection);
}
html.nx-one .nx-tabs a:focus-visible {
    outline: 2px solid var(--lg-ring);
    outline-offset: -2px;
}

/* The round menu button and its menu: glisse's Menu card. */
html.nx-one .nx-menu {
    position: relative;
    display: inline-flex;
}
html.nx-one .nx-menu > .dropbtn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: var(--lg-foreground);
    font-size: 22px;
    cursor: pointer;
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .nx-menu > .dropbtn:hover {
    color: var(--lg-foreground);
    background-color: var(--lg-glass-active);
}
html.nx-one .nx-menu > .dropbtn img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
html.nx-one .nx-menu .dropdown-content {
    display: block;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    z-index: 200;
    box-sizing: border-box;
    width: 240px;
    min-width: 0;
    padding: 6px;
    border-radius: 22px;
    background: var(--lg-surface);
    -webkit-backdrop-filter: blur(22px) saturate(1.9);
    backdrop-filter: blur(22px) saturate(1.9);
    box-shadow: inset 0 0 0 .5px var(--lg-surface-edge), 0 12px 40px var(--lg-shadow);
    transform-origin: calc(100% - 22px) -10px;
    opacity: 0;
    visibility: hidden;
    transform: scale(.6);
    transition: opacity 160ms ease, transform 260ms cubic-bezier(.3, 1.3, .5, 1), visibility 0s 260ms;
}
html.nx-one .nx-menu.is-open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 120ms ease, transform 320ms cubic-bezier(.3, 1.3, .5, 1), visibility 0s;
}
html.nx-one .nx-menu .dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 14px;
    color: var(--lg-foreground);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}
html.nx-one .nx-menu .dropdown-content a:hover,
html.nx-one .nx-menu .dropdown-content a:focus-visible {
    color: var(--lg-foreground);
    background: var(--lg-highlight);
    outline: none;
}
html.nx-one .nx-menu .dropdown-content .nx-menu-who {
    padding: 8px 12px 6px;
    color: var(--lg-muted);
    font-size: 12px;
}
html.nx-one .nx-menu .dropdown-content hr {
    margin: 6px 11px;
    border: 0;
    border-top: .5px solid var(--lg-separator);
}
html.nx-one .nx-menu .dropdown-content .nx-danger {
    color: var(--lg-destructive);
}
html.nx-one .overlay {
    display: none;
}

/* The legal banner under the bar */
html.nx-one .nx-bar ~ .callout-danger {
    border-radius: 18px;
}

/* On a phone the tabs leave the bar and float at the bottom, as an iOS tab bar with icons. */
@media (max-width: 760px) {
    html.nx-one header.nx-bar {
        top: 8px;
        height: 56px;
        width: calc(100% - 16px);
        margin-top: 8px;
        padding-left: 18px;
    }
    html.nx-one header.nx-bar nav {
        position: fixed;
        left: 50%;
        bottom: max(12px, env(safe-area-inset-bottom));
        z-index: 150;
        margin: 0;
        translate: -50% 0;
    }
    html.nx-one .nx-tabs {
        padding: 4px;
        border-radius: 34px;
        background: rgb(28 28 34 / .62);
        -webkit-backdrop-filter: blur(20px) saturate(1.8);
        backdrop-filter: blur(20px) saturate(1.8);
        box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 10px 40px -10px rgb(0 0 0 / .7);
    }
    html.nx-one .nx-tabs a {
        flex-direction: column;
        justify-content: center;
        gap: 1px;
        width: 66px;
        height: 56px;
        padding: 0;
        border-radius: 28px;
        color: var(--lg-foreground);
        font-size: 10px;
    }
    html.nx-one .nx-tabs a svg {
        display: block;
    }
    html.nx-one .nx-tabs a[aria-current="page"] {
        color: var(--lg-fill);
    }
    html.nx-one header.nx-bar .nx-menu {
        margin-left: auto;
    }
    html.nx-one body {
        padding-bottom: 96px;
    }
}
@media (max-width: 380px) {
    html.nx-one .nx-tabs a {
        width: 58px;
    }
}

/* ---- the page card */
html.nx-one .containermodal {
    box-sizing: border-box;
    width: min(1050px, calc(100% - 24px));
    margin: 20px auto 40px;
    border: 0;
    border-radius: var(--nx-card-radius);
    overflow: visible;
    background-color: rgb(22 22 28 / .5);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 30px 80px -30px rgb(0 0 0 / .8);
    animation: nx-glass-rise .5s cubic-bezier(.22, 1, .36, 1) both;
}
html.nx-one .containermodal.lg-glass {
    background-image: var(--lg-rim, none);
}
@media (max-width: 760px) {
    html.nx-one .containermodal {
        width: calc(100% - 16px);
        margin-top: 12px;
    }
}
html.nx-one .liquidGlass-wrapper {
    overflow: visible;
    border-radius: inherit;
}
html.nx-one .liquidGlass-effect,
html.nx-one .liquidGlass-tint,
html.nx-one .liquidGlass-shine {
    display: none;
}
html.nx-one .accountcenter {
    padding: clamp(20px, 4vw, 36px);
    border-radius: inherit;
    box-shadow: none;
}
html.nx-one .modal-title {
    margin: 0 0 20px;
    color: var(--lg-foreground);
    font-family: var(--nx-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
}
html.nx-one .modal-sub-title {
    color: var(--lg-foreground);
    font-family: var(--nx-display);
    font-weight: 700;
    letter-spacing: -.02em;
}

/* the profile row: an inset glass plate */
html.nx-one .profiles-card-one {
    margin: 0 0 24px;
    padding: 12px 16px;
    border-radius: 22px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .profile-one {
    gap: 14px;
}
html.nx-one .avatar {
    width: 52px;
    height: 52px;
    margin: 0;
    object-fit: cover;
    box-shadow: 0 0 0 .5px var(--lg-edge);
}
html.nx-one .profile-info strong {
    color: var(--lg-foreground);
    font-size: 17px;
    font-weight: 600;
}
html.nx-one .profile-info p {
    color: var(--lg-muted);
    font-size: 14px;
}

/* section headings and grouped lists, as iOS Settings */
html.nx-one .settings h3,
html.nx-one .profile-photo-box h3,
html.nx-one .accountcenter h3 {
    margin: 28px 0 8px 16px;
    color: var(--lg-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}
html.nx-one .settings ul {
    padding: 6px;
    border-radius: 22px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .settings li {
    position: relative;
    padding: 0;
    border: 0;
    color: var(--lg-foreground);
    font-size: 16px;
}
html.nx-one .settings li + li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 54px;
    right: 12px;
    border-top: .5px solid var(--lg-separator);
}
html.nx-one .settings li a {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 6px 12px;
    border-radius: 16px;
    color: var(--lg-foreground);
    text-decoration: none;
    transition: background-color 160ms ease;
}
html.nx-one .settings li a::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-top: 2px solid var(--lg-muted);
    border-right: 2px solid var(--lg-muted);
    border-radius: 1px;
    rotate: 45deg;
    opacity: .7;
}
html.nx-one .settings li a:hover,
html.nx-one .settings li a:focus-visible {
    background: var(--lg-highlight);
    outline: none;
}
html.nx-one .settings li a:active {
    background: var(--lg-selection);
}
html.nx-one .settings li a > span:first-child {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgb(255 255 255 / .08);
    font-size: 17px;
}
html.nx-one .settings li a[style*="eb0002"],
html.nx-one .settings li a.nx-danger {
    color: var(--lg-destructive) !important;
}
html.nx-one .settings li a[style*="50ff0b"] {
    color: var(--lg-on) !important;
}

/* form groups: grouped glass plates with glisse inputs */
html.nx-one .profile-photo-box {
    margin: 0;
    padding: 0;
    text-align: left;
}
html.nx-one .profile-photo-box > form,
html.nx-one .settings > .form-group-l:first-of-type {
    margin-top: 0;
}
html.nx-one .profile-photo-box > form,
html.nx-one .accountcenter form .settings {
    padding: 16px;
    border-radius: 22px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .form-group-l {
    width: auto;
    max-width: none;
    margin: 0 0 14px;
    text-align: left;
}
html.nx-one .form-group-l .label,
html.nx-one .accountcenter label.label {
    display: flex;
    align-items: center;
    margin: 0 0 6px 4px;
    color: rgb(235 235 245 / .8);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}
html.nx-one .form-control-l,
html.nx-one .accountcenter select,
html.nx-one .accountcenter input[type="text"],
html.nx-one .accountcenter input[type="email"],
html.nx-one .accountcenter input[type="password"],
html.nx-one .accountcenter input[type="file"],
html.nx-one .accountcenter textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 22px;
    color: var(--lg-foreground);
    background-color: var(--lg-glass);
    -webkit-backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
    font-size: 15px;
    outline: none;
    transition: background-color 200ms ease, box-shadow 200ms ease;
}
html.nx-one .accountcenter textarea {
    height: auto;
    min-height: 120px;
    padding: 12px 16px;
    border-radius: 18px;
}
html.nx-one select.form-control-l,
html.nx-one .accountcenter select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ebebf5' stroke-opacity='.6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}
html.nx-one select option {
    color: #fff;
    background: #1c1c22;
}
html.nx-one input[type="file"].form-control-l,
html.nx-one .accountcenter input[type="file"] {
    padding: 6px 6px 6px 6px;
    line-height: 32px;
    color: var(--lg-muted);
}
html.nx-one input[type="file"]::file-selector-button {
    height: 32px;
    margin-right: 12px;
    padding: 0 14px;
    border: 0;
    border-radius: 16px;
    color: var(--lg-foreground);
    background: var(--lg-selection);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
html.nx-one .form-control-l:hover {
    background-color: rgb(52 52 60 / .6);
}
html.nx-one .form-control-l:focus,
html.nx-one .accountcenter select:focus,
html.nx-one .accountcenter input:focus {
    background-color: var(--lg-glass-active);
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 0 0 4px rgb(var(--nx-accent-rgb) / .28);
    outline: none;
}
html.nx-one .form-control-l:disabled {
    color: var(--lg-muted);
    background-color: rgb(255 255 255 / .04);
    opacity: 1;
}
html.nx-one .password-tip,
html.nx-one .undertext {
    max-width: 60ch;
    margin: 4px 4px 10px;
    color: var(--lg-muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}
html.nx-one .callout-success,
html.nx-one .callout-danger {
    margin: 0 0 14px;
    padding: 12px 16px;
    border: 0;
    border-radius: 18px;
    color: var(--lg-foreground);
    font-size: 14px;
    text-align: left;
}
html.nx-one .callout-success {
    background: rgb(48 209 88 / .16);
    box-shadow: inset 0 0 0 .5px rgb(48 209 88 / .45);
}
html.nx-one .callout-danger {
    background: rgb(255 66 69 / .16);
    box-shadow: inset 0 0 0 .5px rgb(255 66 69 / .45);
}

/* ---- buttons: glisse's Button. btnk / cta1 are the filled action, btnd the clear glass one. */
html.nx-one .btnk,
html.nx-one .cta1,
html.nx-one .btnd,
html.nx-one .accountcenter button[type="submit"]:not(.nx-plain) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    width: auto;
    min-width: 120px;
    height: 44px;
    margin: 8px 8px 0 0;
    padding: 0 22px;
    border: 0;
    border-radius: 22px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
    cursor: pointer;
    overflow: visible;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 200ms ease;
}
html.nx-one .btnk,
html.nx-one .cta1,
html.nx-one .accountcenter button[type="submit"]:not(.btnd):not(.nx-plain) {
    background-color: var(--lg-fill);
    box-shadow: inset 0 .5px 0 rgb(255 255 255 / .35), 0 8px 24px -10px rgb(var(--nx-accent-rgb) / .9);
}
html.nx-one .btnk:hover,
html.nx-one .cta1:hover,
html.nx-one .accountcenter button[type="submit"]:not(.btnd):not(.nx-plain):hover {
    color: #fff;
    background-color: color-mix(in srgb, var(--lg-fill) 88%, #fff);
    transform: none;
}
html.nx-one .btnk:active,
html.nx-one .cta1:active,
html.nx-one .btnk[data-pressed],
html.nx-one .cta1[data-pressed] {
    background-color: color-mix(in srgb, var(--lg-fill) 85%, #000);
    transform: none;
}
html.nx-one .btnd {
    color: var(--lg-foreground);
    background-color: var(--lg-glass);
    -webkit-backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
html.nx-one .btnd.lg-glass {
    background-image: var(--lg-rim, none);
}
html.nx-one .btnd::before {
    content: none;
}
html.nx-one .btnd:hover,
html.nx-one .btnd:active,
html.nx-one .btnd[data-pressed] {
    background-color: var(--lg-glass-active);
}
html.nx-one .btnd[name="remove"],
html.nx-one .btnd.nx-danger {
    color: var(--lg-destructive);
}
html.nx-one .btnk:disabled,
html.nx-one .cta1:disabled,
html.nx-one .btnd:disabled {
    opacity: .4;
    cursor: default;
}
html.nx-one .btnk:focus-visible,
html.nx-one .cta1:focus-visible,
html.nx-one .btnd:focus-visible {
    outline: 2px solid var(--lg-ring);
    outline-offset: 2px;
}

/* the round back button: a glisse icon-only button, at the bottom right of the card */
html.nx-one .add-me {
    position: fixed;
    right: max(16px, calc(50% - 525px + 16px));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border-radius: 26px;
    color: var(--lg-foreground);
    background-color: rgb(40 40 46 / .55);
    -webkit-backdrop-filter: blur(12px) var(--lg-filter, saturate(1.8));
    backdrop-filter: blur(12px) var(--lg-filter, saturate(1.8));
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 10px 30px -10px rgb(0 0 0 / .7);
    font-size: 30px;
}
html.nx-one .add-me.lg-glass {
    background-image: var(--lg-rim, none);
}
html.nx-one .add-me:hover {
    background-color: var(--lg-glass-active);
}
html.nx-one .add-me:active {
    transform: none;
}
@media (max-width: 760px) {
    html.nx-one .add-me {
        bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px);
        right: 12px;
        width: 48px;
        height: 48px;
    }
}

/* ---- pop-ups: glisse's Menu surface */
html.nx-one .popup-overlay {
    background: rgb(0 0 0 / .35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
html.nx-one .popupmodal {
    border: 0;
    border-radius: 28px;
    color: var(--lg-foreground);
    background: var(--lg-surface);
    -webkit-backdrop-filter: blur(22px) saturate(1.9);
    backdrop-filter: blur(22px) saturate(1.9);
    box-shadow: inset 0 0 0 .5px var(--lg-surface-edge), 0 20px 60px var(--lg-shadow);
}

/* ---- tables (sessions, connected apps) */
html.nx-one .accountcenter table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
html.nx-one .accountcenter th,
html.nx-one .accountcenter td {
    padding: 10px 12px;
    border-bottom: .5px solid var(--lg-separator);
    text-align: left;
}
html.nx-one .accountcenter th {
    color: var(--lg-muted);
    font-weight: 500;
}

@keyframes nx-glass-rise {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
}

/* ================================================================== sign-in, sign-up and public pages */

.nx-auth {
    font-family: var(--nx-font);
}
.nx-auth .nx-title,
.nx-auth .nx-q {
    font-family: var(--nx-display);
    font-stretch: normal;
}
.nx-auth .nx-title {
    font-weight: 700;
    letter-spacing: -.028em;
}

/* the card: a large sheet of dark glass */
.nx-auth .nx-card {
    border: 0;
    border-radius: var(--nx-card-radius);
    background-color: rgb(22 22 28 / .5);
    background-image: none;
    -webkit-backdrop-filter: blur(28px) saturate(1.7);
    backdrop-filter: blur(28px) saturate(1.7);
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 30px 90px -30px rgb(0 0 0 / .85), 0 0 90px -40px rgb(var(--accent-rgb) / .6);
}
.nx-auth .nx-card.lg-glass {
    background-image: var(--lg-rim, none);
}

/* fields: glisse inputs, a little taller for the floating label */
.nx-auth .nx-field input,
.nx-auth select,
.nx-auth textarea {
    border: 0;
    border-radius: 18px;
    background-color: var(--lg-glass);
    -webkit-backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
    transition: background-color 200ms ease, box-shadow 200ms ease;
}
.nx-auth .nx-field input:hover,
.nx-auth select:hover,
.nx-auth textarea:hover {
    background-color: rgb(52 52 60 / .6);
}
.nx-auth .nx-field input:focus,
.nx-auth select:focus,
.nx-auth textarea:focus {
    background-color: var(--lg-glass-active);
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 0 0 4px rgb(var(--accent-rgb) / .3);
    outline: none;
}
.nx-auth .nx-field input:-webkit-autofill {
    box-shadow: 0 0 0 100px #26262c inset;
}
.nx-auth select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ebebf5' stroke-opacity='.6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}
.nx-auth select option {
    background: #1c1c22;
}

/* the code boxes for the emailed code */
.nx-auth .nx-otp-box {
    border: 0;
    border-radius: 14px;
    color: var(--lg-foreground);
    background-color: var(--lg-glass);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.nx-auth .nx-otp-box.is-active {
    background-color: var(--lg-glass-active);
    box-shadow: inset 0 0 0 .5px var(--lg-edge), 0 0 0 4px rgb(var(--accent-rgb) / .3);
}

/* buttons: the main one filled with the accent, the ghost one clear glass */
.nx-auth .nx-btn {
    min-height: 0;
    height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: 24px;
    color: #fff;
    background-color: var(--lg-fill);
    box-shadow: inset 0 .5px 0 rgb(255 255 255 / .35), 0 10px 30px -12px rgb(var(--accent-rgb) / .95);
    font-weight: 600;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 200ms ease, box-shadow 200ms ease;
}
.nx-auth .nx-btn:hover {
    background-color: color-mix(in srgb, var(--lg-fill) 88%, #fff);
    box-shadow: inset 0 .5px 0 rgb(255 255 255 / .35), 0 14px 36px -12px rgb(var(--accent-rgb));
}
.nx-auth .nx-btn:active,
.nx-auth .nx-btn[data-pressed] {
    background-color: color-mix(in srgb, var(--lg-fill) 85%, #000);
}
.nx-auth .nx-btn .nx-spinner {
    border-color: rgb(255 255 255 / .3);
    border-top-color: #fff;
}
.nx-auth .nx-btn.nx-btn--ghost {
    color: var(--lg-foreground);
    background-color: var(--lg-glass);
    -webkit-backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    backdrop-filter: blur(3px) var(--lg-filter, saturate(1.5));
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .nx-btn.nx-btn--ghost.lg-glass {
    background-image: var(--lg-rim, none);
}
.nx-auth .nx-btn.nx-btn--ghost:hover,
.nx-auth .nx-btn.nx-btn--ghost[data-pressed] {
    background-color: var(--lg-glass-active);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}

/* the service chooser: a glass field and glisse's Menu card */
.nx-auth .dropdown-selected {
    border: 0;
    border-radius: 18px;
    background-color: var(--lg-glass);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .dropdown-selected:hover {
    background-color: var(--lg-glass-active);
}
.nx-auth .dropdown-options {
    padding: 6px;
    border: 0;
    border-radius: 20px;
    background: var(--lg-surface);
    -webkit-backdrop-filter: blur(22px) saturate(1.9);
    backdrop-filter: blur(22px) saturate(1.9);
    box-shadow: inset 0 0 0 .5px var(--lg-surface-edge), 0 12px 40px var(--lg-shadow);
    transform-origin: 50% 0;
}
.nx-auth .custom-dropdown.open .dropdown-options {
    animation: nx-menu-open 280ms cubic-bezier(.3, 1.3, .5, 1);
}
.nx-auth .dropdown-item {
    border-radius: 14px;
    color: var(--lg-foreground);
}
.nx-auth .dropdown-item:hover {
    background: var(--lg-highlight);
}
.nx-auth .dropdown-item.active {
    background: var(--lg-selection);
}
@keyframes nx-menu-open {
    from { opacity: 0; transform: scale(.85); }
}

/* callouts: tinted glass */
.nx-auth .nx-callout {
    border: 0;
    border-radius: 18px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .nx-callout.nx-callout--danger {
    background: rgb(255 66 69 / .14);
    box-shadow: inset 0 0 0 .5px rgb(255 66 69 / .45);
}
.nx-auth .nx-callout.nx-callout--ok {
    background: rgb(48 209 88 / .14);
    box-shadow: inset 0 0 0 .5px rgb(48 209 88 / .45);
}

/* the round icon above the title */
.nx-auth .nx-status {
    border: 0;
    background: rgb(var(--accent-rgb) / .18);
    box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .16), 0 0 40px -10px rgb(var(--accent-rgb) / .8);
}

/* the language picker under the card: glisse's tab bar */
.nx-auth .nx-langs:has(> [aria-current]) {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    max-width: 100%;
    padding: 4px;
    border-radius: 22px;
    background: rgb(118 118 128 / .18);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    backdrop-filter: blur(16px) saturate(1.6);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .nx-langs:has(> [aria-current]) > a,
.nx-auth .nx-langs:has(> [aria-current]) > span {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    color: var(--lg-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 200ms ease, background-color 200ms ease;
}
.nx-auth .nx-langs:has(> [aria-current]) > a:hover,
.nx-auth .nx-langs:has(> [aria-current]) > a:focus-visible {
    color: var(--lg-foreground);
    text-decoration: none;
}
.nx-auth .nx-langs > [aria-current] {
    color: var(--lg-foreground);
    background: var(--lg-selection);
    font-weight: 600;
}

/* the progress dots of sign-up */
.nx-auth .nx-progress span {
    background: var(--lg-track);
}
.nx-auth .nx-progress span.is-on {
    background: var(--lg-fill);
}

/* public pages: tables and folding answers in grouped plates */
.nx-auth .nx-prose details {
    padding: 14px 16px;
    margin: 0 0 8px;
    border: 0;
    border-radius: 18px;
    background: rgb(255 255 255 / .05);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .nx-prose code {
    padding: 1px 6px;
    border-radius: 6px;
    background: rgb(255 255 255 / .08);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .88em;
}

/* accounts to choose from (prompt=select_account): glass rows */
.nx-auth .nx-account {
    border: 0;
    border-radius: 20px;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 .5px var(--lg-edge);
}
.nx-auth .nx-account:hover {
    background: var(--lg-highlight);
}

@media (max-width: 30rem) {
    .nx-auth .nx-card {
        border-radius: 24px;
    }
}

/* fixes over the older stylesheet */
html.nx-one .nx-menu > .dropbtn {
    background-color: var(--lg-glass);
}
html.nx-one .accountcenter p,
html.nx-one .accountcenter li,
html.nx-one .accountcenter label {
    letter-spacing: normal;
    word-spacing: normal;
}
html.nx-one .accountcenter form .settings > h3:first-child {
    margin-top: 4px;
    margin-left: 4px;
}
html.nx-one header.nx-bar.lg-glass {
    background-image: none;
}
