html, body {
    font-family: 'Sora', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:root {
    --ldv-ink: #0c1624;
    --ldv-navy: #0a1a33;
    --ldv-blue: #1a4fd6;
    --ldv-royal: #2563eb;
    --ldv-pine: #0f3d28;
    --ldv-moss: #1f8a45;
    --ldv-lime: #7ed957;
    --ldv-mist: #e6eef8;
    --ldv-paper: #f2f7f4;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #1a4fd6;
}

.btn-primary {
    color: #fff;
    background-color: #1a4fd6;
    border-color: #143fad;
}

.btn-primary:hover {
    background-color: #143fad;
    border-color: #0f3188;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(26, 79, 214, 0.35);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

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

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1a4fd6;
            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;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

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

code {
    color: #c02d76;
}

.auth-panel, .hero-panel {
    max-width: 34rem;
}

.trust-note {
    color: #3d4f5a;
    font-size: 0.95rem;
}

.recovery-key {
    background: #f4f7f9;
    border: 1px solid #c5d0d4;
    padding: 1rem;
    word-break: break-all;
    white-space: pre-wrap;
}

.brand-logo {
    display: block;
    height: auto;
    object-fit: contain;
}

.brand-logo-chrome {
    width: auto;
    height: 2.75rem;
}

.brand-logo-nav {
    width: auto;
    height: 2.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid #d0dae6;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #f7f9fc, #eef3f8);
    text-decoration: none;
    color: inherit;
}

.category-tile:hover {
    border-color: #5b8fd4;
}

.badge.unlocked {
    background: #1f8a45;
    color: #fff;
}

.badge.locked {
    background: #6c757d;
    color: #fff;
}

.vault-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vault-status .email {
    color: #555;
    font-size: 0.9rem;
}

.recovery-panel {
    max-width: 28rem;
}

.recovery-qr-frame {
    display: inline-flex;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #c5d4cb;
    border-radius: 0.5rem;
}

.recovery-qr-image {
    display: block;
    width: 240px;
    height: 240px;
    image-rendering: pixelated;
}

.policy-box {
    background: #f7faf8;
    border: 1px solid #c5d4cb;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
}

.policy-page {
    max-width: 40rem;
}

.emergency-alert {
    border-left: 4px solid #b58105;
}


.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    vertical-align: middle;
    cursor: help;
}

.info-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1px solid #5a7a68;
    color: #5a7a68;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.info-tip-bubble {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.45rem);
    transform: translateX(-50%);
    width: min(18rem, 70vw);
    padding: 0.65rem 0.75rem;
    border-radius: 0.4rem;
    background: #1f2a24;
    color: #f4f7f5;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.35;
    z-index: 20;
    box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.18);
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.info-tip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.35rem solid transparent;
    border-top-color: #1f2a24;
}

.info-tip:hover .info-tip-bubble,
.info-tip:focus .info-tip-bubble,
.info-tip:focus-within .info-tip-bubble {
    visibility: visible;
    opacity: 1;
}

