.cf-turnstile {
    display: flex;
    justify-content: center;
    width: 100%;
}
.demo-pw-box {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid rgba(3, 45, 96, 0.18);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(1, 118, 211, 0.07), rgba(1, 118, 211, 0.02));
}

.demo-pw-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neutral-foreground-hint);
    margin-bottom: 0.5rem;
}

.demo-pw-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

/* The password itself: big monospace in a white field; user-select:all so one click grabs all of it. */
.demo-pw-value {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    background: #ffffff;
    border: 1px solid rgba(3, 45, 96, 0.22);
    border-radius: 8px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    /* Sized so a 16-char password fits without triggering the horizontal scrollbar, down to ~320px wide. */
    font-size: clamp(0.78rem, 3.4vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #032d60;
    user-select: all;
    -webkit-user-select: all;
    overflow-x: auto;
    white-space: nowrap;
}

.demo-copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1.05rem;
    border: none;
    border-radius: 8px;
    background: var(--accent-fill-rest, #0176d3);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 140ms ease;
}

    .demo-copy-btn:hover { background: #015fb0; }
    .demo-copy-btn:active { transform: translateY(1px); }

    .demo-copy-btn .demo-copy-check,
    .demo-copy-btn .demo-copy-label-done { display: none; }

    .demo-copy-btn.copied { background: #107c10; }

        .demo-copy-btn.copied .demo-copy-icon,
        .demo-copy-btn.copied .demo-copy-label-copy { display: none; }

        .demo-copy-btn.copied .demo-copy-check { display: inline-flex; }
        .demo-copy-btn.copied .demo-copy-label-done { display: inline; }

.demo-pw-hint {
    margin-top: 0.65rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--neutral-foreground-hint);
}

/* Inline hint shown by js/turnstile.js if the visitor tries to submit before solving the CAPTCHA. */
.cf-hint {
    margin: -0.35rem 0 0.1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #8a5a10;
}

/* ---- Demo provisioning loader (shown by js/demo-loader.js while the demo account is created) ---- */
.demo-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(8, 26, 49, 0.55);
    backdrop-filter: blur(3px);
    animation: demo-loader-in 160ms ease-out;
}

@keyframes demo-loader-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.demo-loader-panel {
    width: min(100%, 420px);
    padding: 2rem 1.75rem 1.5rem;
    border-radius: 14px;
    background: var(--neutral-layer-1, #ffffff);
    box-shadow: 0 40px 90px -28px rgba(3, 45, 96, 0.55);
    text-align: center;
}

.demo-loader-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 1.15rem;
    border-radius: 50%;
    border: 3.5px solid rgba(1, 118, 211, 0.18);
    border-top-color: var(--accent-fill-rest, #0176d3);
    animation: demo-loader-spin 0.8s linear infinite;
}

@keyframes demo-loader-spin {
    to { transform: rotate(360deg); }
}

.demo-loader-title {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--neutral-foreground-rest, #1a1a1a);
}

.demo-loader-msg {
    min-height: 1.4em;
    font-size: 0.95rem;
    color: var(--neutral-foreground-hint, #5b5b5b);
    transition: opacity 200ms ease;
}

.demo-loader-bar {
    margin: 1.3rem 0 0.95rem;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(1, 118, 211, 0.12);
}

.demo-loader-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-fill-rest, #0176d3), #2b9be8);
    transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-loader-foot {
    font-size: 0.8rem;
    color: var(--neutral-foreground-hint, #777777);
}

@media (prefers-reduced-motion: reduce) {
    .demo-loader {
        animation: none;
    }

    .demo-loader-spinner {
        animation-duration: 1.6s;
    }

    .demo-loader-bar span {
        transition: none;
    }
}

/* ---- Demo-mode SQL/SOQL note on the Ask page — a soft, professional callout ---- */
.demo-tabs {
    flex: 0 0 auto;
    margin: 0 0 0.45rem;
}

.demo-mode-note {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(1, 118, 211, 0.18);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(1, 118, 211, 0.06), rgba(1, 118, 211, 0.02));
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--neutral-foreground-rest);
}

.demo-mode-note-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 0.05rem;
    border-radius: 50%;
    background: rgba(1, 118, 211, 0.12);
    color: #0176d3;
}

    .demo-mode-note-text strong {
        color: #032d60;
        font-weight: 700;
    }

/* Inside the fixed-height Ask shell so it reduces the scrollable transcript rather than pushing
   the question composer below the viewport. Keep it compact because the demo context is secondary. */
.demo-mode-note-inline {
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    padding: 0.38rem 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.3;
}

.demo-mode-note-inline .demo-mode-note-icon {
    width: 20px;
    height: 20px;
    margin-top: 0;
    font-size: 0.75rem;
}
