.grade-dialog-overlay {position:fixed;inset:0;z-index:20000;background:rgba(5,12,25,.8);display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto;}
.grade-dialog {width:100%;max-width:600px;max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border-radius:12px;background:#fff;color:#172033;box-sizing:border-box;font:15px/1.5 system-ui,sans-serif;text-align:left;}
.grade-dialog h2,.grade-dialog h3,.grade-dialog p,.grade-dialog label,.grade-dialog summary,.grade-dialog strong {color:#172033;}
.grade-dialog h2 {font-size:22px;margin:0 0 12px;}.grade-dialog h3 {font-size:17px;}.grade-dialog label {display:block;font-weight:700;}
.grade-dialog textarea {display:block;width:100%;box-sizing:border-box;font:inherit;margin:8px 0;background:#fff;color:#172033;border:1px solid #64748b;border-radius:6px;padding:10px;}
.grade-dialog-actions {display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px;}
.grade-dialog button {font:inherit;padding:8px 12px;border:1px solid #334155;border-radius:6px;background:#fff;color:#172033;cursor:pointer;min-height:40px;}
.grade-dialog button[type=submit] {background:#17537d;color:#fff;}.grade-dialog button:disabled {opacity:.55;cursor:default;}
.grade-dialog :focus-visible {outline:3px solid #1d4ed8;outline-offset:3px;}.grade-dialog [role=alert] {color:#991b1b;}
.grade-history {max-width:850px;}.grade-history-entry {border-top:1px solid #64748b;padding:12px 0;}.grade-history details {margin:10px 0;}.grade-history summary {cursor:pointer;padding:8px;background:#eef2f7;border-radius:4px;}
.grade-history-table {overflow-x:auto;}.grade-history table {width:100%;border-collapse:collapse;background:#fff;color:#172033;}.grade-history th,.grade-history td {padding:8px;border:1px solid #64748b;text-align:left;background:#fff;color:#172033;}
@media(max-width:400px){.grade-dialog{padding:14px;}.grade-dialog-actions button{flex-grow:1;}}
@media print {.grade-dialog-overlay{display:none!important;}}
.grade-history-open {padding:8px 12px;min-height:40px;background:#17537d;color:#fff;border:1px solid #64748b;border-radius:6px;font:inherit;cursor:pointer;}
.grade-history-open:disabled {opacity:.55;cursor:default;}.grade-history-open:focus-visible {outline:3px solid #60a5fa;outline-offset:3px;}

:where(.ukb-notes-scope) .ukb-notes-scope:not(:where([data-ukb-published-sf],[data-ukb-published-sf] *)){width:100%;min-width:0}:where(.ukb-notes-scope) .ukb-notes-scope :focus-visible:not(:where([data-ukb-published-sf],[data-ukb-published-sf] *)){outline-offset:3px}
