/*
 * The signed-out pages (sign-in, two-factor, forgot/set password), rendered through
 * includes/login_theme.php. Standalone on purpose: these pages do not load
 * styles.css, so nothing here can leak into the app and nothing in the app can break this.
 *
 * Layers, back to front:
 *   .lp-bg     fixed backdrop. A built-in sky/green scene by default; photos from
 *              public/assets/login-backgrounds/ cross-fade over it when present
 *              (see includes/login_theme.php + login.js).
 *   .lp-band   green/gold swoosh along the bottom with the three values.
 *   .lp-stage  tagline + the frosted glass sign-in card.
 *
 * To restyle, start with the tokens in :root.
 */

@font-face {
    font-family: "Montserrat";
    src: url("./fonts/static/Montserrat-Medium.ttf") format("truetype"),
         url("./Montserrat/static/Montserrat-Medium.ttf") format("truetype"),
         url("./static/Montserrat-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("./fonts/static/Montserrat-Bold.ttf") format("truetype"),
         url("./Montserrat/static/Montserrat-Bold.ttf") format("truetype"),
         url("./static/Montserrat-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("./fonts/static/Montserrat-ExtraBoldItalic.ttf") format("truetype"),
         url("./Montserrat/static/Montserrat-ExtraBoldItalic.ttf") format("truetype"),
         url("./static/Montserrat-ExtraBoldItalic.ttf") format("truetype");
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

:root {
    --lp-navy: #0d2f5c;
    --lp-ink-soft: #2a4466;
    --lp-blue: #1565e8;
    --lp-blue-light: #3d8bff;
    --lp-blue-deep: #0f4fc0;
    --lp-green: #0f7a3c;
    --lp-green-dark: #0b4d34;
    --lp-gold: #f2b705;
    --lp-danger: #a3211a;
    --lp-success: #0b6b3a;

    /* Glass. Raise the alphas for a milkier card (safer on busy photos), lower for clearer. */
    --lp-glass-top: 0.62;
    --lp-glass-bottom: 0.30;
    --lp-glass-blur: 22px;
    --lp-glow: 110, 190, 255;
    --lp-radius: 30px;

    --lp-band-height: 150px;
    /* Space kept clear above and below the card on desktop layouts. */
    --lp-pad-top: 26px;
    --lp-pad-bottom: 34px;
    /* Height the card may fill on desktop: the window minus those two margins. */
    --lp-room: calc(100vh - var(--lp-pad-top) - var(--lp-pad-bottom));
}
@supports (height: 100dvh) {
    :root { --lp-room: calc(100dvh - var(--lp-pad-top) - var(--lp-pad-bottom)); }
}

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

html, body { height: 100%; margin: 0; }

body.lp-body {
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 500;
    color: var(--lp-navy);
    background: #cfe6fb;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.lp {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lp-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- backdrop */

.lp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.lp-bg-scene {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 15% 10%, #e9f5ff 0%, transparent 60%),
        radial-gradient(900px 500px at 85% 20%, #bfe0ff 0%, transparent 60%),
        radial-gradient(1000px 600px at 70% 95%, #b9e8c8 0%, transparent 60%),
        linear-gradient(180deg, #8cc6f5 0%, #cfe7fb 45%, #e8f6ee 70%, #a9dbb7 100%);
}
.lp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
    animation: lp-float 18s ease-in-out infinite;
}
.lp-orb-1 { width: 520px; height: 520px; left: -120px; top: -80px; background: #5aa8ff; }
.lp-orb-2 { width: 420px; height: 420px; right: -80px; top: 18%; background: #7fe0b0; animation-delay: -6s; }
.lp-orb-3 { width: 380px; height: 380px; left: 38%; bottom: -140px; background: #ffd76a; opacity: 0.45; animation-delay: -11s; }
@keyframes lp-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

.lp-bg-slide {
    position: absolute;
    inset: -4%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.8s ease;
    animation: lp-kenburns 26s ease-in-out infinite alternate;
}
.lp-bg-slide.is-shown { opacity: 1; }
@keyframes lp-kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.08) translate(-1%, -1%); }
}

/* Only matters over photos: a light wash on the tagline side and a hint of depth at the base,
   so the navy headline and the glass stay readable whatever picture is uploaded. */
.lp-bg-tint {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.8s ease;
    background:
        linear-gradient(90deg, rgba(240, 247, 255, 0.72) 0%, rgba(240, 247, 255, 0.38) 34%, rgba(240, 247, 255, 0) 62%),
        linear-gradient(180deg, rgba(210, 232, 255, 0.22) 0%, rgba(255, 255, 255, 0) 40%, rgba(15, 60, 40, 0.14) 100%);
}
.lp-bg.has-photo .lp-bg-tint { opacity: 1; }

.lp-chip {
    position: absolute;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 24px rgba(10, 40, 80, 0.12);
    animation: lp-drift 14s ease-in-out infinite;
}
.lp-chip-1 { width: 110px; height: 110px; left: 3%; top: 7%; }
.lp-chip-2 { width: 70px; height: 70px; left: 8%; top: 17%; animation-delay: -4s; }
.lp-chip-3 { width: 90px; height: 90px; right: 5%; top: 4%; animation-delay: -7s; }
.lp-chip-4 { width: 70px; height: 70px; right: 4%; top: 56%; animation-delay: -2s; }
.lp-chip-5 { width: 55px; height: 55px; left: 7%; top: 68%; animation-delay: -9s; }
@keyframes lp-drift {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-14px) rotate(3deg); }
}

/* ------------------------------------------------------------------- stage */

.lp-stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    /* minmax(0, 1fr) keeps both side columns exactly equal, so the card sits dead centre
       however wide the tagline is. */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 2.5vw;
    padding: var(--lp-pad-top) 3vw var(--lp-pad-bottom);
}

.lp-tagline {
    justify-self: end;
    max-width: 500px;
}
.lp-tagline-text {
    margin: 0;
    font-weight: 800;
    font-style: italic;
    /* Sized from the width of the side column (viewport minus card, gaps and padding), so
       "Better Community" always fits beside the card without pushing it. */
    font-size: clamp(22px, calc((100vw - 480px - 11vw) / 20.6), 50px);
    line-height: 1.06;
    letter-spacing: -0.5px;
    color: var(--lp-navy);
    text-shadow: 0 2px 18px rgba(255, 255, 255, 0.65);
}
.lp-tagline-for { color: var(--lp-blue); }
.lp-tagline-green {
    display: block;
    white-space: nowrap;
    color: var(--lp-green);
}
.lp-tagline svg {
    display: block;
    width: min(380px, 100%);
    margin-top: 8px;
}

/* -------------------------------------------------------------- glass card */

.lp-card-wrap {
    position: relative;
    width: min(480px, 92vw);
    perspective: 1200px;
}

/* Registered so the angle can animate: this is what makes the rim light travel. */
@property --lp-angle {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0deg;
}
@keyframes lp-spin { to { --lp-angle: 360deg; } }

/* Coloured light bleeding out from behind the glass. */
.lp-halo {
    position: absolute;
    inset: -18px;
    z-index: 0;
    border-radius: calc(var(--lp-radius) + 18px);
    background: conic-gradient(from var(--lp-angle),
        rgba(var(--lp-glow), 0) 0deg,
        rgba(var(--lp-glow), 0.75) 60deg,
        rgba(120, 230, 170, 0.55) 140deg,
        rgba(var(--lp-glow), 0) 200deg,
        rgba(255, 215, 110, 0.45) 270deg,
        rgba(var(--lp-glow), 0) 360deg);
    filter: blur(28px);
    opacity: 0.75;
    animation: lp-spin 14s linear infinite;
}

.lp-card {
    position: relative;
    z-index: 1;
    padding: 30px 40px 28px;
    border-radius: var(--lp-radius);
    text-align: center;
    transform: rotateX(var(--lp-rx, 0deg)) rotateY(var(--lp-ry, 0deg));
    transition: transform 0.3s ease-out;

    background: linear-gradient(135deg,
        rgba(255, 255, 255, var(--lp-glass-top)) 0%,
        rgba(255, 255, 255, calc((var(--lp-glass-top) + var(--lp-glass-bottom)) / 2)) 45%,
        rgba(255, 255, 255, var(--lp-glass-bottom)) 100%);
    -webkit-backdrop-filter: blur(var(--lp-glass-blur)) saturate(170%);
    backdrop-filter: blur(var(--lp-glass-blur)) saturate(170%);

    /* The 3-D edge: bright top lip, thick lit sides, glow pooling at the base, then the
       outer glow and the lift shadow. */
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -2px 0 rgba(255, 255, 255, 0.35),
        inset 14px 0 22px -14px rgba(255, 255, 255, 0.95),
        inset -14px 0 22px -14px rgba(255, 255, 255, 0.95),
        inset 0 -30px 40px -30px rgba(var(--lp-glow), 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.25),
        0 0 18px rgba(var(--lp-glow), 0.7),
        0 0 45px rgba(var(--lp-glow), 0.4),
        0 0 90px rgba(var(--lp-glow), 0.18),
        0 40px 80px -20px rgba(8, 35, 80, 0.45),
        0 18px 30px -18px rgba(8, 35, 80, 0.35);
}
/* Thin light running around the rim. */
.lp-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.6px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(from var(--lp-angle),
        rgba(255, 255, 255, 0.15) 0deg,
        rgba(255, 255, 255, 1) 40deg,
        rgba(var(--lp-glow), 1) 70deg,
        rgba(255, 255, 255, 0.15) 120deg,
        rgba(255, 255, 255, 0.15) 200deg,
        rgba(140, 235, 180, 0.95) 240deg,
        rgba(255, 255, 255, 0.15) 290deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: lp-spin 14s linear infinite;
}
/* Diagonal sheen plus a highlight that follows the pointer. */
.lp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(420px circle at var(--lp-mx, 30%) var(--lp-my, 0%), rgba(255, 255, 255, 0.5), transparent 45%),
        linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.3) 42%, transparent 52%);
    mix-blend-mode: soft-light;
}
.lp-card > * {
    position: relative;
    z-index: 2;
}