.password-field {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.password-field .form-control {
    flex: 1 1 auto;
}

.password-toggle {
    flex: 0 0 auto;
    min-width: 4.25rem;
}

.required-mark {
    color: #b42318;
    font-weight: 700;
    margin-left: 0.15rem;
}

/* ——— Marketing landing ——— */

.page-marketing {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.page-marketing .marketing-shell {
    flex: 1;
    width: 100%;
    background: var(--ldv-paper);
}

.page-marketing .marketing-shell-home {
    background: transparent;
}

.marketing-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1.5rem;
    background: #05080f;
    border-bottom: 1px solid rgba(90, 140, 210, 0.28);
}

.marketing-chrome-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.marketing-chrome-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.marketing-chrome-nav a {
    color: #d5e2f2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.marketing-chrome-nav a:hover {
    color: #fff;
}

.marketing-chrome-cta {
    background: linear-gradient(105deg, #1a4fd6, #1f8a45) !important;
    color: #fff !important;
    padding: 0.4rem 0.85rem;
    border-radius: 0.45rem;
    font-weight: 600 !important;
}

.marketing-chrome-cta:hover {
    background: linear-gradient(105deg, #2563eb, #2aa555) !important;
    color: #fff !important;
}

.page-marketing .auth-panel,
.page-marketing .policy-page {
    margin: 2rem auto;
    padding: 0 1.25rem 3rem;
}

.landing {
    position: relative;
    color: var(--ldv-ink);
    background:
        radial-gradient(ellipse 80% 55% at 88% 18%, rgba(26, 79, 214, 0.28), transparent 55%),
        radial-gradient(ellipse 70% 50% at 12% 78%, rgba(31, 138, 69, 0.22), transparent 50%),
        linear-gradient(165deg, #05080f 0%, #0a1a33 38%, #e8eef6 38.1%, #f2f7f4 100%);
}

.landing-bar {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.5rem;
}

.landing-bar-sign-in {
    color: #d5e2f2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.landing-bar-sign-in:hover {
    color: #fff;
    text-decoration: underline;
}

.landing-bar-cta {
    color: #fff;
    background: linear-gradient(105deg, #1a4fd6, #1f8a45);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 0.45rem;
}

.landing-bar-cta:hover {
    background: linear-gradient(105deg, #2563eb, #2aa555);
    color: #fff;
}

.landing-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: end;
    overflow: hidden;
    padding: 5.5rem 1.5rem 3.5rem;
}

.landing-hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.landing-logo {
    position: absolute;
    right: 2%;
    top: 46%;
    width: min(78vw, 560px);
    height: auto;
    transform: translateY(-50%);
    filter: drop-shadow(0 18px 40px rgba(26, 79, 214, 0.28));
    animation: ldv-breathe 7s ease-in-out infinite;
}

.landing-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    animation: ldv-rise 0.9s ease-out both;
}

.landing-headline {
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    line-height: 1.35;
    color: #d5e2f2;
    margin: 0 0 0.85rem;
    max-width: 28rem;
}

.landing-support {
    font-size: 1rem;
    line-height: 1.55;
    color: #a8bdd4;
    margin: 0 0 1.75rem;
    max-width: 28rem;
}

.landing-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.landing-cta-primary {
    display: inline-block;
    background: linear-gradient(105deg, #1a4fd6, #1f8a45);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.25rem;
    border-radius: 0.45rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.landing-cta-primary:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.landing-cta-secondary {
    display: inline-block;
    color: #d5e2f2;
    text-decoration: none;
    font-weight: 500;
    padding: 0.7rem 0.4rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.landing-cta-secondary:hover {
    color: #fff;
    border-bottom-color: var(--ldv-lime);
}

.landing-section {
    max-width: 38rem;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.landing-section h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 650;
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin: 0 0 0.75rem;
    color: var(--ldv-navy);
}

.landing-section p {
    margin: 0;
    color: #3d4f5a;
    line-height: 1.6;
    font-size: 1.05rem;
}

.landing-disclaimer {
    margin-top: 1rem !important;
    font-size: 0.9rem !important;
    color: #5a6b78 !important;
}

.landing-section-final {
    padding-bottom: 5rem;
}

.landing-section-final .landing-cta-secondary {
    color: var(--ldv-moss);
}

.landing-section-final .landing-cta-secondary:hover {
    color: var(--ldv-blue);
}

@keyframes ldv-rise {
    from {
        opacity: 0;
        transform: translateY(1.1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ldv-breathe {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.96; }
    50% { transform: translateY(calc(-50% - 6px)) scale(1.02); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .landing-hero-copy,
    .landing-logo,
    .landing-cta-primary {
        animation: none;
        transition: none;
    }
}

@media (max-width: 720px) {
    .landing {
        background:
            radial-gradient(ellipse 100% 45% at 70% 12%, rgba(26, 79, 214, 0.28), transparent 55%),
            linear-gradient(180deg, #05080f 0%, #0a1a33 52%, #e8eef6 52.1%, #f2f7f4 100%);
    }

    .landing-hero {
        align-items: flex-end;
        padding-top: 4.5rem;
        padding-bottom: 2.5rem;
        min-height: 92vh;
    }

    .landing-logo {
        right: 50%;
        top: 22%;
        width: min(70vw, 280px);
        transform: translate(50%, 0);
        opacity: 0.95;
        animation: ldv-rise 1s ease-out both;
    }

    .landing-hero-copy {
        max-width: 100%;
    }
}

@media (min-width: 900px) {
    .landing-hero {
        align-items: center;
        padding-left: clamp(2rem, 8vw, 6rem);
        padding-right: clamp(2rem, 8vw, 6rem);
    }

    .landing-logo {
        right: 4%;
        top: 50%;
        width: min(46vw, 520px);
    }
}
