/* РП — расшифровка проектов (/rp). Поверх kp.css, только переменные темы из style.css. */
.rp-container { max-width: 1100px; }
.rp-form { display: flex; flex-direction: column; gap: 16px; }

.rp-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-file-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--ink);
}
.rp-file-list .rp-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-file-list .rp-file-size { color: var(--text-muted); font-size: 12px; }
.rp-file-list button {
    background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px;
}
.rp-file-list button:hover { color: var(--accent); }
.rp-file-total { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.rp-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rp-prompt {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.rp-prompt:hover { border-color: var(--line-strong); background: var(--panel-2); }
.rp-prompt:has(input:checked) { border-color: var(--accent); background: var(--panel-2); }
.rp-prompt input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.rp-prompt-body { display: flex; flex-direction: column; gap: 4px; }
.rp-prompt-title { font-weight: 700; color: var(--ink); font-size: 14px; }
.rp-prompt-desc { font-size: 12px; color: var(--text-muted); }

.rp-extra { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.rp-extra .input-group { display: flex; flex-direction: column; gap: 6px; }
.rp-comment { flex: 1; min-width: 240px; }
.rp-comment textarea { resize: vertical; font-family: inherit; }

.rp-status { font-size: 13px; color: var(--text-muted); }
.rp-status.kp-err { white-space: pre-wrap; }
.rp-spinner {
    display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
    border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%;
    animation: rp-spin .8s linear infinite;
}
@keyframes rp-spin { to { transform: rotate(360deg); } }

.rp-result-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.rp-btn {
    font-size: 12px; font-weight: 600; padding: 5px 10px; cursor: pointer; text-decoration: none;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
.rp-btn:hover { border-color: var(--accent); color: var(--accent); }
.rp-btn[hidden] { display: none; }
.rp-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.rp-result { color: var(--ink); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.rp-result h1, .rp-result h2, .rp-result h3, .rp-result h4 { margin: 18px 0 8px; line-height: 1.3; }
.rp-result h1 { font-size: 20px; } .rp-result h2 { font-size: 17px; } .rp-result h3 { font-size: 15px; }
.rp-result p, .rp-result ul, .rp-result ol { margin: 0 0 10px; }
.rp-result ul, .rp-result ol { padding-left: 22px; }
.rp-result table { border-collapse: collapse; margin: 8px 0 14px; font-size: 13px; display: block; overflow-x: auto; max-width: 100%; }
.rp-result th, .rp-result td { border: 1px solid var(--border); padding: 5px 8px; vertical-align: top; text-align: left; }
.rp-result th { background: var(--panel-2); }
.rp-result code { font-family: var(--font-mono); font-size: 12px; background: var(--panel-2); padding: 1px 4px; border-radius: 3px; }
.rp-result pre { background: var(--panel-2); padding: 10px; border-radius: var(--radius-sm); overflow-x: auto; }
.rp-result pre code { background: none; padding: 0; }
.rp-result hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.rp-out-files { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--panel-2); }
.rp-out-title { width: 100%; font-weight: 700; color: var(--ink); font-size: 14px; }
.rp-out-file { text-decoration: none; display: inline-flex; gap: 8px; align-items: baseline; }
.rp-out-file span { font-weight: 400; font-size: 12px; opacity: .8; }
.rp-out-files[hidden] { display: none; }

.rp-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.rp-modal[hidden] { display: none; }
.rp-modal-box { background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.rp-modal-box h3 { margin: 0; font-size: 17px; }
.rp-pass-err { font-size: 13px; min-height: 1em; }
.rp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