/* Browsers without backdrop-filter get a mostly solid card instead of unreadable text. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .lp-card { background: rgba(255, 255, 255, 0.9); }
}

.lp-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}
.lp-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: var(--lp-navy);
    text-wrap: balance;
}
.lp-sub {
    max-width: 340px;
    margin: 8px auto 20px;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--lp-ink-soft);
}

.lp-alert {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-left-width: 4px;
}
.lp-alert-error { color: var(--lp-danger); border-left-color: #d92d20; }
.lp-alert-success { color: var(--lp-success); border-left-color: var(--lp-green); }

/* Service switch: real radio buttons, drawn as a sliding pill. */
.lp-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 20px;
    padding: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 2px 6px rgba(13, 47, 92, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}
.lp-tabs-pill {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--lp-blue-light), var(--lp-blue));
    box-shadow: 0 6px 18px rgba(21, 101, 232, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.35s cubic-bezier(0.6, 0.05, 0.3, 1.2);
}
.lp-tabs[data-active="behavior"] .lp-tabs-pill { transform: translateX(100%); }
.lp-tab {
    position: relative;
    z-index: 1;
    cursor: pointer;
}
.lp-tab input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.lp-tab span {
    display: block;
    padding: 11px 8px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--lp-navy);
    transition: color 0.25s;
}
.lp-tab input:checked + span { color: #fff; }
.lp-tab input:focus-visible + span { outline: 3px solid rgba(13, 47, 92, 0.55); outline-offset: 2px; }

.lp-field {
    margin-bottom: 14px;
    text-align: left;
}
.lp-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--lp-navy);
}
.lp-input {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 2px 4px rgba(13, 47, 92, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: box-shadow 0.2s, background 0.2s;
}
.lp-input:focus-within {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 139, 255, 0.4), 0 0 18px rgba(var(--lp-glow), 0.5);
}
.lp-input input {
    flex: 1;
    min-width: 0;
    padding: 13px 14px;
    border: 0;
    outline: 0;
    border-radius: 12px;
    background: transparent;
    font: 500 15px "Montserrat", system-ui, sans-serif;
    color: var(--lp-navy);
}
.lp-eye {
    display: flex;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #2b4a72;
    cursor: pointer;
}
.lp-eye:focus-visible { outline: 3px solid rgba(61, 139, 255, 0.6); outline-offset: -2px; }
.lp-eye svg { width: 22px; height: 22px; }
.lp-eye .lp-eye-off { display: none; }
.lp-eye[aria-pressed="true"] .lp-eye-on { display: none; }
.lp-eye[aria-pressed="true"] .lp-eye-off { display: block; }

