/* Analyse jump: the control beside the tabs and the report page.
   The control is laid out like the recording download bar above it. */
.js-area .js-analysis-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 0 0 12px;
}
.js-area .js-analysis-control .js-hint {
    margin: 0;
    font-size: 0.78rem;
}
.js-area .js-analysis-spinner[hidden] {
    display: none;
}

/* The report page: back link and downloads, then the stored document. */
.js-area .js-analysis-page-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    padding: 0 0 12px;
}
.js-area .js-analysis-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.js-area .js-analysis-frame {
    display: block;
    width: 100%;
    min-height: 70vh;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 8px;
    background: #ffffff;
}

@media (max-width: 600px) {
    .js-area .js-analysis-page-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .js-area .js-analysis-page-actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* The toast that says an analysis is ready or has failed. New to Jump Story;
   placed and timed like Active Pilot's, coloured from the Jump Story theme,
   and clickable because it carries View report. */
.js-toast-region {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(560px, calc(100% - 32px));
}
.js-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--js-line, #d1d5db);
    border-left: 4px solid var(--js-accent, #a7cc00);
    background: var(--js-surface, #ffffff);
    color: var(--js-ink, #1f2d3d);
    box-shadow: 0 6px 18px var(--js-shadow, rgba(0, 0, 0, 0.18));
    font-size: 0.9rem;
}
.js-toast[data-tone="error"] {
    border-left-color: #dc2626;
}
.js-toast-text {
    flex: 1 1 auto;
}
.js-toast .js-toast-action {
    flex: 0 0 auto;
}
.js-toast-close {
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    border: 0;
    background: transparent;
    color: var(--js-ink-muted, #7b8692);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
