#rish-legal-docs {
    --rld-border: #d8deeb;
    --rld-muted: #697386;
    --rld-panel: #f7f9fc;
    --rld-primary: #0a47a0;
    color: #1f2937;
}

#rish-legal-docs * {
    box-sizing: border-box;
}

.rld-app {
    display: grid;
    gap: 18px;
}

.rld-workspace {
    align-items: start;
}

.rld-settings {
    position: sticky;
    top: 90px;
}

.rld-settings-header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.rld-tabs {
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--rld-border);
    border-radius: 8px;
    background: var(--rld-panel);
}

.rld-doc-button {
    min-height: 48px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.rld-doc-button.is-active {
    box-shadow: inset 3px 0 0 var(--rld-primary), 0 1px 2px rgba(15, 23, 42, .04);
}

.rld-form {
    margin: 0;
}

.rld-field .uk-textarea {
    min-height: 76px;
    resize: vertical;
}

.rld-field-wide {
    grid-column: 1 / -1;
}

.rld-document {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.rld-preview-bar {
    display: grid;
    gap: 12px;
    align-items: start;
    justify-content: stretch;
}

.rld-current-title {
    margin: 0;
}

.rld-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, auto);
    justify-content: start;
}

.uk-button.is-copied {
    border-color: #17803d;
    background: #17803d;
    color: #fff;
}

.uk-button.is-copy-error {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.rld-preview {
    min-height: 680px;
    overflow: auto;
}

.rld-preview:focus {
    outline: 2px solid rgba(10, 71, 160, .25);
    outline-offset: 2px;
}

.rld-preview h2 {
    margin-top: 0;
}

.rld-preview h3 {
    margin-top: 28px;
}

.rld-preview p {
    margin: 0 0 12px;
}

.rld-preview .rld-requisites {
    padding: 14px 16px;
    border: 1px solid var(--rld-border);
    border-radius: 6px;
    background: var(--rld-panel);
}

.rld-status {
    min-height: 20px;
    color: var(--rld-muted);
    font-size: 13px;
    text-align: right;
}

@media (max-width: 959px) {
    .rld-settings {
        position: static;
        max-height: none;
        order: 2;
    }

    .rld-document {
        order: 1;
    }

    .rld-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .rld-actions .uk-button {
        width: 100%;
    }

    .rld-preview {
        min-height: 420px;
        padding: 18px;
    }
}
