.exam-scope { color:#000; font-size:14px; line-height:1.5; min-width:0; }
.exam-scope [hidden] { display:none!important; }
.exam-toolbar { display:flex; align-items:center; flex-wrap:nowrap; gap:6px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; white-space:nowrap; width:100%; min-width:0; }
.exam-toolbar > * { flex:none; }
.exam-scope :is(button,input,select,summary) { color:#000; font:inherit; border:0; border-radius:0; background:none; padding:5px 6px; }
.exam-scope button { cursor:pointer; }
.exam-scope button[aria-pressed=true] { background:#e5e7eb; font-weight:600; }
.exam-scope button:disabled { opacity:.5; cursor:default; }
.exam-scope :is(button,summary,input):focus-visible { outline:2px solid #777; outline-offset:-2px; }
.exam-status { padding:6px 0; overflow-wrap:anywhere; }
.exam-status:empty { display:none; }
.exam-error { color:#b91c1c; }
.exam-table-scroll { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.exam-scope .exam-table { table-layout:fixed; width:100%; min-width:600px; border-collapse:collapse; font-size:14px; color:#000; background:none; }
.exam-scope .exam-table :is(th,td) { border:0; border-bottom:1px solid #eee; padding:6px 10px; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.exam-scope .exam-table th { font-size:13px; font-weight:600; }
.exam-scope .exam-table th button { padding:0; text-align:left; font:inherit; }
.exam-clickable { cursor:pointer; }
.exam-clickable:hover { background:#00000005; }
.exam-question { margin:0; padding:16px 0; border:0; border-bottom:1px solid #eee; min-width:0; }
.exam-question legend { font-size:13px; font-weight:600; }
.exam-prompt { font-family:'Noto Sans SC',sans-serif; font-size:18px; color:#000; white-space:pre-wrap; overflow-wrap:anywhere; }
.exam-py { margin:4px 0 8px; color:#000; }
.exam-option { display:flex; gap:10px; align-items:flex-start; padding:8px 4px; cursor:pointer; font-family:'Noto Sans SC',sans-serif; }
.exam-option input { margin-top:5px; flex:none; accent-color:#111; }
.exam-option small { margin-left:auto; flex:none; }
.exam-correct { color:#15803d; background:#dcfce755; }
.exam-wrong { color:#b91c1c; }
.exam-option.exam-wrong { background:#fee2e255; }
.exam-score { font-size:18px; font-weight:600; padding:8px 0; }
.exam-review-cell .exam-questions { max-width:900px; }
.exam-daily { font-size:13px; }
.exam-confirm { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:12px 0; }
body[data-active-tab=test] header .brand { display:contents; }
body[data-active-tab=test] #hnlib-header-slot { display:flex!important; grid-area:1 / 3; min-width:0; }
body[data-active-tab=test] header .tab-row, body[data-active-tab=test] header .active-tab-toolbar { display:none; }
body[data-active-tab=exercises] #hnlib-header-slot { display:flex; grid-column:3; grid-row:1; }
@media(max-width:768px){
 body[data-active-tab=test] header,body[data-active-tab=exercises] header { display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:4px; }
 body[data-active-tab=test] header .sidebar-toggle,body[data-active-tab=exercises] header .sidebar-toggle { grid-area:1 / 1; }
 body[data-active-tab=test] header .brand-mark,body[data-active-tab=exercises] header .brand-mark { grid-area:1 / 2; }
 body[data-active-tab=test] header .brand-status,body[data-active-tab=exercises] header .brand-status { grid-area:2 / 1 / 3 / 4;justify-self:end; }
 body[data-active-tab=test] #hnlib-header-slot,body[data-active-tab=exercises] #hnlib-header-slot { grid-area:1 / 3;max-width:none;width:100%; }
 .exam-scope .exam-table { min-width:520px; }
 .exam-option small { font-size:11px; }
}

.main-tabs #tabBtnTest[hidden] { display:none!important; }

/* Override the shared Library header controls, including its lazy-loaded rules. */
#hnlib-header-slot .exam-toolbar :is(button,input,select,summary) { border:0; border-radius:0; background:none; color:#000; padding:5px 6px; font-size:14px; }
#hnlib-header-slot .exam-toolbar button[aria-pressed=true] { background:#e5e7eb; }
#hnlib-header-slot .exam-toolbar input[type=checkbox] { padding:0; }

#hnlib-header-slot .exam-toolbar .tool-segment button[aria-pressed=true] { background:#fff0df;font-weight:600; }
.exam-collection-name { width:145px; }
.exam-inline-edit { display:flex;align-items:center;gap:4px; }
.exam-inline-edit input { width:115px;min-width:0;border-bottom:1px solid #aaa; }
.exam-collections { max-width:850px;padding:6px 0; }
.exam-collection { padding:3px 0; }
.exam-collection-line { display:flex;align-items:center;gap:4px; }
.exam-collection-line > button { width:28px;padding:3px; }
.exam-collections label { display:flex;align-items:center;gap:8px;cursor:pointer;padding:4px 0; }
.exam-collections input[type=checkbox] { width:17px;height:17px;accent-color:#111;flex:none; }
.exam-lessons { padding-left:36px; }
.exam-countdown { font-variant-numeric:tabular-nums;font-weight:600; }
.exam-scope .exam-table { min-width:780px; }

.exam-collection-field { display:flex;align-items:center;gap:4px; }
