body {height:100dvh;font-size:14px}
header {padding:6px 12px;gap:6px}
header h1 {font-size:19px}
header span {min-width:0;margin-inline:5px}
header button,.toolbar button,.view-toolbar button {padding:4px 8px;min-height:30px}
main {grid-template-columns:clamp(178px,18vw,245px) minmax(0,1fr)}
#filterSidebar {display:flex;flex-direction:column;padding:7px;overflow:hidden;gap:6px;min-height:0}
.browser-heading {display:flex;align-items:center;justify-content:space-between;gap:4px}
#count {text-align:right;font-size:11px;color:#235956}
#toggleFilters {text-align:left;background:#17645e;color:white;min-height:34px;padding:5px 9px}
#filterControls {max-height:44%;overflow:auto;padding:2px 4px 3px;overscroll-behavior:contain}
#filterControls select,#filterControls input {margin-bottom:5px;padding:4px}
#filterControls label {gap:3px;font-size:13px}
:is(#list,#worksheetList) {flex:1;min-height:0;overflow:auto;padding:2px;overscroll-behavior:contain;scrollbar-gutter:stable}
#list small {font-size:11px}
.pager {margin:0;flex:none}
.pager button {padding:4px 5px;min-height:30px}
article {padding:6px 8px;overflow:hidden}
.toolbar {gap:6px;margin:0 0 5px}
#review:empty {display:none}
#sourceLinks p {margin:4px 0 8px}
.view-toolbar {padding:4px 0;gap:6px;margin:0}
#panes {min-height:0}
.pane-head {padding:3px 5px;gap:4px}
.pane-head h2 {font-size:13px;min-width:0}
.pane-head select {min-height:28px}
.pane-controls {display:flex;align-items:center;gap:3px;flex-wrap:wrap}
.pane-controls button {min-width:27px;min-height:28px;line-height:1.1;padding:3px 5px}
.pane-controls [aria-pressed=true] {background:#176d70;color:white;border-color:#176d70}
.pdf-scale {min-width:34px;text-align:center;font-size:11px}
.pane .pdf {display:block;position:relative;background:#d8e2e0;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;touch-action:pan-x pan-y pinch-zoom}
.pdf:focus-visible,#list:focus-visible {outline:2px solid #167b78;outline-offset:-2px}
.pdf-page {position:relative;background:var(--content-bg);margin:8px auto}
.pdf-page canvas {display:block;width:100%;height:100%}
.pdf-status,.pane .empty {margin:0;padding:16px;background:#f6f9f8;color:#334a4c}
.textLayer {position:absolute;inset:0;overflow:clip;text-align:initial;line-height:1;text-size-adjust:none;transform-origin:0 0;z-index:2;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size))}
.textLayer :is(span,br) {position:absolute;white-space:pre;cursor:text;transform-origin:0 0;color:transparent}
.textLayer > :not(.markedContent),.textLayer .markedContent span:not(.markedContent) {font-size:calc(var(--text-scale-factor) * var(--font-height));transform:rotate(var(--rotate,0deg)) scaleX(var(--scale-x,1)) scale(var(--min-font-size-inv))}
.textLayer .markedContent {display:contents}
.textLayer ::selection {background:#177b8080}
.viewer-resizing .pdf {pointer-events:none}
#panes[data-maximized=true] {position:fixed;inset:0;z-index:10;grid-template: minmax(0,1fr) / minmax(0,1fr)!important}
#panes[data-maximized=true] .pane {grid-column:1!important;grid-row:1!important}
@media(max-width:950px) {
  header span {display:none}
  header h1 {margin-right:auto;font-size:17px}
  article {padding:5px}
  .toolbar {flex-wrap:nowrap}
}
@media(max-width:680px) {
  main {grid-template-columns:150px minmax(0,1fr)}
  header button {font-size:11px}
  #panes[data-mode=equal] {grid-template-columns:repeat(5, minmax(0,1fr))}
  .toolbar button,.view-toolbar button {font-size:11px;padding:4px}
}
@media(pointer:coarse) {
  header button,.toolbar button,.view-toolbar button,.pane-controls button,.pane-head select,.pane-head button,.pane-head a {min-height:36px;padding:6px 8px}
  .pane-head a {display:inline-flex;align-items:center}
  .layout-divider {position:relative}
  .layout-divider::after {content:'';position:absolute;inset:0 -4px;z-index:1}
  .layout-divider.horizontal::after {inset:-4px 0}
}


.browser-heading strong {white-space:nowrap;font-size:12px}
.pane-head .resource-choice {min-width:105px;flex-basis:105px}
.pane-controls {flex-basis:100%}
#panes[data-maximized=true] .pane-controls {flex-basis:auto}
main {grid-template-columns:var(--browser-width,272px) 10px minmax(0,1fr)}
:is(#browserDivider,#worksheetDivider) {cursor:col-resize;touch-action:none;background:#d7e4e1;border-inline:1px solid #c7d6d2}
:is(#browserDivider,#worksheetDivider):is(:hover,:focus-visible) {background:#70aaa1;outline:none}
.browser-heading {min-height:38px}
.browser-heading strong {font-size:15px;white-space:normal}
.browser-type {display:flex;gap:3px}
.browser-type button {min-height:38px;min-width:38px;padding:4px;font-weight:650}
#count {text-align:left}
.card-reference {display:block}
.card-session,.card-topics {display:block;margin-top:3px}
.card-session {font-size:.82em;color:#485e62}
.card-topics {font-size:.91em;font-weight:650}
#list small {font-size:.78em;margin-top:4px}

.pane {--document-accent:#718985}
.pane-head {min-height:var(--document-toolbar-height, 50px);flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px;padding:0 4px;border-left:3px solid var(--document-accent)}
.pane-head .pdf-document {min-width:0;display:flex;align-items:center;gap:2px}
.pdf-identity {min-width:0;flex:1}
.pdf-identity h2,.pdf-source {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pdf-identity h2 {font-size:13px;color:var(--document-accent)}
.pdf-source {font-size:11px;color:#496261}
.pane-head .pdf-identity .resource-choice {height:22px;min-height:22px;min-width:0;width:100%;padding:0 2px;border:0;background:transparent;color:var(--document-accent);font-weight:650;text-overflow:ellipsis}
.pane-controls,.pane-window {display:flex;flex:none;align-items:center;gap:0;flex-wrap:nowrap}
.pane-window {padding-left:4px;border-left:1px solid #afc5c0}
.pane-controls button,.pane-window button {display:inline-flex;align-items:center;justify-content:center;gap:7px;width:44px;height:44px;min-height:44px;padding:0;border-color:transparent;background:transparent}
.pane-controls button:hover,.pane-window button:hover {background:#cfdfdb}
.pane-controls button[aria-pressed=true] {background:#176d70;color:white}
.pane-head .pane-window svg,.pane-controls svg {width:24px;height:24px;flex:none}
.pdf-scale {width:38px;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}
#panes[data-maximized=true] .pane-window button {width:auto;padding-inline:12px;background:#176d70;color:white;font-size:14px;font-weight:650}


dialog {padding:0 16px 16px;max-height:min(85dvh,760px);overscroll-behavior:contain}
.modal-heading {position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border-bottom:1px solid #ccd8d6;margin:0 -16px 12px;padding:5px 10px 5px 16px;min-height:56px}
.modal-heading h2 {font-size:18px;margin:0}
dialog button {min-height:44px}
dialog .modal-close {width:44px;padding:0;font-size:25px;line-height:1}



.pane-head {container-type:inline-size}
/* Question navigation and document labels */
.question-toolbar {height:44px;flex:none;gap:8px;margin-bottom:0}
.question-actions {display:flex;flex:none;gap:4px}
.answer-toggle {display:flex;align-items:center;gap:4px}
.question-actions #toggleAnswer {min-height:44px;min-width:102px}
#toggleAnswer[aria-expanded="false"] {background:#14676c;color:white;border-color:#14676c}
#answerOption {padding:5px 8px;border:1px solid #8eb6ac;border-radius:5px;background:#d6ebe6;color:#15383d;font-weight:700;white-space:nowrap}
.question-toolbar:has(#answerToggle:not([hidden])) {height:auto;min-height:48px;flex-wrap:wrap}
.question-actions button {height:38px;padding:var(--neutral-action-padding, 4px 9px);font-size:14px;white-space:nowrap}
@media(max-width:620px) {
 .question-actions button {padding-inline:6px}
}
#sourceLinks p {margin:0;padding:9px 0;border-bottom:1px solid #dbe5e2}
#sourceLinks small {margin-top:4px}
#list {overflow-x:hidden}
.question-card {min-width:0;border:1px solid var(--card-border);border-radius:5px;background:var(--content-bg);margin-bottom:var(--question-card-gap, 5px);padding:6px 8px;overflow-wrap:anywhere}
.question-card.selected {background:var(--selected-bg);border-color:var(--selected-border)}

.question-card .question-select:focus-visible {outline:none;text-decoration:underline}
#list .skill-preview:focus-visible {outline-offset:-2px}
#list .skill-preview:hover,#list .skill-preview[aria-expanded=true] {text-decoration:underline}
#skillsPopover {position:fixed;inset:auto;margin:0;padding:0;width:min(340px,calc(100vw - 16px));max-height:min(50dvh,340px);overflow:auto;background:#fcfefd;color:#173f43;border:1px solid #9bbab5;border-radius:7px;box-shadow:0 5px 18px #173f4333}
.skill-popover-heading {display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#f3f8f7;padding:3px 6px 3px 12px}
#closeSkillPopover {width:40px;height:40px;padding:0;font-size:23px}
#skillPopoverList {margin:0;padding:8px 12px 12px 30px}
#skillPopoverList li+li {margin-top:4px}
.pane-head {border-left:0;background:#e5edec}
.pdf-identity h2 {font-weight:700;font-size:17px;color:#173f43}
@container (max-width:350px) {
 .pdf-identity h2 {font-size:14px;line-height:1.15;white-space:normal;overflow-wrap:anywhere}
}
.pdf-source {display:none}
#panes[data-maximized=true] .pdf-source {display:block}



.pager {align-items:center;gap:4px}
#pagePosition {font-size:12px;white-space:nowrap}
#skillsPopover {max-height:min(50dvh,340px)}
.pane .pdf {--pdf-frame-edge:5px}
.pdf-sheet {box-sizing:border-box;width:max-content;min-width:100%;padding:var(--pdf-frame-edge, 5px) 0}
.pdf-sheet .pdf-page {margin:0 auto 8px;box-shadow:none}
.pdf-sheet .pdf-page:last-child {margin-bottom:0}
#reportDialog {width:550px}
#reportStatus:empty {display:none}
#savedReports li+li {margin-top:8px}

#administration {position:relative;z-index:5}
#administration summary {padding:7px 12px;background:#eef6f4;color:#173f43;border-radius:5px;font-weight:650}
.admin-actions {position:absolute;top:calc(100% + 4px);right:0;display:grid;gap:3px;width:min(260px,90vw);padding:5px;background:#fff;border:1px solid #9bb7b3;border-radius:6px;box-shadow:0 4px 16px #173f4330}
.admin-actions button {text-align:left;min-height:40px;border:0}
.admin-actions button:hover:not(:disabled) {background:#e1efec}
#panes[data-mode=focus]:not([data-maximized=true]) .resource-stack .pane-controls {display:none}
.pane-window {grid-column:3}
.pane-head .make-main {flex:none;min-height:44px;padding:4px 7px;font-size:13px;white-space:nowrap}
dialog {width:min(820px,calc(100vw - 24px));max-width:none;max-height:90dvh;font-size:16px}
dialog .meta,dialog .taghelp,dialog small,dialog #historyList,dialog .current-resource,dialog input,dialog select,dialog textarea,dialog button {font-size:16px}
dialog input,dialog select,dialog textarea {min-width:0;max-width:100%;min-height:42px}
dialog input[type=checkbox] {width:21px;height:21px;min-height:0;vertical-align:middle;margin-right:7px;accent-color:#176d70}
dialog fieldset>label {padding:6px 0}
dialog .modal-heading {min-height:60px}
dialog .modal-heading h2 {font-size:22px}
dialog .modal-close {height:44px;flex:0 0 44px;font-size:27px}
#editor {width:min(980px,calc(100vw - 24px));max-height:92dvh}
.editor-actions {display:flex;gap:6px;align-items:center;flex:none}
#save {background:#176d70;color:white}
#editor .checks {max-height:none;overflow:visible}
#editor .checks label {min-height:38px;padding:3px;line-height:1.25}
#editor .checks input {flex:none;margin:0}
#editor .selected-tags {margin:4px 0 8px}
#editor fieldset details {margin-bottom:10px}
#editor input[type=search] {width:100%;margin:6px 0}
#skillsList {max-height:none;overflow:visible}
#sourcesDialog {width:min(900px,calc(100vw - 24px))}
#sourceLinks a {display:inline-block;padding-block:5px;font-size:17px}
#sourceLinks p {overflow-wrap:anywhere}
#reportDialog {width:min(740px,calc(100vw - 24px))}
#reportDescription {min-height:110px;resize:vertical}
@media(max-width:580px){
 .modal-heading {flex-wrap:wrap}
 .modal-heading h2 {font-size:19px}
 .editor-actions {margin-left:auto}
 dialog .grid,dialog .checks {grid-template-columns:1fr}
}


#filterSidebar {padding:7px;gap:6px}
.filter-bar,.filter-modes {display:flex;align-items:center;gap:4px}
.filter-bar {justify-content:space-between}
.filter-bar button {min-height:36px;padding:4px 8px;font-size:16px}
.filter-modes button[aria-pressed=true] {background:#176d70;color:white;border-color:#176d70}
#filterControls {max-height:48%;padding:0 3px 0 1px}
#filterControls label {font-size:16px;gap:4px}
#filterControls input,#filterControls select {min-height:36px;padding:4px 7px;margin-bottom:6px}
#count {font-size:15px;line-height:1.25;text-align:left}
#list {padding:0 3px 0 0}
#resultSpace {position:relative;min-height:0}
#resultWindow {position:absolute;inset-inline:0}
#list .result-placeholder {height:83px;margin:0 0 5px}
#list .result-placeholder {border-radius:5px;background:#eaf0ee}
:is(#list,#worksheetList) .question-card .question-select {min-height:0;display:block;width:100%;margin:0;padding:0;border:0;background:transparent;text-align:left;font-size:16px;line-height:18px}
.question-card .card-reference strong,.question-card .card-topics {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.question-card .card-session {margin-top:1px;font-size:14px;line-height:16px}
.question-card .card-topics {margin-top:1px;font-size:15px;line-height:17px}
:is(#list,#worksheetList) .question-card .skill-preview {display:block;width:100%;margin:0;border:0;background:transparent;text-align:left;color:#3f6062;min-height:0;padding:0;margin-top:1px;font-size:14px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#panes[data-maximized=true] .pdf-identity {display:flex;align-items:baseline;min-width:0;gap:7px}
#panes[data-maximized=true] .pdf-identity h2 {font-size:19px;flex:none}
#panes[data-maximized=true] .pdf-source {font-size:17px;min-width:0}
#panes[data-maximized=true] .pdf-source::before {content:'· ';margin-right:2px}
@media(max-width:650px){
 .filter-bar button {padding-inline:5px;font-size:14px}
 #panes[data-maximized=true] .pdf-identity h2 {max-width:50%;flex:0 1 auto}
}



/* Keep the filter fields and results header outside the scrolling cards. */
#filterSidebar {gap:10px;padding:8px}
.browser-filters {flex:none;display:flex;flex-direction:column;gap:7px;max-height:47%;padding:8px;background:var(--panel-bg);border:var(--main-tile-border);border-radius:var(--main-tile-radius)}
.browser-filters #filterControls {min-height:0;max-height:none}
.browser-results {display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;background:var(--panel-bg);border:var(--main-tile-border);border-radius:var(--main-tile-radius)}
.browser-results :is(#list,#worksheetList) {padding:4px 5px 0}
.question-card .card-reference strong {min-width:0;overflow-wrap:anywhere}


/* Teaching workspace surfaces */
:root {--workspace-teal:#153b40;--header-bg:#12343A;--workspace-bg:#E8EFF1;--panel-bg:#E6EFEB;--content-bg:#FFFFFF;--selected-bg:#DDF1EA;--structural-border:#647C80;--card-border:#B8CBC7;--selected-border:#64998F;--main-tile-border-width:1px;--main-tile-border:var(--main-tile-border-width) solid var(--structural-border);--question-card-gap:5px;--main-tile-radius:8px;--tile-row-gap:8px;--workspace-radius:12px}
body {background:var(--workspace-bg)}
body > header {background:transparent;padding-inline:14px}
main {min-height:0;padding:0 10px 10px}
#filterSidebar {border:0;border-radius:var(--workspace-radius)}
:is(#browserDivider,#worksheetDivider),.layout-divider {background:var(--workspace-bg);border:0}
:is(#browserDivider,#worksheetDivider):is(:hover,:focus-visible),.layout-divider:hover,.layout-divider:focus-visible {background:#70aaa1}
article {padding:0;gap:var(--tile-row-gap);background:transparent}
.question-controls {flex:none;background:#f3f5f4;border-radius:var(--workspace-radius);padding:4px 9px}
.question-controls .question-toolbar {justify-content:flex-start;height:auto;min-height:34px;flex-wrap:wrap;gap:5px 10px}
.question-controls .question-actions button {height:32px;min-height:32px;font-size:13px}
.question-controls .answer-toggle {flex:none;margin-inline-start:4px}
.viewer-actions #toggleAnswer {min-height:32px;padding-inline:13px;font-weight:700}
.viewer-actions #toggleAnswer[aria-expanded=false] {background:#14676c;color:white;border-color:#14676c}
#panes[data-maximized=true] {background:var(--workspace-bg);padding:8px}
@media(max-width:850px){
 main {padding:0 6px 6px}
 article {gap:6px}
 .question-controls {padding-inline:6px}
}

.question-controls {container-type:inline-size}
.filter-actions {display:flex;align-items:center;gap:4px;margin-left:auto}
.view-toolbar .view-modes {align-items:center;border:1px solid #b6c9c6;border-radius:6px;padding:2px;gap:2px}
.view-modes > span:first-child {padding-inline:7px;color:#456063}
.view-toolbar .view-modes button {display:grid;place-items:center;width:36px;height:34px;padding:0;border-color:transparent}
.view-toolbar .view-modes button:not([aria-pressed=true]):hover {background:#d8eeea}
.view-separator {width:1px;height:22px;background:#b6c9c6;margin-inline:3px}

.admin-preview,#viewingMode {display:flex;align-items:center;gap:5px}
.admin-preview {margin-left:auto}
#viewingMode {color:white}
.header-switch {display:inline-flex;align-items:center;gap:10px;background:transparent;color:white;border:0;border-radius:4px;font-size:14px;white-space:nowrap}
header .header-switch span {display:block;flex:none;min-width:0;margin:0}
.header-switch .admin-mode-track {position:relative;width:44px;height:24px;border-radius:999px;background:#526f70}
.header-switch .admin-mode-track::after {content:"";position:absolute;inset:4px auto auto 4px;width:16px;height:16px;border-radius:50%;background:white}
.header-switch[aria-checked=true] .admin-mode-track {background:#168477}
.header-switch[aria-checked=true] .admin-mode-track::after {left:24px}
body:not(.admin-preview-active) label[data-filter='review_status'] {display:none}
#questionMeta {display:flex;flex-wrap:wrap;gap:5px}
#questionMeta:empty {display:none}
#questionMeta .question-badge {display:inline-flex;align-items:center;min-height:0;padding:3px 7px;border:1px solid #bdcdca;border-radius:5px;font-size:13px;line-height:1.2;white-space:nowrap}
.marks-badge {background:#f9fbfa;color:#344b4e}
#questionMeta .difficulty-badge {background:#e6f1ef;color:#28594f}
#questionMeta .review-badge {background:#fff0cd;border-color:#d5ad64;color:#693e0e}
#questionMeta .review-badge:hover {background:#ffe4aa}
.question-controls .question-toolbar:has(#answerToggle:not([hidden])) {min-height:34px}
.question-controls .view-toolbar {flex-wrap:wrap}
.view-toolbar svg {width:18px;height:18px}
.view-toolbar .view-modes button {min-height:34px}
#questionReviewNote {white-space:pre-wrap}

/* Each pane has its own document tabs. */
.pane-head .pdf-document {gap:4px}
.document-tabs {min-width:0;flex:1;display:flex;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:thin;padding:2px}
.pane-head .document-tab {flex:none;padding:4px 7px;min-height:32px;border:1px solid transparent;background:transparent;color:#516d6b;font-size:13px;font-weight:600;white-space:nowrap;border-radius:0}
.pane-head .document-tab:hover {color:#145e5a;background:transparent}
.pane-head .document-tab[aria-pressed=true] {background:transparent;color:#145e5a;border-bottom:2px solid #277e74;padding-bottom:3px}
.document-tab-short {display:none}
@container (max-width:620px) {
 .document-tab span:first-child {display:none}
 .document-tab .document-tab-short {display:inline}
}
@container (max-width:365px) {
 .pane-head .pdf-document {grid-column:1/-1}
 .pane-head .pane-controls {grid-column:2}
}

@container (max-width:245px) {
 .pane-head .pane-controls button,.pane-head .pane-window button {width:32px;height:34px;min-height:34px}
 .pane-head .pane-controls svg,.pane-head .pane-window svg {width:20px;height:20px}
}

.document-tab-compact {display:none}
@container (min-width:475px) and (max-width:620px) {
 .pane-head .document-tab {padding-inline:4px;font-size:12px}
 .document-tab .document-tab-compact {display:inline}
 .document-tab .document-tab-short {display:none}
}

/* Application header and teaching surfaces */
body > .application-header {min-height:58px;padding:0 12px;gap:18px;background:#12343A;flex-wrap:nowrap}
.application-brand,.application-modes {display:flex;align-items:center;gap:10px;min-width:0}
.application-brand h1 {font-size:17px;font-weight:700;white-space:nowrap}
.application-brand small {min-width:0;overflow:hidden;text-overflow:ellipsis;color:#c0d6d3;font-size:16px;white-space:nowrap}
.application-modes {align-self:stretch;gap:4px}
.application-modes > span,.application-modes > button {display:flex;align-items:center;min-width:0;margin:0;padding:0 8px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#f3fbfa;font-size:13px;white-space:nowrap}
.application-modes > [aria-current] {border-bottom-color:#76d0c1}
.application-modes > button:disabled {color:#a8bfbd;opacity:1}
.application-header .header-switch {min-height:28px;padding:2px 6px}
.admin-tools-slot {flex:0 0 26px;width:26px}
.application-header #administration summary {display:grid;place-items:center;width:26px;height:28px;padding:0;list-style:none;background:transparent;color:#e3f5f1;cursor:pointer}
.application-header #administration summary::-webkit-details-marker {display:none}
.application-header #administration summary:hover,.application-header #administration[open] summary {background:#285257}
.application-header #administration summary:focus-visible {outline:2px solid #a9ded5;outline-offset:1px}
.application-header #administration[open] summary svg {transform:rotate(180deg)}
@media (max-width:700px) {
 body > .application-header {gap:6px;flex-wrap:wrap;padding-block:3px}
 .application-brand {flex-wrap:wrap;gap:2px 8px}
 .application-modes > span,.application-modes > button {padding:4px}
}
.question-controls {background:#f2f6f4}
.pane-head {background:#e8f0ed}
#filterSidebar {padding:0;background:transparent;border-radius:0}

#primaryFilters {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,116px),1fr));gap:4px 8px}
#primaryFilters label,#filterControls > label {font-size:13px;min-width:0}
#filterControls input,#filterControls select {background:var(--content-bg);min-width:0;min-height:32px;margin-bottom:3px}

/* Separate question information and layout controls. */
.application-brand h1 {font-size:20px}
.question-controls {border:1px solid #CBD9D6;background:#fff;border-radius:8px}
.question-controls {padding:5px 8px;overflow:hidden}
.question-controls .question-toolbar {flex-wrap:nowrap}
#questionMeta {flex-wrap:nowrap;overflow-x:auto;padding-bottom:1px}
#questionMeta .question-badge {flex:none}
.question-controls .question-actions {margin-left:auto}
:root {--toolbar-height:44px;--toolbar-button-height:32px;--toolbar-font-size:13px;--document-toolbar-height:var(--toolbar-height);--document-tab-height:38px;--document-tab-font-size:16px;--neutral-action-padding:4px 9px}
article > .view-toolbar {display:flex;align-items:center;flex:none;min-height:var(--toolbar-height);background:var(--content-bg);border:var(--main-tile-border);border-radius:var(--main-tile-radius);padding:2px 7px}
article > .view-toolbar .view-modes {display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:2px 4px;border:0;border-radius:9px;background:transparent}
.view-modes .layout-label {padding:0 8px;color:#537574;font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
article > .view-toolbar .view-modes button {display:inline-flex;align-items:center;gap:5px;width:auto;height:30px;min-height:30px;padding:0 8px;border:1px solid transparent;border-radius:6px;background:transparent;color:#496764;font-size:13px;white-space:nowrap}
article > .view-toolbar .view-modes svg {width:15px;height:15px;flex:none}
article > .view-toolbar .view-modes button[aria-pressed=true] {background:white;border-color:#e0eae7;box-shadow:0 1px 3px #12343a16;color:#146863;font-weight:650}



#panes .pane {border:var(--main-tile-border);border-radius:var(--main-tile-radius)}
.pane-head,.browser-results .selector-heading-row {background:var(--content-bg);border-bottom:var(--main-tile-border)}
.pane .pdf,#list,#worksheetList {scrollbar-width:auto}
.pane .pdf::-webkit-scrollbar {width:var(--pdf-frame-edge);height:var(--pdf-frame-edge)}
:is(#list,#worksheetList)::-webkit-scrollbar {width:8px;height:8px}
.pane .pdf::-webkit-scrollbar-track,.pane .pdf::-webkit-scrollbar-corner {background:#242626}
:is(#list,#worksheetList)::-webkit-scrollbar-track {background:#edf3f1}
.pane .pdf::-webkit-scrollbar-thumb,:is(#list,#worksheetList)::-webkit-scrollbar-thumb {background:#82938f;border-radius:8px}
.pane .pdf::-webkit-scrollbar-thumb:hover,:is(#list,#worksheetList)::-webkit-scrollbar-thumb:hover {background:#607874}
.pane .pdf::-webkit-scrollbar-button,:is(#list,#worksheetList)::-webkit-scrollbar-button {display:none;width:0;height:0}
@container (max-width:475px) {
 .question-controls .question-toolbar {flex-wrap:wrap}
 .question-controls .question-actions {margin-left:0}
}

.application-header .admin-preview {flex-wrap:wrap;justify-content:flex-end;gap:8px}
.application-header .header-switch:disabled {color:#a8bfbd;opacity:.8;cursor:default}
.application-header .header-switch:focus-visible {outline:none}
.application-header .header-switch:focus-visible .admin-mode-track {outline:2px solid #a9ded5;outline-offset:2px}

body > main {padding-block-start:8px}

.application-header #viewingMode {padding-left:0;margin-left:4px}
.application-header .admin-tools-slot {flex-basis:66px;width:66px}
.application-header #administration summary {display:flex;align-items:center;justify-content:center;gap:3px;width:66px;padding:0 5px;background:#234a50;font-size:13px}
.application-header #administration summary:hover,.application-header #administration[open] summary {background:#315b60}

article > .view-toolbar .view-modes #resetLayout,.filter-bar .filter-actions #resetFilters {display:inline-flex;align-items:center;gap:5px;height:42px;min-height:42px;padding-inline:13px;font-size:16px;border-color:#cededb;border-radius:7px;background:#fff;color:#315d61;font-weight:600}
article > .view-toolbar .view-modes #resetLayout {margin-inline-start:4px}
article > .view-toolbar .view-modes #resetLayout:hover,.filter-bar .filter-actions #resetFilters:hover:enabled {background:#e4efec}
.filter-bar .filter-actions #resetFilters:disabled {opacity:.55}
article > .view-toolbar .view-modes #resetLayout svg,.filter-bar .filter-actions #resetFilters svg {width:13px;height:13px;flex:none}

.selector-heading {margin:0;color:#12343a;font-size:17px;font-weight:650;line-height:1.2}
.filter-bar .filter-modes button,.pane-head .document-tab,article > .view-toolbar .view-modes button[data-view] {position:relative;display:inline-flex;align-items:center;height:42px;min-height:42px;padding:0 8px;border:0;border-radius:0;box-shadow:none;background:transparent;color:#496764;font:600 16px/1.2 system-ui;white-space:nowrap}
.pane-head .document-tab {height:var(--document-tab-height);min-height:var(--document-tab-height);font-size:var(--document-tab-font-size)}
.filter-bar .filter-modes button[aria-pressed=true],.pane-head .document-tab[aria-pressed=true],article > .view-toolbar .view-modes button[data-view][aria-pressed=true] {background:transparent;color:#145e5a;border:0;padding:0 8px;box-shadow:none}
.filter-bar .filter-modes button[aria-pressed=true]::after,.pane-head .document-tab[aria-pressed=true]::after,.view-modes button[data-view][aria-pressed=true]::after {content:'';position:absolute;inset:auto 3px 3px;height:2px;background:#277e74}

.filter-modes .layout-label,.view-modes .layout-label {display:inline-flex;align-items:center;min-height:22px;margin-inline-end:3px;padding:0 8px;border-right:1px solid #b6c9c6;color:#537574;font-size:14px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.filter-bar,.filter-bar .filter-modes {flex-wrap:wrap}

/* Shared tabs and continuous Question Selector. */
:root {--active-tab:#006A70;--muted-tab:#496764}
.workspace-nav {display:flex;align-items:center;gap:3px;padding-inline:4px;border-radius:5px;background:#f4f8f7}
.workspace-nav :is(button,a) {display:inline-flex;align-items:center;text-decoration:none;height:34px;min-height:34px;padding:0 8px;border:0;background:transparent;border-radius:0;white-space:nowrap;font-size:14px}
.workspace-nav :is(button,a),.filter-bar .filter-modes button,.pane-head .document-tab,article > .view-toolbar .view-modes button[data-view] {position:relative;font-weight:400;color:var(--muted-tab)}
.workspace-nav [aria-current],.filter-bar .filter-modes button[aria-pressed=true],.pane-head .document-tab[aria-pressed=true],article > .view-toolbar .view-modes button[data-view][aria-pressed=true] {font-weight:600;color:var(--active-tab)}
.workspace-nav [aria-current]::after,.filter-bar .filter-modes button[aria-pressed=true]::after,.pane-head .document-tab[aria-pressed=true]::after,.view-modes button[data-view][aria-pressed=true]::after {content:"";position:absolute;inset:auto 3px 3px;height:2px;background:var(--active-tab)}
.workspace-nav :is(button,a):focus-visible,.filter-modes button:focus-visible,.document-tab:focus-visible,.view-modes button:focus-visible,body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs button[data-worksheet-id]:focus-visible {outline:2px solid var(--active-tab);outline-offset:-2px}
.workspace-nav button:disabled {opacity:.65}
#filterSidebar {gap:var(--tile-row-gap);border:0}
#filterSidebar .browser-filters {max-height:64%}
.browser-results .selector-heading-row {flex:none;min-height:var(--toolbar-height);align-items:center;padding:4px 10px}
.browser-filters:has(#filterControls[hidden]) {display:none}
.filter-bar .filter-modes {gap:2px}
.filter-bar .filter-modes button,.filter-bar .filter-modes button[aria-pressed=true] {gap:3px;padding-inline:3px}
.filter-modes svg {width:15px;height:15px;flex:none}
.filter-modes .layout-label {padding-inline:3px;margin-inline-end:0}
.viewer-actions #toggleAnswer {height:30px;min-height:30px;border:1px solid #a8c1bb;background:#fff;color:#254b4d}
.viewer-actions #toggleAnswer[aria-expanded=false] {background:#006A70;color:#fff;border-color:#006A70}
.pane .pdf {--pdf-frame-edge:12px;border:0;background:var(--panel-bg)}
.pdf-sheet {padding-block:4px}
.pane .pdf::-webkit-scrollbar,:is(#list,#worksheetList)::-webkit-scrollbar {width:12px;height:12px}
.pane .pdf::-webkit-scrollbar-track,.pane .pdf::-webkit-scrollbar-corner,:is(#list,#worksheetList)::-webkit-scrollbar-track {background:var(--panel-bg)}
.pane .pdf::-webkit-scrollbar-thumb,:is(#list,#worksheetList)::-webkit-scrollbar-thumb {background:#788986;border:1px solid var(--panel-bg);border-radius:9px}
.pane-head .pane-controls button,.pane-head .pane-window button {width:30px;height:30px;min-height:30px}
.pane-head .pane-controls svg,.pane-head .pane-window svg {width:16px;height:16px}
#panes[data-maximized=true] .pane-window button {width:auto}
 @media (max-width:820px) {
 body > .application-header {flex-wrap:wrap;gap:6px;padding-block:3px}
 }

.selector-heading-row {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 8px;padding:1px 2px 7px}

article > .view-toolbar .viewer-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-inline-start:auto}
article > .view-toolbar :is(.viewer-actions button, .view-modes button[data-view], .layout-label),
article > .view-toolbar .viewer-actions #toggleAnswer, article > .view-toolbar .view-modes #resetLayout, article > .view-toolbar #addToWorksheet {font-family:system-ui;font-size:var(--toolbar-font-size);line-height:1.2}
article > .view-toolbar :is(.viewer-actions button, .view-modes button[data-view]),
article > .view-toolbar .viewer-actions #toggleAnswer, article > .view-toolbar .view-modes #resetLayout, article > .view-toolbar #addToWorksheet {height:var(--toolbar-button-height);min-height:var(--toolbar-button-height)}

/* Worksheet workspace. Normal viewer layout remains governed by its saved preference. */
:root {--worksheet-width:clamp(290px,23vw,355px)}
body.worksheet-mode main {grid-template-columns:var(--browser-width) 10px minmax(0,1fr) 10px var(--worksheet-width)}
body.worksheet-mode.filters-hidden main {grid-template-columns:minmax(0,1fr) 10px var(--worksheet-width)}
body.worksheet-mode:has(#panes[data-maximized=true]) main {grid-template-columns:minmax(0,1fr)}
#worksheetSidebar {min-width:0;min-height:0;display:flex;flex-direction:column;gap:var(--tile-row-gap);padding:0;border:0;background:transparent;overflow:hidden;color:#12343a}
body.worksheet-mode #worksheetSidebar {grid-column:5}
body.worksheet-mode.filters-hidden #worksheetSidebar {grid-column:3}
.worksheet-tabs-bar {background:var(--content-bg);border:var(--main-tile-border);border-radius:var(--main-tile-radius);padding:8px}
.worksheet-tabs-bar {display:flex;align-items:center;gap:5px;min-height:var(--toolbar-height);flex:none;padding-block:2px}
.worksheet-tabs-bar button,.worksheet-tab-name {height:var(--mode-button-size);min-height:var(--mode-button-size);font-size:var(--mode-font-size);line-height:1.2}
.worksheet-tab-name {width:150px;flex:none;margin:0;padding:4px 8px}
.worksheet-tab-name:focus-visible {outline-offset:-2px}
#worksheetTabs {display:flex;flex:1;min-width:0;overflow-x:auto;gap:4px}
#worksheetTabs button {flex:none;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:5px;background:transparent}
#worksheetTabs button[aria-pressed=true] {color:#006a70;font-weight:600}
#worksheetStatus {margin:0;color:#855826;font-size:13px}
#worksheetList {list-style:none;margin:0;overflow-x:hidden}
.worksheet-question {--worksheet-action-size:21px;--worksheet-action-gap:2px;display:grid;grid-template-columns:26px minmax(0,1fr);gap:5px;align-items:start}
.worksheet-position {justify-self:end;min-width:100%;padding:0 4px;text-align:center;font-variant-numeric:tabular-nums;border-radius:999px;background:var(--panel-bg);color:#006a70;font-weight:700;font-size:13px;line-height:18px}
.worksheet-card-content {grid-area:1 / 2;min-width:0}
.worksheet-card-content .card-reference {min-height:var(--worksheet-action-size);padding-inline-end:calc(3 * var(--worksheet-action-size) + 2 * var(--worksheet-action-gap) + 5px)}
.worksheet-question-actions {grid-area:1 / 2;justify-self:end;z-index:1;display:grid;grid-template-columns:repeat(3,var(--worksheet-action-size));gap:var(--worksheet-action-gap)}
.worksheet-question-actions button {position:relative;display:grid;place-items:center;height:var(--worksheet-action-size);padding:0;border:1px solid var(--card-border);border-radius:3px;background:transparent;font-size:15px;line-height:1}
.worksheet-question-actions button:enabled:hover {background:var(--panel-bg);border-color:var(--selected-border)}
.worksheet-empty {padding:10px 4px;color:#557371;font-size:14px}
#addToWorksheet {background:#006a70;border-color:#006a70;color:white;font-weight:600}
#addToWorksheet:disabled {background:#e4f3ed;color:#28594f;border-color:#a9c0ba;opacity:1}
#worksheetTabMenu {display:none}
#worksheetTabMenu:popover-open {display:grid;gap:3px}
#worksheetCardMenu,#worksheetTabMenu {position:fixed;inset:auto;margin:0;padding:4px;border:1px solid #a9c0ba;border-radius:6px;background:#fff;box-shadow:0 4px 16px #173f4330}
 @media (max-width:950px) {
 body.worksheet-mode main,body.worksheet-mode.filters-hidden main {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(320px,60vh) auto;overflow:auto;gap:8px}
 body.worksheet-mode :is(#browserDivider,#worksheetDivider) {display:none}
 body.worksheet-mode #filterSidebar {max-height:38vh}
 body.worksheet-mode main > article {grid-row:2;grid-column:1}
 body.worksheet-mode #worksheetSidebar,body.worksheet-mode.filters-hidden #worksheetSidebar {grid-row:3;grid-column:1;min-height:220px;max-height:55vh}
}

.question-card .card-session {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Permanent header tracks match the sidebar widths on desktop. */
body > .application-header {
  --title-available-width: var(--browser-width, 340px);
  --header-title-size: clamp(16px, calc(16px + (var(--title-available-width) - 288px) / 6), 22px);
  --header-rows: 26px 32px;
  --header-title: 700 var(--header-title-size)/26px system-ui;
  --header-secondary: 400 14px/19px system-ui;
  --header-pill: 500 15px/28px system-ui;
  display: grid;
  grid-template-columns: var(--browser-width, 272px) minmax(0, 1fr) var(--worksheet-width);
  align-items: stretch;
  gap: 10px;
  padding: 8px 10px 0;
  background: transparent;
}
.application-header .header-section {
  display: grid;
  grid-template-rows: var(--header-rows);
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 8px;
  border: var(--main-tile-border);
  border-radius: var(--main-tile-radius);
  background: var(--header-bg);
  color: #fff;
}
.application-header .header-title {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: var(--header-title);
  color: inherit;
}
.application-header .header-section:has(> h1) {container-type:inline-size}
.application-header h1.header-title {width:max-content;overflow:visible}
@container (max-width:270px) {
  .application-header h1.header-title {
    transform-origin:left center;
    transform:scaleX(min(1, calc(100cqi / 245px)));
  }
}
.application-header .header-switch {font: var(--header-secondary); white-space: nowrap}
.application-header .header-switch {justify-self: start; padding-inline: 0}
.worksheet-header-top {display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.worksheet-header-top .header-switch {flex:none;min-height:24px;padding-block:0;gap:6px}
.application-header .current-question-header {position: relative}
.application-header #selectedSource {display: contents}
.application-header #sourceReference {grid-row: 1; margin-inline-end: 140px}
.application-header .current-question-header:has(#administration:not([hidden])) #sourceReference {margin-inline-end: 208px}
.application-header .admin-preview {position: absolute; top: 5px; right: 10px; margin: 0}
.application-header .admin-tools-slot:not(:has(#administration:not([hidden]))) {display: none}
.application-header .header-info-line,
.application-header #sourceDetails,
.application-header #questionMeta {display: flex; align-items: center; gap: 5px; min-width: 0; margin: 0}
.application-header .header-info-line {grid-row: 2; overflow: hidden}
.application-header #sourceDetails {flex: 0 1 auto; overflow-x: auto; scrollbar-width: none}
.application-header .header-info-line:has(.question-skill-line) #sourceDetails {max-width: 65%}
.application-header #questionMeta {flex: 1 1 auto}
.application-header #questionMeta:empty {display: none}
.application-header :is(.question-detail-pill, .question-skill-line) {
  display: block;
  height: 30px;
  margin: 0;
  padding-inline: 9px;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  font: var(--header-pill);
  white-space: nowrap;
}
.application-header .question-detail-pill {flex: none}
.application-header .question-skill-line {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: transparent;
  background: #235d65;
}
.application-header .question-badge {flex: none; margin: 0}
.selector-heading-row small {font: 400 12px/16px system-ui;color:#496764;margin-inline-start:auto}
@media (max-width: 950px) {
  body > .application-header {
    --title-available-width: calc(50vw - 13px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  .application-header .current-question-header {grid-column: 1 / -1; grid-row: 2}
}

.filter-bar {
  min-height: var(--toolbar-height);
  flex: none;
  justify-content: flex-start;
  padding: 2px 8px;
  border: var(--main-tile-border);
  border-radius: var(--main-tile-radius);
  background: var(--content-bg);
}
.filter-heading {
  margin: 0 3px 0 0;
  padding-inline-end: 7px;
  border-inline-end: 1px solid #b6c9c6;
  color: #537574;
  font: 500 var(--toolbar-font-size)/22px system-ui;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.filter-bar .filter-modes button,
.filter-bar .filter-actions #resetFilters {
  height: var(--toolbar-button-height);
  min-height: var(--toolbar-button-height);
  font-size: var(--toolbar-font-size);
  white-space: nowrap;
}
.filter-bar .filter-actions #resetFilters {padding-inline: 8px}
.question-card:not(.selected):hover {background:#f4f8f7}

:root {--mode-button-size:38px;--mode-font-size:15px;--worksheet-tab-border-width:1px;--action-button-height:34px}
.filter-bar .filter-modes button,
article > .view-toolbar .view-modes button[data-view] {
  height: var(--mode-button-size);
  min-height: var(--mode-button-size);
  font-size: var(--mode-font-size);
}
#worksheetList.worksheet-drag-preview {display:flex;flex-direction:column}
#worksheetList.worksheet-drag-preview > .worksheet-question {flex:none}
#worksheetList .worksheet-drag-card {opacity:0}
#worksheetList .worksheet-drag-floating {
  position:fixed;z-index:8;pointer-events:none;border-color:var(--active-tab)
}

.worksheet-header-actions {display:flex;gap:6px;justify-self:stretch;min-width:0}
.worksheet-header-actions #printWorksheet {margin-inline-start:auto}
.worksheet-header-actions button {white-space:nowrap;padding:3px 8px;border:1px solid #b8cbc7;background:transparent;color:white;font:var(--header-secondary)}
#savedWorksheetList {display:grid;gap:6px}
#savedWorksheetList button {text-align:left;overflow-wrap:anywhere}
.worksheet-tab {display:flex;align-items:center;flex:none;border:var(--worksheet-tab-border-width) solid var(--card-border);border-radius:5px;background:var(--content-bg)}
.worksheet-tab:has(button[aria-pressed=true]) {background:var(--selected-bg);border-color:var(--selected-border)}
body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs .worksheet-tab {
  border-color: transparent;
  background: transparent;
}
body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs button[data-worksheet-id] {
  position: relative;
  color: var(--muted-tab);
  font-weight: 400;
  padding-block: 0;
}
body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs button[aria-pressed=true] {
  color: var(--active-tab);
  font-weight: 600;
}
body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs button[aria-pressed=true]::after {
  content: "";
  position: absolute;
  inset: auto 3px 3px;
  height: 2px;
  background: var(--active-tab);
}
body:not(:has(#worksheetHeading.worksheet-sidebar-trial)) #worksheetTabs .worksheet-tab :is(button,.worksheet-tab-name) {
  height: calc(var(--action-button-height) - 2 * var(--worksheet-tab-border-width));
  min-height: calc(var(--action-button-height) - 2 * var(--worksheet-tab-border-width));
}
.worksheet-list-totals {display:flex;align-items:center;flex-wrap:wrap;gap:4px}
#filterSidebar #count,.worksheet-list-totals span {padding:3px 8px;border:1px solid var(--selected-border);border-radius:999px;background:var(--selected-bg);color:var(--active-tab);white-space:nowrap}
#filterSidebar #count,.worksheet-list-totals span {font-size:13px;font-weight:600}


.worksheet-question-actions button:enabled::after {content:'';position:absolute;inset:-5px -2px}

.filter-bar .filter-actions #resetFilters,
article > .view-toolbar .view-modes #resetLayout,
article > .view-toolbar .viewer-actions #toggleAnswer,
article > .view-toolbar .viewer-actions .question-actions button,
article > .view-toolbar #addToWorksheet {
  height: var(--action-button-height);
  min-height: var(--action-button-height);
  font-size: var(--mode-font-size);
}
#printWorksheetDialog {
  width:min(600px,calc(100vw - 24px));
  background:var(--panel-bg);
  border:var(--main-tile-border);
  border-radius:var(--main-tile-radius);
}
#printWorksheetDialog .modal-heading {background:var(--header-bg);color:#fff}
#printWorksheetDialog .modal-close {background:transparent;color:inherit}
#printWorksheetOptions :is(input[type="text"],select) {background:var(--content-bg)}
#printWorksheetOptions fieldset {margin:0;padding-block:6px;border:var(--main-tile-border);border-radius:var(--main-tile-radius)}
#printWorksheetOptions fieldset label {display:flex;align-items:center;gap:6px;margin-block:4px}
#printWorksheetOptions input[type="radio"] {min-height:0;accent-color:#176d70}
.print-worksheet-summary {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;overflow-wrap:anywhere}
.print-page-format {position:relative;display:flex;align-items:center;gap:6px;margin:0;color:#526663;font-size:13px}
.print-format-info {padding:0 3px;border:0;background:transparent;font-size:16px;line-height:1}
#printNumberingInfo {
  visibility:hidden;position:absolute;z-index:6;inset-block-start:100%;inset-inline-start:0;
  width:min(380px,100%);padding:8px;background:var(--content-bg);color:#12343a;
  border:var(--main-tile-border);border-radius:var(--main-tile-radius);
}
.print-format-info:is(:hover,:focus) + #printNumberingInfo,#printNumberingInfo:hover {visibility:visible}
#printWorksheetWarning:empty {display:none}
#printWorksheetWarning {color:#774b20}
.print-option-check {display:flex;align-items:center;gap:4px}

.worksheet-header-totals {display:none}

/* Reversible desktop Worksheet Builder sidebar trial. */
@media (min-width: 951px) {
  .worksheet-mode #worksheetHeading.worksheet-sidebar-trial .worksheet-header-totals:not([hidden]) {
    display: flex;
    gap: 5px;
    grid-row: 2;
  }
  .worksheet-mode #worksheetHeading.worksheet-sidebar-trial .worksheet-header-actions {
    position: absolute;
    inset: calc(100% + var(--tile-row-gap) + 1px) -1px auto;
    justify-self: stretch;
    height: var(--toolbar-height);
    padding: 2px 7px;
    align-items: center;
    border: var(--main-tile-border);
    border-radius: var(--main-tile-radius);
    background: var(--content-bg);
    z-index: 1;
  }
  .worksheet-mode #worksheetHeading.worksheet-sidebar-trial .worksheet-header-actions button {
    color: var(--header-bg);
    height: var(--action-button-height);
    min-height: var(--action-button-height);
    padding: var(--neutral-action-padding);
    font: 400 var(--mode-font-size)/1.2 system-ui;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) #worksheetSidebar {
    padding-block-start: calc(var(--toolbar-height) + var(--tile-row-gap));
    gap: 0;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tabs-bar {
    align-items: flex-end;
    position: relative;
    min-height: calc(var(--document-toolbar-height) + 2 * var(--main-tile-border-width));
    padding: 2px calc(8px + var(--main-tile-border-width)) 0;
    border: 0;
    background: var(--content-bg);
    border-radius: var(--main-tile-radius) var(--main-tile-radius) 0 0;
  }

  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tabs-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border: var(--main-tile-border);
    border-bottom: 0;
    border-radius: inherit;
    pointer-events: none;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) #worksheetTabs {
    position: relative;
    align-items: flex-end;
    scrollbar-width: none;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tabs-bar :is(button, .worksheet-tab-name) {
    height: var(--document-tab-height);
    min-height: var(--document-tab-height);
    font-size: var(--document-tab-font-size);
    padding-block: 0;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tab {
    border-radius: 4px 4px 0 0;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tab:not(:has([aria-pressed=true], .worksheet-tab-name)) {
    --inactive-tab-recess: 4px;
    transform: translateY(var(--inactive-tab-recess));
    clip-path: inset(0 0 var(--inactive-tab-recess));
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-tab:has(button[aria-pressed=true]) {
    /* Paint only the active tab over the panel's top border. */
    position: relative;
    z-index: 1;
    background: var(--panel-bg);
    border-color: var(--structural-border);
    border-bottom-color: transparent;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) #worksheetSidebar .browser-results {
    /* Start the real panel border in the final pixel of the tab row. */
    position: relative;
    margin-block-start: calc(-1 * var(--main-tile-border-width));
    border: var(--main-tile-border);
    border-radius: 0 0 var(--main-tile-radius) var(--main-tile-radius);
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) .worksheet-question-actions button:focus-visible {
    outline: 2px solid var(--active-tab);
    outline-offset: -2px;
  }
  .worksheet-mode:has(#worksheetHeading.worksheet-sidebar-trial) #worksheetSidebar .selector-heading-row {
    display: none;
  }
}
