/* v23 — Pirogov: graphite, gold, turquoise, muted red and neutral silver. */
:root{--ink:#e2e7eb;--muted:#b5c0cb;--line:#4b5968;--bg:#293644;--white:#303e4e;--teal:#88d4cc;--teal-light:#294c4e;--gold:#edbd60;--gold-light:#514735;--red:#ef9fa5;--red-light:#503940;--blue:#88d4cc;--blue-light:#294c4e;--surface:#303e4e;--raised:#374759;--field:#253340;--silver:#becbd4;--dark-text:#252b30;color-scheme:dark}
body.theme{background:var(--bg);color:var(--ink)}
.theme h1,.theme h2,.theme h3,.theme .brand strong,.theme .person .btn.text,.theme .metric strong,.theme .doctor-specialty,.theme .qualification-line,.theme .nom-code,.theme .dash-tasks strong{color:var(--gold)}
.theme .eyebrow,.theme a,.theme .person small,.theme .doctor-field>span,.theme .reg-field>span,.theme .info-grid dt,.theme .account-role,.theme .file-icon{color:var(--teal)}
.theme .subtitle,.theme .small.muted,.theme .footnote,.theme .doctor-secondary,.theme .timeline time,.theme .bottom-line{color:var(--muted)}
.theme .layout{grid-template-columns:248px minmax(0,1fr)}
.theme .sidebar,.theme .topbar{background:#293747;border-color:var(--line)}
.theme .sidebar{gap:19px;padding:22px 15px}.theme .brand{flex-direction:column;align-items:flex-start;gap:12px;padding:0 9px}.theme .brand strong{font-size:17px}.theme .brand small{font-size:11px}
.hospital-logo{background:var(--gold);border-radius:12px;padding:12px 15px;isolation:isolate;width:100%;max-width:202px}.hospital-logo img{display:block;width:100%;height:auto;mix-blend-mode:multiply}.nav-icon,.ui-icon{width:19px;height:19px;flex-shrink:0;vertical-align:-4px}
.theme .nav button{border:1px solid transparent;border-radius:12px;min-height:43px;color:var(--ink);gap:10px}.theme .nav button:hover{background:var(--raised);border-color:var(--teal);color:var(--teal)}.theme .nav button.active{background:var(--gold);border-color:var(--gold);color:var(--dark-text);box-shadow:0 0 0 2px var(--bg),0 0 0 3px var(--gold)}.theme .nav .count{background:#405363;color:#e1e8ed}.theme .nav button.active .count{background:#3a3329;color:#f5d38e}.theme .nav{gap:9px}
.theme .panel,.theme .metric,.theme .task,.theme .cert-card,.theme .reg-aside,.theme .reg-actions,.theme .nom-detail-note,.theme .modal{background:var(--surface);border-color:var(--line);color:var(--ink)}
.theme .panel-head,.theme .modal-head{background:var(--surface);border-color:var(--line)}.theme .modal::backdrop{background:#0d172bc4}.theme .close{background:var(--raised);color:var(--ink);border-color:var(--line)}
.theme .btn{border:1px solid #71808d;border-radius:10px;background:var(--raised);color:var(--gold);transition:background-color .16s,border-color .16s,color .16s,box-shadow .16s}.theme .btn:hover:not(:disabled){background:#3c535b;border-color:var(--teal);color:var(--teal)}.theme .btn.primary{background:var(--gold);color:var(--dark-text);border-color:var(--gold)}.theme .btn.primary:hover:not(:disabled){background:#f4cb7d;border-color:#f4cb7d;color:#252b30;box-shadow:0 0 0 2px #edbd6026}.theme .btn.text{background:transparent;border:0;color:var(--teal)}.theme .btn.text:hover{color:#b4e7e0}.theme .person .btn.text{font-weight:650;font-size:14px;color:var(--gold)}.theme .person .btn.text:hover{color:#f8d995}
.theme input,.theme select,.theme textarea{background:var(--field);color:var(--ink);border-color:#71808d;accent-color:var(--gold)}.theme input:not([type=checkbox]):not([type=radio]),.theme select,.theme textarea{border:1px solid #71808d;border-radius:8px}.theme option{background:var(--field);color:var(--ink)}.theme input::placeholder,.theme textarea::placeholder{color:#adbac6;opacity:1}.theme .reg-field input[readonly]{background:#334352;color:var(--muted)}.theme input:disabled{background:#2b3643;color:#91a0ae}
.theme .demo-banner,.theme .note.amber,.theme .dashboard-note,.theme .noscript{background:#424237;border-color:#bca16a;color:#efd49b}.theme .note,.theme .nom-status{background:#29474a;border-color:#64968e;color:#c9e9e2}.theme .note strong,.theme .nom-status strong{color:var(--gold)}
.theme th{background:var(--raised);color:var(--teal);border-color:var(--line)}.theme td{border-color:var(--line)}.theme tbody tr:hover{background:#37495a}.theme .table-wrap{scrollbar-color:#7d92a4 var(--surface)}
.theme .avatar{background:#38525b;color:var(--teal);border:1px solid #637f85}.theme .avatar.large{background:#38525b}
.theme .badge.green,.theme .badge.blue,.theme .badge.specialist,.theme .badge.resident,.theme .specialty-pill{background:#294c4e;color:#a6e2d9;border:1px solid #638a84}.theme .badge.resident{background:#3d4549;color:#e5dcbb;border-color:#8d846b}.theme .badge.amber{background:var(--gold-light);color:#f2d18d;border:1px solid #9e895b}.theme .badge.red{background:var(--red-light);color:#f7b2b7;border:1px solid #ac747d}.theme .badge.gray{background:#394958;color:#c3ccd4;border:1px solid #667886}
/* Detached tabs: spacing belongs to the container; content is allowed to wrap. */
.theme .doctor-groups-header{display:block;padding:16px;border-bottom:1px solid var(--line)}.theme .doctor-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;overflow:visible;padding:0;border:0;width:100%}.theme .doctor-group{min-width:0;width:100%;border:1px solid #748591;border-radius:12px;padding:16px 14px;gap:7px;background:var(--surface);color:var(--teal);transition:background-color .16s,border-color .16s,box-shadow .16s}.theme .doctor-group-name{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;white-space:normal;font-size:14px;line-height:1.45;width:100%}.theme .doctor-group-caption{color:var(--muted);font-size:11px;white-space:normal}.theme .doctor-group-count{flex-shrink:0;background:#425460;color:#e4ebef;border-radius:6px}.theme .doctor-total{display:block;text-align:right;margin-top:13px;padding:0;font-size:12px}.theme .doctor-total strong{color:var(--gold)}
.theme .doctor-group:hover{background:#3b5057;border-color:var(--teal);box-shadow:0 0 0 2px #88d4cc18}.theme .doctor-group.active{background:var(--gold);color:var(--dark-text);border-color:var(--gold);box-shadow:none}.theme .doctor-group.active .doctor-group-caption{color:#35352f}.theme .doctor-group.active .doctor-group-count{background:#3a3329;color:#f5d38e}
.theme .doctor-alphabet-section,.theme .doctor-results-bar,.theme .doctor-pagebar,.theme .nom-pagebar,.theme .nom-context{background:#2e3c4b;border-color:var(--line)}.theme .doctor-letter{background:#2c3946;border:1px solid #556574;color:#b7c3cd;border-radius:7px}.theme .doctor-letter:hover:not(:disabled){background:#3c535b;border-color:var(--teal);color:#b5e9e1}.theme .doctor-letter.active,.theme .doctor-letter.active:hover{background:var(--gold);border-color:var(--gold);color:var(--dark-text)}.theme .doctor-letter:disabled{background:#2b3743;border-color:#42505e;color:#7c8b99;opacity:.65}.theme .doctor-filter-summary{color:var(--teal)}
.theme .registry-panel .table-wrap{max-height:66vh;overflow:auto}.theme .registry-table th{position:sticky;top:0;z-index:1;background:var(--raised)}.theme .registry-table td{padding-top:19px;padding-bottom:19px}.theme .registry-table td:last-child .btn{white-space:nowrap}
.theme .doctor-activity-link{border-radius:7px;padding:4px 8px;font-size:11px;transition:background-color .16s,color .16s}.theme .activity-kp{background:#4b4336;color:#f2cb7d;border:1px solid #a38a5f}.theme .activity-kpr{background:#4c3943;color:#f5abb3;border:1px solid #b17c85}.theme .activity-apr{background:#294a4b;color:#a0e0d6;border:1px solid #699b92}.theme .activity-kp:hover{background:var(--gold);color:#252b30}.theme .activity-kpr:hover{background:var(--red);color:#30242b}.theme .activity-apr:hover{background:var(--teal);color:#193738}.theme .doctor-activity-link strong{color:inherit}
.theme .activity-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;overflow:visible}.theme .activity-group{min-width:0;border:1px solid #748591;border-radius:12px;background:var(--surface);color:var(--teal);padding:16px}.theme .activity-group small{white-space:normal;color:var(--muted)}.theme .activity-group:hover{background:#3b5057;border-color:var(--teal)}.theme .activity-group.active{background:var(--gold);color:var(--dark-text);border-color:var(--gold)}.theme .activity-group.active small{color:#35352f}.theme .activity-group.active .doctor-group-count{background:#3a3329;color:#f5d38e}
.theme .tabs{gap:10px;padding-bottom:14px;flex-wrap:wrap;border-color:var(--line)}.theme .tab,.theme .nom-mode button,.theme .activity-type-btn{border:1px solid #748591;border-radius:10px;padding:10px 14px;background:var(--surface);color:var(--teal)}.theme .tab:hover,.theme .nom-mode button:hover,.theme .activity-type-btn:hover{background:#3b5057;border-color:var(--teal)}.theme .tab.active,.theme .nom-mode button.active,.theme .activity-type-btn.active{background:var(--gold);color:var(--dark-text);border-color:var(--gold)}
/* Dashboard cards retain their full perimeter, with distinct hover accents. */
.theme .dash-card{--accent:var(--teal);background:var(--surface);border:1px solid var(--accent);border-radius:14px;color:var(--ink);padding:22px;transition:background-color .16s,box-shadow .16s,border-color .16s}.theme .dash-card:hover{background:#364c51;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}.theme .dash-card strong{color:var(--gold)}.theme .dash-card>span:first-child{color:var(--teal)}.theme .dash-card.purple{--accent:var(--gold)}.theme .dash-card.purple:hover{background:#45443d}.theme .dash-card.red{--accent:var(--red)}.theme .dash-card.red:hover{background:#493e49}.theme .dash-card.amber{--accent:var(--silver)}.theme .dash-card.amber:hover{background:#425260}.theme .dash-cards:not(.three) .dash-card:first-child{--accent:var(--gold)}.theme .dash-cards:not(.three) .dash-card:nth-child(3){--accent:var(--red)}.theme .dash-cards:not(.three) .dash-card:nth-child(3):hover{background:#493e49}
.theme .dash-year select{background:var(--field);color:var(--ink);border-color:#71808d}.theme .dash-bar{background:#263542;color:#dfe8eb}.theme .dash-bar i{background:#3d6964}.theme .dash-bar.leaving i{background:#795361}.theme .dash-bar:hover{outline:1px solid var(--teal)}.theme .dash-tasks button{background:transparent;color:var(--teal);border-color:var(--line)}.theme .dash-tasks button:hover{background:#384d58}.theme .dash-events li{border-color:var(--line)}.theme .dash-events time{color:var(--muted)}
.theme .task:hover{border-color:var(--teal);background:#354b55}.theme .task strong{color:var(--gold)}.theme .task p{color:var(--muted)}.theme .file-item,.theme .reg-specialty-row,.theme .training-record,.theme .export-check{background:var(--surface);border-color:var(--line)}.theme .export-check:hover{background:#384d58}.theme .export-scroll{border-color:var(--line)}.theme .nom-more{color:var(--teal);border-color:#78968e}.theme .nom-dept-focus{background:#294c4e}.theme .step .num{background:#514735;color:var(--gold)}.theme .pending-mark{background:var(--gold-light);color:#f2d18d}.theme .danger,.theme [role=alert]{color:var(--red)}
/* Word previews deliberately remain paper-colored. Generated files are unchanged. */
.theme .letter-sheet{background:#fff;color:#23303b;color-scheme:light}.theme .letter-sheet h1,.theme .letter-sheet h2,.theme .letter-sheet h3,.theme .letter-sheet p,.theme .letter-sheet td,.theme .letter-sheet strong{color:#23303b}.theme .letter-sheet th{background:#edf1f3;color:#23303b}.theme .letter-sheet tbody tr:hover{background:#f3f6f7}
.theme .registry-contacts{order:8}.theme .side-bottom{order:9}.theme .account-sidebar{margin-top:auto}.theme .registry-contacts summary{color:var(--gold)}.theme .registry-contacts strong{color:var(--gold)}.theme .registry-contacts a{color:var(--teal)}
.theme button:focus-visible,.theme a:focus-visible,.theme summary:focus-visible,.theme input:focus-visible,.theme select:focus-visible,.theme textarea:focus-visible{outline:3px solid #f3cf87;outline-offset:3px}.theme button:disabled{cursor:not-allowed}.theme .bottom-line{border-color:var(--line)}
@media(max-width:1150px){.theme .layout{grid-template-columns:218px minmax(0,1fr)}.theme .doctor-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.theme .doctor-group{padding:15px}.theme .registry-panel .doctor-toolbar{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.theme .layout{display:block}.theme .sidebar{height:auto;padding:16px}.theme .brand{flex-direction:row;align-items:center}.theme .hospital-logo{width:135px;flex-shrink:0}.theme .nav{gap:10px;padding:5px}.theme .nav button{flex-shrink:0}.theme .doctor-groups-header{padding:12px}.theme .activity-groups{padding:12px;gap:9px}.theme .activity-group{padding:12px}.theme .activity-group-title{font-size:15px}.theme .account-sidebar{margin-top:0}}
@media(max-width:540px){.theme .doctor-groups{grid-template-columns:1fr}.theme .doctor-group-name{font-size:14px}.theme .registry-panel .doctor-toolbar{grid-template-columns:1fr}.theme .activity-groups{grid-template-columns:1fr}.theme .activity-group small{font-size:12px}.theme .tabs{gap:8px}.theme .tab{padding:9px 11px}.theme .brand strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){.theme *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media print{body.theme{background:#fff;color:#222;color-scheme:light}.theme .sidebar,.theme .topbar,.theme .demo-banner{display:none}.theme .layout{display:block}.theme .panel,.theme .dash-card,.theme .metric{background:white;color:#222;box-shadow:none}.theme h1,.theme h2,.theme h3,.theme td,.theme th,.theme .qualification-line,.theme .person .btn.text{color:#222}.theme .registry-panel .table-wrap{max-height:none;overflow:visible}}
/* Legacy components and validation guidance use the same readable surfaces. */
.theme .doctor-groups-header,.theme .activity-source,.theme .corr-picker-item,.theme .corr-kind-button,.theme .corr-form-layout .registration-actions,.theme .hr-footer{background:var(--surface);border-color:var(--line);color:var(--ink)}
.theme .corr-picker-item:hover,.theme .corr-kind-button:hover{background:#3b5057;border-color:var(--teal)}
.theme .base-note-warning,.theme .base-consent-warning,.theme .corr-warning{background:var(--gold-light);color:#efd49b;border-color:#bca16a}.theme .base-consent-confirmed{background:var(--teal-light);color:#bbe8df;border-color:#749e95}
.theme .required-empty input:not([type=checkbox]),.theme .required-empty select,.theme .required-empty textarea{background:#503940!important;border:2px solid #ef9fa5!important;color:#f5e6e8}
.theme .required-empty>span:first-of-type,.theme .required-empty .required-tag{color:#f5abb3!important}.theme .required-message,.theme .required-summary strong,.theme .required-saved-gaps strong,.theme .required-jump{color:#f5abb3}.theme .required-message.neutral,.theme .required-tag{color:var(--muted)}
.theme label.namesake-confirm.required-empty,.theme .required-summary,.theme .required-saved-gaps{background:#503940;border-color:#ef9fa5;color:#f5d5d8}
.theme .doctor-group:focus-visible,.theme .activity-group:focus-visible{outline-offset:3px;border-radius:12px}
.theme .document-card,.theme .document-card.current,.theme .document-archive .document-card,.theme .norm-row{background:var(--surface);border-color:var(--line);color:var(--ink)}
.theme .document-card.current{border-color:var(--gold)}.theme .document-archive>summary,.theme .norm-row summary,.theme .norm-source-list summary{color:var(--teal)}
.theme .btn.download-primary{background:var(--gold);border-color:var(--gold);color:var(--dark-text)}.theme .btn.download-primary:hover{background:#f4cb7d;border-color:#f4cb7d;color:var(--dark-text)}
.theme .cover-text-preview{background:#fff;color:#23303b;color-scheme:light}.theme .cover-text-preview h3,.theme .cover-text-preview p{color:#23303b}
.theme .norm-controls input,.theme .norm-controls select{background:var(--field);color:var(--ink);border-color:#71808d}.theme .norm-status{background:var(--gold-light);color:#f2d18d;border-color:#9e895b}.theme .norm-result-count,.theme .norm-evidence dt{color:var(--muted)}
.theme .norm-kp{background:#4b4336;color:#f2cb7d}.theme .norm-kpr{background:#4c3943;color:#f5abb3}.theme .norm-apr{background:#294a4b;color:#a0e0d6}.theme .norm-roles span{background:var(--raised);color:var(--muted)}.theme .norm-condition{background:#2b3a49;color:var(--ink);border-color:#71808d}
/* v24 — only the labels marked for correction; approved active states stay dark-on-gold. */
.theme .dash-card>span:first-child,.theme .dash-year label,.theme .dash-year select,
.theme .doctor-group-name,.theme .doctor-group-count,
.theme .doctor-toolbar .doctor-field>span,.theme .doctor-toolbar input,.theme .doctor-toolbar select,
.theme .doctor-results-bar p,.theme .doctor-results-bar strong,.theme .doctor-filter-summary,.theme .doctor-results-bar .btn.text,
.theme .doctor-pagesize,.theme .doctor-pagesize select,
.theme .registry-table th,.theme .employment-cell,.theme .employment-cell .badge,.theme .employment-cell .muted,
.theme .account-sidebar>strong,.theme .account-role,
.theme .activity-group-title,.theme .activity-group small,.theme .activity-group .doctor-group-count,
.theme .nom-toolbar select,.theme .nom-table th,.theme .nom-table .nom-code,.theme .nom-table .catalog-name,.theme .nom-table .specialty-pill,.theme .nom-table .nom-more,.theme .nom-table .catalog-period,.theme .nom-table td:first-child .muted,
.theme label[for="cert-country"],.theme #cert-country,
.theme .corr-toolbar .reg-field>span,.theme .corr-toolbar input,.theme .corr-toolbar select,.theme #corr-results th,
.theme .report-toolbar .reg-field>span,.theme .report-toolbar input,.theme .report-toolbar select,
.theme .report-toolbar+.doctor-results-bar .btn.text,.theme #report-results th,.theme #report-results td,.theme #report-results td .btn.text,.theme #report-results td .muted,.theme #report-results td .badge{color:var(--gold)}
.theme .doctor-toolbar input::placeholder,.theme .corr-toolbar input::placeholder,.theme .report-toolbar input::placeholder{color:#dfbd7c;opacity:1}
.theme .doctor-toolbar option,.theme .corr-toolbar option,.theme .report-toolbar option,.theme .nom-toolbar option,.theme #cert-country option,.theme .dash-year option{color:var(--gold)}
.theme .doctor-group.active .doctor-group-name,.theme .activity-group.active .activity-group-title,.theme .activity-group.active small{color:var(--dark-text)}
.theme .doctor-group.active .doctor-group-count,.theme .activity-group.active .doctor-group-count{color:#f5d38e}
.theme .login-keyboard{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin:16px 0 10px;font-size:12px;color:var(--muted)}
.theme .keyboard-state{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid var(--line);border-radius:7px;min-height:30px;color:var(--gold);font-weight:650}
.keyboard-flag{width:26px;height:17px;border-radius:2px;flex-shrink:0}.theme .keyboard-help{font-size:11px;color:var(--muted);margin-top:8px}.theme .caps-warning{color:#f5abb3;font-size:12px;font-weight:650}

/* v25: centred local sign-in and report alphabet. */
body.theme.auth-locked .content{max-width:760px;min-height:100vh;min-height:100dvh;display:flex;align-items:center;padding:32px 24px}
body.theme.auth-locked #screen>.auth-panel{max-width:640px;margin:0 auto!important;border-radius:20px;box-shadow:0 18px 65px #0c172526;border-top:2px solid var(--gold)}
body.theme.auth-locked .auth-panel>.panel-body{padding:36px 42px}
.auth-logo{width:230px;max-width:70%;margin:0 auto 28px;background:#edbd60;border-radius:16px;padding:18px 20px}
.auth-logo img{display:block;width:100%;height:auto;mix-blend-mode:multiply}
body.theme.auth-locked .auth-panel h1{text-align:center;font-size:27px;line-height:1.25;margin-bottom:8px}
body.theme.auth-locked .auth-panel h1+p{text-align:center;color:var(--muted)}
body.theme.auth-locked .login-keyboard{padding-top:16px;border-top:1px solid var(--line);margin-top:24px}
body.theme.auth-locked .keyboard-help{text-align:center;line-height:1.6}
.theme .report-alphabet-panel{margin:16px 0}.theme .report-alphabet-panel .doctor-alphabet-section{border:0}
@media(max-width:480px){body.theme.auth-locked .content{padding:16px 12px}body.theme.auth-locked .auth-panel>.panel-body{padding:24px 20px}body.theme.auth-locked .auth-panel h1{font-size:23px}.auth-logo{width:200px;margin-bottom:24px}}

/* v26: shared gold contour/interaction accents; semantic warnings retained. */
.theme .panel,.theme .modal,.theme .cert-card,.theme .reg-aside,.theme .reg-actions{border-top:2px solid var(--gold)}
.theme button:hover:not(:disabled),.theme a:hover{border-color:var(--gold);color:var(--gold)}
.theme button.active:hover,.theme button.primary:hover,.theme .btn.download-primary:hover{color:var(--dark-text)}
.theme :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.theme input:focus,.theme select:focus,.theme textarea:focus{border-color:var(--gold)}
body.theme.auth-locked .auth-panel h1{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto}
.theme .auth-logo{max-width:100%;padding:20px 26px}
/* Suppress insertion caret outside editable content; retain selection/copy and keyboard focus. */
body.theme,body.theme *{caret-color:transparent}
body.theme{cursor:default}
.theme input:not([readonly]):not([disabled]),.theme textarea:not([readonly]):not([disabled]),.theme [contenteditable="true"],.theme [contenteditable="plaintext-only"]{caret-color:var(--gold)}
.theme input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=file]):not([disabled]),.theme textarea:not([disabled]),.theme [contenteditable="true"],.theme [contenteditable="plaintext-only"]{cursor:text}
.theme button:not(:disabled),.theme a[href],.theme summary,.theme select:not(:disabled),.theme input[type=checkbox]:not(:disabled),.theme input[type=radio]:not(:disabled){cursor:pointer}

/* v27: complete gold contour requested for authentication panels. */
body.theme.auth-locked #screen>.auth-panel{border:2px solid var(--gold)}

/* Desktop workspace: fill the available area beside the navigation. */
@media (min-width: 801px) {
  body.theme:not(.auth-locked) .main > .content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(22px, 1.5vw, 40px);
    padding-right: clamp(22px, 1.5vw, 40px);
  }
  body.theme:not(.auth-locked) #screen { min-width: 0; width: 100%; }
}

/* v28: gold panel perimeters; sky-blue pointer and selection accents. */
:root{--sky:#9bc9ff;--sky-soft:#354b63;--gold-border:#a98e58}
@media screen {
 html{scrollbar-color:#edbd60 #253340;scrollbar-width:auto}
 .theme *{scrollbar-color:var(--gold) var(--field)}
 .theme .table-wrap{scrollbar-color:var(--gold) var(--field)}
 ::-webkit-scrollbar{width:12px;height:12px}
 ::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:#253340}
 ::-webkit-scrollbar-thumb{background:#edbd60;border:3px solid #253340;border-radius:10px}
 ::-webkit-scrollbar-thumb:hover{background:#f5d38e}
 .theme :is(.panel,.modal,.cert-card,.reg-aside,.reg-actions,.metric,.task,.document-card,.nom-detail-note,.export-scroll,.norm-row){border:1px solid var(--gold-border)}
 .theme :is(.panel,.modal,.cert-card,.reg-aside,.reg-actions,.task,.document-card):hover{border-color:var(--gold)}
 .theme :is(.panel-head,.modal-head){border-bottom-color:#776b51}
 .theme :is(.btn,.tab,.doctor-group,.activity-group,.activity-type-btn,.doctor-letter,.close,.nom-mode button){border-color:var(--gold-border)}
 .theme :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-color:var(--gold-border)}
 .theme button:hover:not(:disabled):not(.active):not(.primary):not(.download-primary){background:var(--sky-soft);border-color:var(--sky);color:var(--sky);box-shadow:none}
 .theme :is(.doctor-group,.activity-group):hover:not(.active) :is(.doctor-group-name,.activity-group-title,.doctor-group-caption,small){color:var(--sky)}
 .theme .btn.text:hover:not(:disabled){background:transparent;color:var(--sky)}
 .theme button.active:hover:not(:disabled),.theme button.primary:hover:not(:disabled),.theme .btn.download-primary:hover:not(:disabled){background:#f4cb7d;border-color:var(--gold);color:var(--dark-text)}
 .theme :is(.nav button,.tab,.doctor-letter,.doctor-group,.activity-group,.activity-type-btn,.nom-mode button).active{border-color:var(--gold)}
 .theme a:hover,.theme summary:hover{color:var(--sky)}
 .theme tbody tr:hover{background:var(--sky-soft)}
 .theme tbody tr:hover>td{background:transparent}
 .theme tbody tr[aria-selected="true"]>td{background:var(--sky);color:var(--dark-text)}
 .theme tbody tr[aria-selected="true"] :is(a,button,span,small,strong,p){color:var(--dark-text)}
 .theme option:checked{background:var(--sky);color:var(--dark-text)}
 .theme .export-check:hover,.theme .corr-picker-item:hover,.theme .corr-kind-button:hover{background:var(--sky-soft);border-color:var(--sky)}
 .theme .export-check:has(input:checked),.theme .corr-picker-item:has(input:checked){background:var(--sky);color:var(--dark-text);border-color:var(--sky)}
 .theme .export-check:has(input:checked) :is(span,strong,small),.theme .corr-picker-item:has(input:checked) :is(span,strong,small){color:var(--dark-text)}
 .theme .dash-bar:hover{outline-color:var(--sky)}
 .theme ::selection{background:var(--sky);color:var(--dark-text)}
 /* Keep paper previews and validation errors distinct. */
 .theme .letter-sheet tbody tr:hover{background:#f3f6f7}
 .theme .letter-sheet tbody tr:hover>td{color:#23303b}
 .theme .required-empty input:not([type=checkbox]),.theme .required-empty select,.theme .required-empty textarea{border-color:var(--red)!important}
}
.change-events{padding:0;margin:0;list-style:none;display:grid;gap:18px}
.change-event{padding:18px;border:1px solid var(--gold-border);border-radius:12px;background:var(--field)}
.change-event header{display:flex;justify-content:space-between;align-items:start;gap:18px;flex-wrap:wrap;margin-bottom:12px}
.change-event time{color:var(--muted);font-size:12px;white-space:nowrap}
.change-actor{margin-bottom:14px;color:var(--teal)}
.change-field{padding:10px 0;border-top:1px solid var(--line);overflow-wrap:anywhere;white-space:pre-wrap}
.change-field>strong{display:block;color:var(--gold);margin-bottom:5px}
.change-field div>span{color:var(--teal)}
.change-event>p{overflow-wrap:anywhere}
.legacy-history{margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}
.legacy-history summary{cursor:pointer;color:var(--gold);margin-bottom:10px}
