html, body, #app {
    min-height: 100%;
    margin: 0;
    background: #243354;
    color: #f4f6fb;
}

body {
    font-family: Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
}

.site-shell {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(195, 151, 51, 0.18), transparent 55%),
        radial-gradient(900px 400px at 100% 0%, rgba(110, 138, 195, 0.22), transparent 50%),
        #243354;
}

.site-appbar.mud-appbar {
    background: rgba(51, 72, 115, 0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-button {
    text-transform: none !important;
    color: inherit !important;
    padding-left: 0 !important;
}

.brand-mark {
    font-size: 1.45rem;
    letter-spacing: -0.04em;
    color: #c39733;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.brand-mark i {
    font-style: normal;
    color: #e3c685;
    font-size: 0.9em;
}

.brand-tag {
    display: none;
    margin-left: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: #6e8ac3;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.15;
    border-radius: 4px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

@media (min-width: 600px) {
    .brand-tag {
        display: inline-block;
    }
}

.site-main {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.hero {
    padding: 4.5rem 0 3.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: #e3c685;
    margin: 0 0 0.75rem;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.28);
}

.hero-title i {
    font-style: normal;
    color: #c39733;
}

.hero-lede {
    max-width: 38rem;
    margin: 1rem 0 1.75rem;
    font-size: 1.15rem;
    line-height: 1.55;
    color: #c5d0e6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-block {
    padding-bottom: 3.5rem;
}

.section-title {
    color: #fff !important;
}

.section-copy {
    color: #c5d0e6 !important;
    max-width: 40rem;
    margin-top: 0.4rem !important;
}

.glass-card {
    height: 100%;
    padding: 1.4rem 1.35rem 1.15rem;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
}

.project-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
}

.lab-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.card-icon {
    color: #c39733;
    font-size: 2rem !important;
    margin-bottom: 0.65rem;
}

.card-icon.small {
    font-size: 1.6rem !important;
}

.card-copy {
    color: #c5d0e6 !important;
    margin: 0.45rem 0 1rem !important;
    flex: 1;
}

.card-actions,
.lab-link {
    margin-top: auto;
}

.site-footer {
    margin-top: auto;
    background: #6e8ac3;
    color: #243354;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 0;
    font-size: 0.92rem;
}

.footer-row p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.1rem;
}

.footer-links a {
    color: #243354;
    font-weight: 600;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.lab-wrap {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

.lab-title {
    color: #fff !important;
}

.lab-lede {
    color: #c5d0e6 !important;
    margin: 0.35rem 0 1.4rem !important;
    max-width: 44rem;
}

.lab-panel {
    padding: 1.15rem !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sample-doc {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(18, 26, 45, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sample-doc h2,
.sample-doc h3 {
    margin: 0.4rem 0;
}

.sample-doc p,
.sample-doc li {
    color: #d7deec;
}

.lab-hit {
    outline: 2px solid #c39733;
    background: rgba(195, 151, 51, 0.28);
    box-shadow: 0 0 0 4px rgba(195, 151, 51, 0.15);
}

.event-stage {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(110, 138, 195, 0.28);
    border: 1px dashed rgba(255, 255, 255, 0.35);
    cursor: pointer;
    user-select: none;
    outline: none;
}

.event-log {
    max-height: 280px;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
}

.fx-box {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    background: linear-gradient(145deg, #c39733, #6e8ac3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.fx-fade {
    opacity: 0.12;
}

.fx-slide {
    transform: translateX(72px);
    opacity: 0.35;
}

.fx-scale {
    transform: scale(0.42);
}

.fx-pulse {
    animation: pulse-pop 0.7s ease;
}

@keyframes pulse-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.array-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.regex-hit {
    background: #c39733;
    color: #1e2a45;
    padding: 0 0.15em;
    border-radius: 3px;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #c39733;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    color: #e3c685;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
    background: #c39733;
    color: #1e2a45;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

h1:focus {
    outline: none;
}
