/* The local footer keeps Help, Privacy and Imprint. Bundled legal notices are unchanged. */
.mx_AuthFooter a[href="https://matrix.org"]{display:none}
.mx_DefaultWelcome_logo img{width:160px;max-width:60vw;height:auto;max-height:none}
.mx_AuthFooter{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;padding-inline:20px}
/* Keep the guest card readable when the OS selects the dark client theme. */
.mx_AuthPage_modal{background:#fff!important;color:#172c45!important;--cpd-color-text-primary:#172c45;--cpd-color-text-secondary:#42566b;--cpd-color-text-placeholder:#526578;--cpd-color-bg-canvas-default:#fff;--cpd-color-bg-subtle-primary:#f3f6fa;color-scheme:light}
.mx_AuthPage_modalContent,.mx_DefaultWelcome h1{color:#172c45!important}
.mx_DefaultWelcome_logo:not([href]){cursor:default}
@media(max-width:480px){.mx_AuthFooter{gap:12px;font-size:14px}.mx_DefaultWelcome_logo img{width:140px}}

/* Fit the native authentication card on narrow screens. */
@media(max-width:540px){.mx_AuthPage_modal{width:calc(100% - 24px)!important;max-width:calc(100vw - 24px);margin-inline:auto}.mx_AuthPage_modalContent{width:100%!important;min-width:0}.mx_AuthPage_modalContent>*{min-width:0;max-width:100%}.mx_Welcome{box-sizing:border-box;width:100%!important;padding:32px 24px 16px!important}.mx_DefaultWelcome{min-width:0;width:100%!important;max-width:100%}.mx_DefaultWelcome_buttons{width:100%!important}.mx_DefaultWelcome_buttons>a{width:100%!important;max-width:100%;box-sizing:border-box}.mx_DefaultWelcome h1{font-size:22px;line-height:1.3;overflow-wrap:anywhere}}

/* Custom legacy themes can inherit an OS root colour while their Compound
 * palette is set on body. Resolve native text at the palette's own scope. */
body.cpd-theme-light,body.cpd-theme-dark,body.cpd-theme-light-hc,body.cpd-theme-dark-hc{color:var(--cpd-color-text-primary)}
/* Legacy light-custom uses white active/hover labels with the modern pale
 * selection background. Use the current palette for text and SVG currentColor. */
.mx_TabbedView_tabsOnLeft .mx_TabbedView_tabLabel:is(:hover,:focus-visible,.mx_TabbedView_tabLabel_active){color:var(--cpd-color-text-primary)}
.mx_TabbedView_tabsOnLeft .mx_TabbedView_tabLabel:is(:hover,:focus-visible,.mx_TabbedView_tabLabel_active) .mx_TabbedView_tabLabel_text{color:inherit}
.mx_TabbedView_tabsOnLeft .mx_TabbedView_tabLabel:focus-visible{outline:2px solid var(--cpd-color-border-focused,#147ea6);outline-offset:2px}
