#blazor-error-ui {
    color-scheme: light;
    background: rgba(30, 30, 45, 0.95);
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
    display: none;
    left: 50%;
    right: auto;
    bottom: 1rem;
    width: min(52rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    padding: 0.85rem 4rem 0.85rem 1rem;
    position: fixed;
    z-index: 2000;
}

    #blazor-error-ui .reload {
        color: #594AE2;
        font-weight: 600;
        margin-left: 0.5rem;
        text-decoration: none;
    }

        #blazor-error-ui .reload:hover {
            text-decoration: underline;
        }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 0.55rem;
        width: 1.75rem;
        height: 1.75rem;
        line-height: 1.65rem;
        text-align: center;
        border-radius: 999px;
        color: #d7d7df;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

        #blazor-error-ui .dismiss:hover {
            background: rgba(255, 255, 255, 0.12);
        }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY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uNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ---------------------------------------------------------------------------
   First-load splash.

   Replaces the template's grey-and-#594AE2 ring, which was MudBlazor's default
   rather than anything of ours.

   This is the only screen a first-time visitor is guaranteed to see: a
   WebAssembly runtime is several MB, so on campus wifi it holds for ten seconds
   or more. It therefore has to do three things a logo alone does not: show that
   progress is real, avoid appearing at all when the load is instant, and offer a
   way out when the load never finishes.

   Lives in app.css but uses brand.css's tokens, which is safe because brand.css
   is linked first. No JavaScript: everything below is driven either by the CSS
   custom properties Blazor's loader sets on the root element, or by time.
   --------------------------------------------------------------------------- */

.upcsg-splash {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;

    /* The hero's own ground, so the site fades into itself rather than cutting
       from one screen to a different one. */
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(83, 37, 126, 0.55) 0%, transparent 70%),
        linear-gradient(180deg, #16113A 0%, #0D0B26 100%);
    color: #F6FFE9;

    /* Held back so a warm load never flashes it. Blazor replaces #app the moment
       it boots; from cache that happens well inside 300ms and this never paints. */
    opacity: 0;
    animation: upcsg-splash-in 0.5s ease-out 0.3s forwards;
}

@keyframes upcsg-splash-in {
    to { opacity: 1; }
}

/* Bloom behind the crest. Decorative and sized in vmin so it stays circular. */
.upcsg-splash__glow {
    position: absolute;
    width: 70vmin;
    height: 70vmin;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(162, 83, 184, 0.32) 0%, transparent 65%);
    animation: upcsg-splash-breathe 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes upcsg-splash-breathe {
    0%, 100% { transform: scale(1);    opacity: 0.75; }
    50%      { transform: scale(1.08); opacity: 1; }
}

.upcsg-splash__crest {
    position: relative;
    width: min(46vw, 240px);
    height: auto;
    filter: drop-shadow(0 0 40px rgba(162, 83, 184, 0.5));
}

.upcsg-splash__word {
    position: relative;
    margin: 0;
    font-family: var(--upcsg-font-heading, 'Poppins', sans-serif);
    font-size: clamp(0.7rem, 2.2vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(246, 255, 233, 0.72);
}

/* Real progress, not a spinner. Blazor's loader writes --blazor-load-percentage
   onto the root element, so a stalled download visibly stops moving, which is
   the honest signal, and what tells someone their connection died rather than
   leaving them to guess. */
.upcsg-splash__track {
    position: relative;
    width: min(60vw, 260px);
    height: 3px;
    border-radius: 99px;
    background: rgba(246, 255, 233, 0.14);
    overflow: hidden;
}

.upcsg-splash__bar {
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #A253B8 0%, #F6C875 100%);
    transition: width 0.2s ease-out;
}

.upcsg-splash__pct {
    position: relative;
    margin: 0;
    font-family: var(--upcsg-font-body, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: rgba(202, 197, 229, 0.75);
}

.upcsg-splash__pct::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* The escape hatch.

   Every deploy re-fingerprints the runtime (dotnet.<hash>.js), and a browser
   holding a stale index.html asks for a hash that no longer exists, which
   fails silently and leaves this screen up forever. Nothing client-side can fix
   that, but saying so beats an endless shimmer, and a hard refresh does fix it.

   Time-triggered rather than error-triggered on purpose: it should also appear
   for a connection that has simply died, which raises no error either. */
.upcsg-splash__slow {
    position: relative;
    max-width: 30rem;
    margin: 0;
    font-family: var(--upcsg-font-body, 'Inter', sans-serif);
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(202, 197, 229, 0.85);

    opacity: 0;
    animation: upcsg-splash-in 0.6s ease-out 20s forwards;
}

.upcsg-splash__slow a {
    color: var(--upcsg-liquid-chrome-gold, #F6C875);
}

@media (prefers-reduced-motion: reduce) {
    /* The fades stay: they are what stops the splash flashing on a warm load,
       and removing them would make the experience worse, not calmer. Only the
       looping animation goes. */
    .upcsg-splash__glow {
        animation: none;
    }

    .upcsg-splash__bar {
        transition: none;
    }
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