.lp-caps {
    margin: 6px 2px 0;
    font-size: 13px;
    font-weight: 700;
    color: #8a4b00;
}
.lp-caps[hidden] { display: none; }
.lp-hint {
    margin: 7px 2px 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--lp-ink-soft);
}

.lp-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    font: 800 16.5px "Montserrat", system-ui, sans-serif;
    color: #fff;
    background: linear-gradient(180deg, #2f7dff 0%, #1257d6 100%);
    box-shadow: 0 10px 26px rgba(18, 87, 214, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.15s, box-shadow 0.2s;
}
.lp-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s;
}
.lp-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(18, 87, 214, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.lp-submit:hover::after { left: 120%; }
.lp-submit:active { transform: translateY(1px); }
.lp-submit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lp-submit svg { width: 20px; height: 20px; }
.lp-submit.is-busy { cursor: progress; opacity: 0.85; }

.lp-forgot {
    display: inline-block;
    margin-top: 16px;
    font-weight: 700;
    color: var(--lp-blue-deep);
    text-decoration: none;
}
.lp-forgot:hover { text-decoration: underline; }
.lp-forgot:focus-visible { outline: 3px solid rgba(61, 139, 255, 0.6); outline-offset: 3px; border-radius: 4px; }
.lp-note {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--lp-ink-soft);
}

