.pphc-rich-editor {
    max-width: 1000px;
    background: #fff;
    border: 1px solid #8c8f94;
    border-radius: 3px;
}

.pphc-rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px;
    background: #f0f0f1;
    border-bottom: 1px solid #c3c4c7;
}

.pphc-rich-toolbar__button:first-child {
    font-weight: 700;
}

.pphc-rich-toolbar__button:nth-child(2) {
    font-style: italic;
}

.pphc-rich-surface {
    min-height: 130px;
    padding: 10px 12px;
    overflow: auto;
    line-height: 1.5;
}

.pphc-rich-surface:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

.pphc-rich-editor--compact {
    min-width: 150px;
}

.pphc-rich-editor--compact .pphc-rich-toolbar {
    justify-content: flex-end;
    padding: 3px;
}

.pphc-rich-editor--compact .pphc-rich-surface {
    min-height: 48px;
    padding: 6px;
}

.pphc-rich-surface ul,
.pphc-rich-surface ol {
    margin-left: 2em;
}

.pphc-rich-surface math-field[read-only] {
    display: inline-block;
    min-width: 32px;
    padding: 2px 4px;
    margin: 0 2px;
    vertical-align: middle;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 3px;
}

.pphc-rich-surface math-field[read-only]::part(menu-toggle),
.pphc-rich-surface math-field[read-only]::part(virtual-keyboard-toggle) {
    display: none;
}

[data-pphc-grading-editor] table {
    table-layout: fixed;
}

[data-pphc-grading-editor] th:nth-child(1) { width: 20%; }
[data-pphc-grading-editor] th:nth-child(2) { width: 58%; }
[data-pphc-grading-editor] th:nth-child(3) { width: 12%; }
[data-pphc-grading-editor] th:nth-child(4) { width: 10%; }

[data-pphc-grading-editor] input.regular-text,
[data-pphc-grading-editor] .pphc-rich-editor {
    width: 100%;
}

[data-pphc-grading-editor] .pphc-rich-surface {
    min-height: 90px;
}

.pphc-inline-question {
    margin: 14px 0;
    padding: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
}

.pphc-inline-question > summary {
    padding: 14px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: #f6f7f7;
}

.pphc-inline-question__body { padding: 14px; }
.pphc-inline-question__actions { display: flex; gap: 10px; justify-content: flex-end; }
.pphc-inline-correction { margin-top: 18px; padding-top: 10px; border-top: 1px solid #dcdcde; }
.pphc-inline-criterion { margin: 12px 0; padding: 12px; background: #f6f7f7; border-left: 4px solid #72aee6; }
.pphc-inline-criterion > input.regular-text { display: block; width: 100%; margin: 8px 0; }
.pphc-inline-answer-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pphc-inline-answer-row math-field { flex: 1; min-height: 44px; }
