#login-notice {
    box-sizing: border-box;
    max-width: 480px;
    width: 100%;
    margin: 24px auto 32px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

#login-notice h2,
#login-notice h3 {
    margin: 18px 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

#login-notice h2:first-of-type,
#login-notice p:first-child {
    margin-top: 0;
}

#login-notice p { margin: 6px 0; }
#login-notice ul { margin: 8px 0; padding-left: 20px; }
#login-notice li { margin: 2px 0; }
#login-notice a { color: #0b5fa5; text-decoration: underline; }
#login-notice strong { font-weight: 600; }

html.dark-mode #login-notice {
    background: #2b2b2b;
    border-color: #444;
    color: #ddd;
}
html.dark-mode #login-notice h2,
html.dark-mode #login-notice h3 { color: #f0f0f0; }
html.dark-mode #login-notice a { color: #6db8f2; }

/*
 * The elastic skin's #layout is display:flex (row) with height:100% and
 * overflow:hidden, and on the login page it normally holds a single child
 * (#layout-content). Adding #login-notice as a second flex sibling makes
 * both compete for horizontal space: fine on wide screens, but it visibly
 * squeezes the login form on narrow ones. Below the skin's own tablet
 * breakpoint we make #layout wrap so the notice drops to its own row
 * below the login card instead, and let #layout scroll vertically since
 * it no longer fits a fixed 100% viewport height.
 *
 * #logo/#login-form also use position:relative + a "top: 20vh" offset as
 * a purely visual centering trick: it shifts them down on screen without
 * adding to #layout-content's actual box height. That's harmless when
 * #layout-content is the only row, but once #login-notice wraps onto the
 * next row, that row starts at the *unshifted* box boundary, so the
 * visually-shifted form paints on top of it. Replacing the offset with
 * real padding on mobile fixes that at the source.
 */
@media (max-width: 768px) {
    body.task-login #layout {
        flex-wrap: wrap;
        overflow-y: auto;
    }

    body.task-login #layout-content {
        flex: 0 0 auto;
        width: 100%;
        padding-top: 24px;
    }

    body.task-login #logo,
    body.task-login #login-form {
        position: static;
        top: auto;
    }

    body.task-login #login-notice {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        max-height: 45vh;
        overflow-y: auto;
        margin: 0 0 16px;
        padding: 16px;
        font-size: 12.5px;
    }
}