/* ------------------------------------------------- two-factor page pieces */

/* One-time code: big, centred, spaced digits. The left padding balances the trailing
   letter-spacing so the digits sit truly centred. */
.lp-input-code input {
    padding-left: calc(14px + 0.35em);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
}
.lp-input-code input::placeholder { color: rgba(13, 47, 92, 0.28); }

.lp-input-readonly { background: rgba(255, 255, 255, 0.6); }
.lp-input textarea {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 0;
    outline: 0;
    border-radius: 12px;
    background: transparent;
    resize: vertical;
    color: var(--lp-navy);
}
.lp-input .lp-mono {
    font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
    font-size: 13.5px;
    letter-spacing: 0.06em;
}
.lp-input textarea.lp-mono { font-size: 12.5px; letter-spacing: 0; line-height: 1.45; word-break: break-all; }

.lp-qr {
    display: block;
    width: 190px;
    height: 190px;
    margin: 0 auto 16px;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(13, 47, 92, 0.15);
}

.lp-details {
    margin-bottom: 14px;
    text-align: left;
}
.lp-details summary {
    padding: 6px 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--lp-blue-deep);
}
.lp-details summary:focus-visible { outline: 3px solid rgba(61, 139, 255, 0.6); outline-offset: 2px; }
.lp-details[open] summary { margin-bottom: 10px; }

