/* AIScans V2 - Live analysis dashboard */

#live-analysis {
    max-width: 1190px;
    margin: 35px auto 55px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 35px var(--shadow);
    scroll-margin-top: 25px;
}

#live-analysis[hidden] {
    display: none;
}

.live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.live-kicker {
    font-size: 10px;
    letter-spacing: 1.7px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 10px;
}

.live-muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.live-verdict {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 25px;
    margin-bottom: 22px;
}

.live-verdict h3 {
    font-size: 27px;
    font-weight: 500;
    margin: 10px 0;
}

.live-verdict p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.live-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.live-metric {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.live-metric-label {
    font-size: 13px;
    color: var(--muted);
}

.live-metric-value {
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -1.5px;
    color: var(--blue);
}

.live-metric-note {
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
}

.live-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
}

.live-section h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 16px;
}

.live-observation {
    background: var(--soft);
    padding: 13px 17px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.live-passage-list {
    max-height: 550px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.live-passage {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.live-passage:last-child {
    border-bottom: 0;
}

.live-passage.flagged {
    background: #f4cb701c;
    border-left: 3px solid #e6a33c;
}

.live-sentence-number {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.live-passage p {
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.live-passage small {
    color: var(--muted);
    font-size: 11px;
}

.live-repeat-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.live-radar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    background: linear-gradient(
        110deg, #0b162b, #142d51
    );
    border-radius: 13px;
    color: white;
    padding: 25px;
}

.live-radar .live-kicker {
    color: #86b3ff;
}

.live-radar h3 {
    font-size: 23px;
    font-weight: 500;
    margin: 12px 0;
}

.live-radar p {
    font-size: 13px;
    color: #b5c8e5;
}

.primary:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

@media(max-width: 700px) {
    #live-analysis {
        margin: 20px 15px 35px;
        padding: 18px;
    }

    .live-header,
    .live-radar {
        flex-direction: column;
        align-items: flex-start;
    }

    .live-metric-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .live-metric {
        padding: 15px;
    }

    .live-metric-value {
        font-size: 27px;
    }

    .live-passage {
        padding: 15px;
    }
}

/* AIScans V2.1 machine learning dashboard */

.ml-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #3974d6;
    background: #3974d614;
    border: 1px solid #3974d630;
    border-radius: 5px;
    padding: 7px 10px;
    margin-bottom: 16px;
}

.ml-score-row {
    padding: 16px 0;
}

.ml-score-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 11px;
}

.ml-score-top strong {
    color: #2868df;
}

.ml-bar {
    height: 10px;
    border-radius: 30px;
    background: #8c9db425;
    overflow: hidden;
}

.ml-fill {
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(
        90deg, #6ea6ff, #2868df
    );
    transition: width .6s ease;
}

.ml-warning {
    border-left: 3px solid #d6a149;
    background: #d6a14915;
    border-radius: 5px;
    padding: 15px;
    font-size: 12px;
    line-height: 1.8;
}

html[data-theme="dark"] .ml-score-top strong,
html[data-theme="dark"] .ml-badge {
    color: #91baff;
}

@media(prefers-reduced-motion: reduce) {
    .ml-fill {
        transition: none;
    }
}
