/* Prediction Log: shared DVP colors, with page-specific layout and controls. */
.prediction-log [hidden] { display: none !important; }

.prediction-log .log-header,
.prediction-log .log-section-heading,
.prediction-log .log-filter-footer,
.prediction-log .log-table-toolbar,
.prediction-log .log-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.prediction-log .log-header { align-items: flex-start; margin-bottom: 32px; }
.prediction-log .log-header .sub { margin: 0; max-width: 640px; }
.prediction-log .log-header > button { margin-top: 28px; flex-shrink: 0; }
.prediction-log .log-section-heading { margin-bottom: 22px; }
.prediction-log .log-section-heading h2 { margin-bottom: 0; }
.prediction-log .log-meta {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    overflow-wrap: anywhere;
}
.prediction-log .log-filter-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr) repeat(2,minmax(0,1fr)); gap: 18px; }
.prediction-log .log-filter-grid > div { min-width: 0; }
.prediction-log select,
.prediction-log input[type=date] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
}
.prediction-log input[type=date]:focus { border-color: var(--accent-text); }
.prediction-log .log-filter-footer { margin-top: 14px; gap: 12px; }
.prediction-log .log-secondary {
    border-color: var(--line);
    background: var(--panel);
    color: var(--text);
    font-weight: 500;
}
.prediction-log .log-secondary:hover { background: var(--panel-2); border-color: var(--muted); }
.prediction-log .log-text-button { background: transparent; color: var(--accent-text); padding: 6px 0; font-weight: 500; white-space: nowrap; }
.prediction-log .log-text-button:hover { text-decoration: underline; }
.prediction-log .log-summary { background-image: var(--data-veil); }
.prediction-log .log-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 16px; }
.prediction-log .log-stats > div { border-left: 1px solid var(--line); padding-left: 24px; min-width: 0; }
.prediction-log .log-stats > div:first-child { border-left: 0; padding-left: 0; }
.prediction-log dt { color: var(--muted); font-size: .76rem; }
.prediction-log dd { margin: 4px 0 0; font-size: clamp(1.65rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.4; font-variant-numeric: tabular-nums; }
.prediction-log .log-unit { white-space: nowrap; }
.prediction-log #mean-direction { font-size: .72rem; margin-top: 2px; }
.prediction-log .log-records .log-section-heading { align-items: flex-start; margin-bottom: 20px; }
.prediction-log #record-context { margin-top: 5px; }
.prediction-log .log-view-control { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.prediction-log .log-view-control label { margin: 0; }
.prediction-log .log-view-control select { width: auto; min-width: 130px; }
.prediction-log .log-table-toolbar { flex-wrap: wrap; padding-bottom: 14px; }
.prediction-log .log-table-options { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.prediction-log .log-checkbox { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-size: .76rem; cursor: pointer; }
.prediction-log .log-checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.prediction-log .log-page-size { display: flex; align-items: center; gap: 10px; }
.prediction-log .log-page-size label { margin: 0; white-space: nowrap; }
.prediction-log .log-page-size select { width: 82px; }
.prediction-log .log-status {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: var(--muted);
    border-block: 1px solid var(--line);
    background-image: var(--data-veil);
}
.prediction-log .log-status strong { color: var(--text); font-weight: 500; }
.prediction-log .log-status[data-kind=error] { color: var(--warn-text); }
.prediction-log .log-status p { margin: 0; max-width: 420px; }
.prediction-log .log-table { font-size: .82rem; }
.prediction-log .log-table th { font-size: .72rem; padding-block: 14px; background: var(--bg); }
.prediction-log .log-table td { padding-block: 15px; }
.prediction-log .log-table .log-division-cell { text-align: left; }
.prediction-log .log-table time { white-space: nowrap; }
.prediction-log .log-table .log-date-break td { border-top: 1px solid var(--muted); }
.prediction-log .log-table .log-model { display: none; color: var(--muted); text-align: left; }
.prediction-log.log-show-model-details .log-table .log-model { display: table-cell; }
.prediction-log .log-table .log-pending { color: var(--muted); font-size: .75rem; }
.prediction-log .log-division-group { border-top: 1px solid var(--line); margin-bottom: 16px; }
.prediction-log .log-division-group:last-child { margin-bottom: 0; }
.prediction-log .log-division-group summary { padding: 17px 0; cursor: pointer; font-family: var(--heading-font); font-weight: 600; }
.prediction-log .log-group-count { color: var(--muted); font: 400 .74rem var(--body-font); margin-left: 12px; white-space: nowrap; }
.prediction-log .log-pagination { padding: 20px 0 0; }
.prediction-log .log-page-buttons { display: flex; gap: 10px; }
.prediction-log .log-footnote { margin: 22px 0 0; color: var(--muted); font-size: .73rem; max-width: 780px; }
.prediction-log .log-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
    .prediction-log .log-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .prediction-log .log-stats { grid-template-columns: 1fr 1fr; }
    .prediction-log .log-stats > div:nth-child(odd) { border-left: 0; padding-left: 0; }
    .prediction-log .log-stats > div:nth-child(n+3) dt { min-height: 3.3em; }
    .prediction-log .log-table-toolbar { align-items: flex-start; gap: 10px; }
    .prediction-log .log-table-options { width: 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
    .prediction-log .log-header { flex-direction: column; gap: 16px; }
    .prediction-log .log-header > button { margin-top: 0; }
    .prediction-log .log-section-heading { flex-wrap: wrap; gap: 8px; }
    .prediction-log .log-filter-grid { gap: 14px 12px; }
    .prediction-log select, .prediction-log input[type=date] { font-size: 16px; padding: 9px 7px; }
    .prediction-log .log-filter-footer { align-items: flex-start; }
    .prediction-log .log-text-button { padding-top: 0; }
    .prediction-log .log-stats { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
    .prediction-log .log-stats > div { padding-left: 14px; }
    .prediction-log .log-records .log-section-heading { flex-direction: column; gap: 16px; }
    .prediction-log .log-view-control { width: 100%; }
    .prediction-log .log-view-control select { flex: 1; }
    .prediction-log .log-pagination { align-items: flex-start; flex-direction: column; gap: 14px; }
    .prediction-log .log-page-buttons { width: 100%; }
    .prediction-log .log-page-buttons button { flex: 1; }
}