.lp-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.lp-link-btn {
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--lp-navy);
    text-decoration: none;
}
.lp-link-btn:hover { background: #fff; }
.lp-link-btn:focus-visible { outline: 3px solid rgba(61, 139, 255, 0.6); outline-offset: 2px; }

/* ------------------------------------------------------------- footer band */

.lp-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: var(--lp-band-height);
    pointer-events: none;
}
.lp-band svg {
    display: block;
    width: 100%;
    height: 100%;
}
.lp-band-phone { display: none; }
.lp-values {
    position: absolute;
    left: 1.2vw;
    bottom: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #fff;
}
.lp-values li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
}
.lp-values li + li { border-left: 2px solid rgba(255, 255, 255, 0.6); }
.lp-values svg { width: 30px; height: 30px; }

/* -------------------------------------------------------------- responsive */

/* Desktop: the card stretches down to use the free height above the band (up to a sensible
   maximum), and the extra room is shared out between its parts instead of pooling in one gap. */
@media (min-width: 1101px) {
    /* A tall, slim panel: it runs from near the top of the window down to just above the
       bottom edge (its lower corners rest over the thin middle of the green band), and its
       width follows its height so it never looks squat on a short screen. */
    .lp-card-wrap { width: clamp(390px, calc(var(--lp-room) * 0.68), 480px); }
    .lp-card {
        padding-left: 34px;
        padding-right: 34px;
    }
    /* Only the sign-in card stretches; the two-factor cards keep their natural height. */
    .lp-card-stretch {
        display: flex;
        flex-direction: column;
        min-height: min(780px, var(--lp-room));
    }
    .lp-card-stretch > * { flex: 0 0 auto; }
    .lp-card-stretch > .lp-logo { margin-top: auto; }
    .lp-card-stretch > .lp-note { margin-bottom: auto; }
    .lp-card-stretch > form {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
    }
    .lp-card-stretch > .lp-forgot { align-self: center; }
}

/* Short laptop screens (1366x768 and similar): tighten so the card never needs scrolling. */
@media (max-height: 840px) and (min-width: 1101px) {
    :root { --lp-band-height: 118px; --lp-pad-top: 18px; --lp-pad-bottom: 30px; }
    .lp-card { padding: 20px 32px 18px; }
    .lp-logo { width: 124px; margin-bottom: 4px; }
    .lp-title { font-size: 21px; }
    .lp-sub { margin: 6px auto 14px; font-size: 13.5px; }
    .lp-tabs { margin-bottom: 14px; }
    .lp-tab span { padding: 9px 8px; }
    .lp-field { margin-bottom: 10px; }
    .lp-field label { margin-bottom: 5px; }
    .lp-input input { padding: 11px 14px; }
    .lp-submit { padding: 12px; }
    .lp-forgot { margin-top: 12px; }
    .lp-note { margin-top: 6px; font-size: 13px; }
    .lp-values { bottom: 12px; }
    .lp-values li { padding: 0 14px; font-size: 13px; }
    .lp-values svg { width: 26px; height: 26px; }
}

/* Shorter still (a 768px-high screen once the browser toolbars are taken off). */
@media (max-height: 700px) and (min-width: 1101px) {
    :root { --lp-band-height: 96px; --lp-pad-top: 12px; --lp-pad-bottom: 26px; }
    .lp-card { padding: 14px 30px 14px; }
    .lp-logo { width: 96px; margin-bottom: 2px; }
    .lp-title { font-size: 19px; }
    .lp-sub { margin: 4px auto 10px; font-size: 13px; line-height: 1.35; }
    .lp-alert { margin-bottom: 10px; padding: 8px 12px; font-size: 13px; }
    .lp-tabs { margin-bottom: 10px; }
    .lp-tab span { padding: 8px; font-size: 13.5px; }
    .lp-field { margin-bottom: 8px; }
    .lp-field label { margin-bottom: 4px; font-size: 13.5px; }
    .lp-input input { padding: 9px 14px; }
    .lp-submit { margin-top: 4px; padding: 10px; font-size: 15.5px; }
    .lp-forgot { margin-top: 9px; font-size: 14px; }
    .lp-note { margin-top: 4px; font-size: 12.5px; line-height: 1.35; }
    .lp-values { bottom: 7px; }
    .lp-values li { gap: 3px; padding: 0 12px; font-size: 12px; }
    .lp-values svg { width: 20px; height: 20px; }
}

@media (max-width: 1100px) {
    .lp-stage {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 26px;
        padding-bottom: calc(var(--lp-band-height) + 20px);
    }
    .lp-tagline { justify-self: center; text-align: center; }
    .lp-tagline-text { font-size: clamp(28px, 5vw, 44px); }
    .lp-tagline svg { margin: 8px auto 0; }
    .lp-spacer { display: none; }
    .lp-values { bottom: 12px; }
    .lp-values li { gap: 4px; padding: 0 10px; font-size: 12px; }
    .lp-values svg { width: 22px; height: 22px; }
}

@media (max-width: 640px) {
    :root { --lp-band-height: 104px; --lp-radius: 24px; }
    .lp-stage { padding: 22px 4vw calc(var(--lp-band-height) + 14px); }
    .lp-tagline { display: none; }
    .lp-card { padding: 24px 20px 22px; }
    .lp-logo { width: 124px; }
    .lp-title { font-size: 21px; }
    .lp-chip { display: none; }
    .lp-values { left: 0; right: 0; bottom: 12px; justify-content: center; }
    .lp-values li { padding: 0 12px; font-size: 11.5px; }
    .lp-values svg { width: 24px; height: 24px; }
    .lp-band-sweep, .lp-band path:first-of-type { display: none; }
    .lp-band-phone { display: inline; }
    .lp-tab span { font-size: 13.5px; white-space: nowrap; }
}

@media (max-width: 380px) {
    .lp-card { padding: 22px 16px 20px; }
    .lp-tab span { padding: 10px 4px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* The two-factor cards are short, so on desktop they keep roomy spacing even on screens where
   the taller sign-in card has to tighten up. (Placed last; the :not() also outranks the
   short-screen rules above.) */
@media (min-width: 1101px) {
    .lp-card:not(.lp-card-stretch) { padding-top: 30px; padding-bottom: 28px; }
    .lp-card:not(.lp-card-stretch) .lp-logo { width: 132px; margin-bottom: 8px; }
    .lp-card:not(.lp-card-stretch) .lp-title { font-size: 23px; }
    .lp-card:not(.lp-card-stretch) .lp-sub { margin: 8px auto 22px; font-size: 14.5px; line-height: 1.45; }
    .lp-card:not(.lp-card-stretch) .lp-field { margin-bottom: 16px; }
    .lp-card:not(.lp-card-stretch) .lp-field label { margin-bottom: 7px; font-size: 14.5px; }
    .lp-card:not(.lp-card-stretch) .lp-input input { padding: 13px 14px; }
    .lp-card:not(.lp-card-stretch) .lp-input-code input { padding-left: calc(14px + 0.35em); }
    .lp-card:not(.lp-card-stretch) .lp-submit { padding: 14px; font-size: 16.5px; }
    .lp-card:not(.lp-card-stretch) .lp-forgot { margin-top: 18px; font-size: 15px; }
}

/* The organisation name on the sign-in card always stays on one line: its size follows the
   card's own width (18.2 is a little over the name's width in ems, 76px the card's side padding plus a
   little air), capped at the normal title size. */
@supports (font-size: 1cqi) {
    .lp-card-wrap { container-type: inline-size; }
    .lp-title.lp-title-oneline {
        font-size: min(24px, calc((100cqi - 76px) / 18.2));
        white-space: nowrap;
    }
}
