/* Visual polish pass (owner request 2026-11-13). Loaded last on the question bank.
   One type pair (Inter for interface, STIX Two Text + STIX Two Math for questions), one button
   system, a centered question column, neutral Bluebook-style light colors, and the Bluebook
   split layout for student-produced responses. Dark mode keeps its star background and colors;
   only type, sizing and button shapes change there. Fonts are served from /fonts (SIL OFL). */

@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/inter-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/inter-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/inter-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/inter-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"STIX Two Text";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/stix-two-text-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"STIX Two Text";font-style:italic;font-weight:400;font-display:swap;src:url(/fonts/stix-two-text-latin-400-italic.woff2) format("woff2")}
@font-face{font-family:"STIX Two Text";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/stix-two-text-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"STIX Two Text";font-style:italic;font-weight:700;font-display:swap;src:url(/fonts/stix-two-text-latin-700-italic.woff2) format("woff2")}
@font-face{font-family:"STIX Two Math";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/stix-two-math.woff2) format("woff2")}

:root{
 --ui:"Inter",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
 --serif:"STIX Two Text","Times New Roman",serif;
 --math:"STIX Two Math","STIX Two Text","Cambria Math",math;
 --btn-h:40px;--btn-h-sm:34px;--btn-r:999px;--card-r:10px;
 /* Light (Bluebook-style neutral) */
 --ink:#1b1d21;--ink-2:#4a4f58;--line:#c4c9d1;--line-strong:#1b1d21;
 --blue:#324dc7;--blue-hover:#2a41ad;--blue-soft:#eef1fd;
 --off-bg:#e8eaee;--off-fg:#8b919c;
}

/* ---------- Type: interface in Inter, questions and math in STIX. */
html:root body.bb-mode,html:root body.bb-mode .bb-top,html:root body.bb-mode .bb-top *,html:root body.bb-mode .bb-footer,html:root body.bb-mode .bb-footer button,html:root body.bb-mode .bb-question-bar,html:root body.bb-mode .bb-question-bar button,html:root body.bb-mode .bb-stage .numeric-response,html:root body.bb-mode .workspace-panel,html:root body.bb-mode .workspace-panel button,html:root body.bb-mode .analytics-preferences{font-family:var(--ui)!important}
html:root body.bb-mode .bb-stage,html:root body.bb-mode .bb-stage p,html:root body.bb-mode .bb-stage .question-paragraph,html:root body.bb-mode .bb-stage .hardbook-question,html:root body.bb-mode .bb-stage .options button,html:root body.bb-mode .bb-stage .question-data-table,html:root body.bb-mode .bb-stage .numeric-response input,html:root body.bb-mode .v2-question-body,html:root body.bb-mode .question-drawer aside>p{font-family:var(--serif)!important}
html:root body.bb-mode math,html:root body.bb-mode .bb-stage .question-math,html:root body.bb-mode math.question-math{font-family:var(--math)!important}
html:root body.bb-mode .bb-stage math,html:root body.bb-mode .v2-question-body math{math-style:normal}/* full-size fractions, as on test day */
/* Digits and words inside math match the surrounding text; the math font handles symbols and variables. */
html:root body.bb-mode math mn,html:root body.bb-mode math mtext{font-family:var(--serif)!important}
html:root body.bb-mode .bb-stage .options button>b{font-family:var(--ui)!important}
html:root body.bb-mode .bb-stage .adapted-question-notice{font-family:var(--ui)!important}
html:root body.bb-mode i.qv{font-style:italic}

/* ---------- Question column: centered and readable, like Bluebook's math layout. */
html:root body.bb-mode .bb-question-area{width:min(760px,calc(100vw - 48px))!important}
/* A fixed readable size; long questions scroll (as in Bluebook) instead of shrinking. */
html:root body.bb-mode .bb-stage{font-size:18px!important;line-height:1.55}
@media (max-width:560px){html:root body.bb-mode .bb-stage{font-size:17px!important}}
html:root body.bb-mode .bb-stage p,html:root body.bb-mode .bb-stage .question-paragraph{line-height:1.55!important}

/* ---------- Question bar. */
html:root body.bb-mode .bb-question-bar{height:44px!important;margin-bottom:22px!important}
html:root body.bb-mode .bb-question-bar>strong{height:40px!important;min-width:44px!important;padding:0 10px;font-size:20px!important;font-weight:700!important;border-radius:4px!important}
html:root body.bb-mode .bb-question-bar button{font-size:15px!important;font-weight:500!important;padding:6px 16px!important}
html:root body.bb-mode .bb-question-bar .bb-eliminate-toggle{border-width:1px!important;border-radius:6px!important;padding:5px 6px!important;font-size:12px!important;font-weight:700!important}

/* ---------- Answer choices. */
html:root body.bb-mode .bb-stage .options{gap:12px!important;margin-top:18px!important}
html:root body.bb-mode .bb-stage .options button{min-height:56px!important;padding:10px 16px!important;gap:16px!important;border-width:1px!important;border-radius:var(--card-r)!important;font-size:1em!important;line-height:1.4!important;transition:border-color .12s,box-shadow .12s,background-color .12s}
html:root body.bb-mode .bb-stage .options button>b{width:30px!important;height:30px!important;border-width:1.5px!important;font-size:15px!important;font-weight:600!important}
html:root body.bb-mode .bb-stage .options button[aria-checked=true]{box-shadow:0 0 0 1px currentColor inset!important}
html:root body.bb-mode .bb-stage .numeric-response input{min-height:48px!important;border-width:1px!important;border-radius:8px!important;font-size:22px!important;padding:6px 12px!important}

/* ---------- Buttons: two sizes, one shape, readable text. */
html:root body.bb-mode .bb-footer-right>button{width:auto!important;height:var(--btn-h)!important;min-height:var(--btn-h)!important;min-width:96px!important;padding:0 22px!important;border-radius:var(--btn-r)!important;font-size:15px!important;font-weight:600!important;letter-spacing:0!important;line-height:1!important}
html:root body.bb-mode .bb-question-menu{height:var(--btn-h)!important;min-height:var(--btn-h)!important;padding:0 18px!important;border-radius:var(--btn-r)!important;font-size:15px!important;font-weight:600!important}
html:root body.bb-mode .bb-footer-left button{height:var(--btn-h-sm)!important;min-height:var(--btn-h-sm)!important;padding:0 16px!important;border-width:1px!important;border-radius:var(--btn-r)!important;font-size:14px!important;font-weight:500!important;line-height:1!important;box-shadow:none!important}
html:root body.bb-mode .bb-top>nav>button{font-size:12.5px!important;font-weight:500!important;gap:4px}
html:root body.bb-mode .bb-title strong{font-size:20px!important;font-weight:700!important;letter-spacing:-.01em}
html:root body.bb-mode .bb-title>button{font-size:14px!important;font-weight:500!important}
html:root body.bb-mode .bb-timer output{font-family:var(--ui)!important;font-size:24px!important;font-weight:700!important;font-variant-numeric:tabular-nums;letter-spacing:0!important}
html:root body.bb-mode .bb-footer button:focus-visible,html:root body.bb-mode .bb-top button:focus-visible,html:root body.bb-mode .bb-stage .options button:focus-visible{outline:2px solid var(--blue)!important;outline-offset:2px!important}
@media (max-width:1250px){html:root body.bb-mode .bb-footer-left button{padding:0 12px!important;font-size:13px!important}}
/* Phones and narrow tablets: two rows that always fit on screen. The previous wrapped footer
   pushed Check/Back/Next below the bottom edge. */
@media (max-width:900px){
 html:root body.bb-mode{--bb-footer:104px}
 html:root body.bb-mode .bb-footer{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:center;row-gap:8px!important;column-gap:8px!important;height:var(--bb-footer)!important;padding:8px 12px max(8px,env(safe-area-inset-bottom))!important;flex-wrap:nowrap!important}
 html:root body.bb-mode .bb-footer-left{grid-column:1/-1;grid-row:1;max-width:none!important;min-width:0;overflow-x:auto;scrollbar-width:none}
 html:root body.bb-mode .bb-footer-left .always-answer-actions{flex-wrap:nowrap!important}
 html:root body.bb-mode .bb-footer-left button{height:32px!important;min-height:32px!important;font-size:12.5px!important;padding:0 11px!important;flex:none}
 html:root body.bb-mode .bb-question-menu{grid-column:1;grid-row:2;justify-self:start;max-width:100%;min-width:0!important;height:38px!important;min-height:38px!important;padding:0 12px!important;font-size:13px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;order:0!important}
 html:root body.bb-mode .bb-footer-right{grid-column:2;grid-row:2;gap:6px!important;order:0!important}
 html:root body.bb-mode .bb-footer-right>button{flex:none!important;height:38px!important;min-height:38px!important;min-width:0!important;padding:0 13px!important;margin:0!important;font-size:14px!important}
}

/* ---------- Light mode: neutral Bluebook-style colors instead of navy. */
body.bb-mode:not(.bb-dark){color:var(--ink)}
body.bb-mode:not(.bb-dark) .bb-top,body.bb-mode:not(.bb-dark) .bb-top>nav>button,body.bb-mode:not(.bb-dark) .bb-title strong,body.bb-mode:not(.bb-dark) .bb-title>button,body.bb-mode:not(.bb-dark) .bb-timer output{color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-question-area{color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-question-bar>strong{background:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-question-bar button{color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-question-bar .bb-eliminate-toggle{border-color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .question-content-scroll,body.bb-mode:not(.bb-dark) .bb-stage p,body.bb-mode:not(.bb-dark) .bb-stage .question-paragraph{color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button{border-color:#5b6069!important;color:var(--ink)!important;background:#FCFDFE!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button:hover{border-color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button>b{border-color:var(--ink)!important;color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button[aria-checked=true]{border-color:var(--blue)!important;color:var(--blue)!important;background:var(--blue-soft)!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button[aria-checked=true]>b{background:var(--blue)!important;border-color:var(--blue)!important;color:#fff!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button[aria-checked=true]{color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .numeric-response input{border-color:#5b6069!important;color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-stage .numeric-response input:focus{border-color:var(--blue)!important;outline:none;box-shadow:0 0 0 1px var(--blue)}
body.bb-mode:not(.bb-dark) .bb-question-menu{background:var(--ink)!important;color:#fff!important;border:0!important}
body.bb-mode:not(.bb-dark) .bb-footer-right>button{background:var(--blue)!important;color:#fff!important;border:0!important}
body.bb-mode:not(.bb-dark) .bb-footer-right>button:hover:not(:disabled){background:var(--blue-hover)!important}
body.bb-mode:not(.bb-dark) .bb-footer-right>button:disabled{background:var(--off-bg)!important;color:var(--off-fg)!important;cursor:not-allowed}
body.bb-mode:not(.bb-dark) .bb-footer-left button{background:#fff!important;color:var(--ink)!important;border-color:#9aa0aa!important}
body.bb-mode:not(.bb-dark) .bb-footer-left button:hover{border-color:var(--ink)!important}
body.bb-mode:not(.bb-dark) .bb-footer{color:var(--ink)!important}

/* ---------- Dark mode: keep the stars and palette; clearer disabled state and launchers. */
body.bb-mode.bb-dark .bb-footer-right>button:disabled{background:#ffffff1a!important;color:#ffffff73!important;border-color:transparent!important;cursor:not-allowed}
body.bb-mode.bb-dark .bb-footer-left button{border-color:#ffffff59!important}
body.bb-mode.bb-dark .bb-footer-left button:hover{border-color:#ffffffb3!important}

/* ================= Premium layer (owner request 2026-11-13) ================= */

/* ---------- 1. Depth (light): off-white page, white question card, frosted header/footer. */
body.bb-mode:not(.bb-dark){background:#F2F4F8!important}
body.bb-mode:not(.bb-dark) .bb-top{background:rgba(252,253,254,.88)!important;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);box-shadow:0 1px 0 #E1E5EC!important}
body.bb-mode:not(.bb-dark) .bb-footer{background:rgba(252,253,254,.9)!important;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);box-shadow:0 -1px 0 #E1E5EC!important}
body.bb-mode:not(.bb-dark) .bb-footer:before{display:none!important}
html:root body.bb-mode:not(.bb-dark) .bb-question-area{background:#FCFDFE!important;border:1px solid #E7EAF0!important;border-radius:16px!important;box-shadow:0 1px 2px rgba(16,24,40,.04),0 10px 30px rgba(16,24,40,.06)!important;padding:22px 28px 0!important;box-sizing:border-box!important}
html:root body.bb-mode:not(.bb-dark) .bb-question-bar{background:#EEF1F6!important;border-radius:10px!important;padding-right:6px}
html:root body.bb-mode:not(.bb-dark) .bb-question-bar:after{display:none!important}
html:root body.bb-mode:not(.bb-dark) .v2-spr>.v2-spr-directions{border-right:1px solid #e3e6eb!important;padding-left:0}
@media (max-width:900px){html:root body.bb-mode:not(.bb-dark) .bb-question-area{padding:14px 14px 0!important;border-radius:12px!important}}

/* ---------- 3. Interactions (both themes). */
html:root body.bb-mode .bb-stage .options button{transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease,transform .15s ease!important}
html:root body.bb-mode .bb-stage .options button:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(16,24,40,.08)!important}
html:root body.bb-mode .bb-stage .options button:not(:disabled):active{transform:translateY(0) scale(.995)}
html:root body.bb-mode .bb-stage .options button>b{transition:background-color .15s ease,color .15s ease,border-color .15s ease}
html:root body.bb-mode .bb-footer button,html:root body.bb-mode .bb-top button,html:root body.bb-mode .workspace-panel button{transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .1s ease,box-shadow .15s ease}
html:root body.bb-mode .bb-footer button:not(:disabled):active,html:root body.bb-mode .bb-top button:active,html:root body.bb-mode .workspace-panel button:not(:disabled):active{transform:scale(.97)}
html:root body.bb-mode .bb-stage{animation:v2-question-in .24s ease-out}
@keyframes v2-question-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
body.bb-mode:not(.bb-dark) .bb-top>nav>button:hover,body.bb-mode:not(.bb-dark) .bb-title>button:hover{color:var(--blue)!important}

/* ---------- 4. Segmented explanation control. */
html:root body.bb-mode .bb-footer-left .always-answer-actions{display:inline-flex!important;align-items:center!important;gap:2px!important;padding:3px!important;border:1px solid var(--seg-line,#c9ced6);border-radius:999px;background:var(--seg-bg,#fff)}
html:root body.bb-mode .bb-footer-left .always-answer-actions>button{height:30px!important;min-height:30px!important;border:0!important;border-radius:999px!important;background:transparent!important;padding:0 14px!important;font-size:13.5px!important;font-weight:500!important}
html:root body.bb-mode .bb-footer-left .always-answer-actions>button:hover{background:var(--seg-hover,#eef0f4)!important}
html:root body.bb-mode .bb-footer-left .always-answer-actions>button+button:not([data-always="clear"]){position:relative}
html:root body.bb-mode .bb-footer-left .always-answer-actions>button+button:not([data-always="clear"])::before{content:'';position:absolute;left:-1px;top:8px;bottom:8px;width:1px;background:var(--seg-line,#c9ced6)}
html:root body.bb-mode .bb-footer-left .always-answer-actions>button:hover::before,html:root body.bb-mode .bb-footer-left .always-answer-actions>button:hover+button::before{opacity:0}
html:root body.bb-mode .bb-footer-left .always-answer-actions>[data-always="clear"]{margin-left:6px!important;color:var(--seg-muted,#5b616b)!important}
html:root body.bb-mode .bb-footer-left .always-answer-actions>.video-coming-soon{display:none!important}
body.bb-mode.bb-dark{--seg-line:rgba(255,255,255,.28);--seg-bg:rgba(255,255,255,.04);--seg-hover:rgba(255,255,255,.1);--seg-muted:rgba(255,255,255,.6)}
@media (max-width:900px){html:root body.bb-mode .bb-footer-left .always-answer-actions>button{height:28px!important;min-height:28px!important;font-size:12.5px!important;padding:0 11px!important}}

/* ---------- 5. Right/wrong feedback: an inline banner, and the chosen answer turns green or red.
   A wrong attempt never reveals the right answer, so Try Again stays meaningful. */
html:root body.bb-mode .bb-stage .practice-feedback:not([hidden]){position:static!important;display:grid!important;grid-template-columns:auto 1fr;align-items:center;column-gap:10px;row-gap:2px;width:auto!important;max-width:none!important;margin:16px 0 4px!important;padding:12px 16px!important;border:1px solid!important;border-left-width:4px!important;border-radius:12px!important;box-shadow:none!important;font-family:var(--ui)!important;font-size:15px!important;animation:v2-question-in .2s ease-out}
html:root body.bb-mode .bb-stage .practice-feedback>b{grid-row:1/3;font-size:15px!important;font-weight:700!important;white-space:nowrap}
html:root body.bb-mode .bb-stage .practice-feedback>p{display:block!important;margin:0!important;font-family:var(--ui)!important;font-size:14px!important;line-height:1.4!important}
html:root body.bb-mode .bb-stage .practice-feedback .practice-feedback-actions{grid-column:1/-1;display:flex!important;gap:8px;margin-top:8px}
html:root body.bb-mode .bb-stage .practice-feedback .practice-feedback-actions>:not(.primary){display:none!important}
html:root body.bb-mode .bb-stage .practice-feedback.correct .practice-feedback-actions{display:none!important}
html:root body.bb-mode .bb-stage .practice-feedback .practice-feedback-actions .primary{height:34px;padding:0 16px;border-radius:999px;border:0;font:600 14px var(--ui);cursor:pointer}
body.bb-mode:not(.bb-dark) .bb-stage .practice-feedback.correct{background:#ecfbf1!important;border-color:#b7e6c6!important;border-left-color:#1f9d55!important;color:#14532d!important}
body.bb-mode:not(.bb-dark) .bb-stage .practice-feedback.incorrect{background:#fef2f2!important;border-color:#f5c2c2!important;border-left-color:#d93636!important;color:#7f1d1d!important}
body.bb-mode:not(.bb-dark) .bb-stage .practice-feedback .practice-feedback-actions .primary{background:var(--ink);color:#fff}
body.bb-mode.bb-dark .bb-stage .practice-feedback.correct{background:rgba(52,199,120,.12)!important;border-color:rgba(52,199,120,.35)!important;border-left-color:#34c778!important;color:#d9fbe6!important}
body.bb-mode.bb-dark .bb-stage .practice-feedback.incorrect{background:rgba(240,82,82,.12)!important;border-color:rgba(240,82,82,.35)!important;border-left-color:#f05252!important;color:#ffe1e1!important}
body.bb-mode.bb-dark .bb-stage .practice-feedback .practice-feedback-actions .primary{background:#fff;color:#0b0f17}
body.bb-mode:not(.bb-dark) .bb-stage .options button.selected.correct{border-color:#1f9d55!important;background:#ecfbf1!important;box-shadow:0 0 0 1px #1f9d55 inset!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button.selected.correct>b{background:#1f9d55!important;border-color:#1f9d55!important;color:#fff!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button.selected.incorrect{border-color:#d93636!important;background:#fef2f2!important;box-shadow:0 0 0 1px #d93636 inset!important}
body.bb-mode:not(.bb-dark) .bb-stage .options button.selected.incorrect>b{background:#d93636!important;border-color:#d93636!important;color:#fff!important}
body.bb-mode.bb-dark .bb-stage .options button.selected.correct{border-color:#34c778!important;box-shadow:0 0 0 1px #34c778 inset!important}
body.bb-mode.bb-dark .bb-stage .options button.selected.incorrect{border-color:#f05252!important;box-shadow:0 0 0 1px #f05252 inset!important}
html:root body.bb-mode .bb-stage .options button:disabled{cursor:default}
html:root body.bb-mode .bb-stage .options button:disabled:not(.selected){opacity:.7}

/* ---------- 6–7. Spacing and quieter details. */
html:root body.bb-mode .bb-question-bar{margin-bottom:28px!important}
html:root body.bb-mode .bb-stage p,html:root body.bb-mode .bb-stage .question-paragraph{margin-bottom:18px!important}
html:root body.bb-mode .bb-stage .adapted-question-notice{display:inline-block!important;margin:0 0 14px!important;padding:3px 10px!important;border-radius:999px!important;font:500 12px/1.5 var(--ui)!important;opacity:1!important}
body.bb-mode:not(.bb-dark) .bb-stage .adapted-question-notice{background:#f1f3f6!important;color:#5b616b!important}
body.bb-mode.bb-dark .bb-stage .adapted-question-notice{background:rgba(255,255,255,.08)!important;color:rgba(255,255,255,.7)!important}
html:root body.bb-mode .bb-title strong{font-weight:600!important}
html:root body.bb-mode .bb-timer button{height:24px;padding:0 12px!important;border-radius:999px!important;font-size:12px!important;font-weight:500!important}

/* ---------- 2. Icons: panel controls use SVG icons (site-polish.js) instead of text symbols. */
.v2-icon{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
.workspace-panel [data-panel-action] .v2-icon-restore{display:none}
/* Tool switcher: it was an empty square (hidden text, no icon); give it a "switch tool" icon. */
html:root body.bb-mode .workspace-panel .workspace-panel-actions select{background-repeat:no-repeat!important;background-position:center!important;background-size:16px 16px!important;width:32px!important}
html:root body.bb-mode.bb-dark .workspace-panel .workspace-panel-actions select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eef0f4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4 3 8l4 4M3 8h14M17 20l4-4-4-4M21 16H7'/%3E%3C/svg%3E")!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .workspace-panel-actions select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1d21' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4 3 8l4 4M3 8h14M17 20l4-4-4-4M21 16H7'/%3E%3C/svg%3E")!important}
.workspace-panel[data-mode="fullscreen"] [data-panel-action="fullscreen"] .v2-icon-max{display:none}
.workspace-panel[data-mode="fullscreen"] [data-panel-action="fullscreen"] .v2-icon-restore{display:block}

/* ---------- Explanation panel: one accent per theme, one label style, one card per step.
   Dark keeps the glass panel; light mode gets a light panel so the page doesn't flip to black. */
body.bb-mode{--p-text:#eef0f4;--p-muted:#aab2bf;--p-line:rgba(255,255,255,.13);--p-card:rgba(255,255,255,.045);--p-accent:#8ab4ff;--p-accent-soft:rgba(138,180,255,.18);--p-primary-bg:#fff;--p-primary-fg:#0b0f17;--v2-focus:#8ab4ff;--v2-focus-bg:rgba(138,180,255,.22)}
body.bb-mode:not(.bb-dark){--p-text:#1b1d21;--p-muted:#5b616b;--p-line:#E1E5EC;--p-card:#F2F4F8;--p-accent:#324dc7;--p-accent-soft:#e8ecfc;--p-primary-bg:#324dc7;--p-primary-fg:#fff;--v2-focus:#324dc7;--v2-focus-bg:#324dc71a}
/* Light panel surfaces */
html:root body.bb-mode:not(.bb-dark) .workspace-panel{color-scheme:light;background:#FCFDFE!important;background-image:none!important;border:1px solid #d5d9e0!important;color:var(--p-text)!important;box-shadow:0 18px 50px rgba(20,24,33,.18)!important;backdrop-filter:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel-header{background:#F2F4F8!important;background-image:none!important;border-bottom:1px solid var(--p-line)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel-header h2{color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel-actions button{background:#fff!important;background-image:none!important;border:1px solid var(--p-line)!important;color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel-actions button[aria-pressed="true"]{border-color:var(--p-accent)!important;color:var(--p-accent)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player,html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player .player-header,html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player .player-body{background:transparent!important;background-image:none!important;color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player .player-header{border-bottom:1px solid var(--p-line)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player .player-header h3{color:var(--p-text)!important}
/* Light panel text: older dark-only rules set light text on many elements with high specificity.
   :not(#_) lifts these rules above them; muted and accent colors are reapplied the same way. */
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :where(p,span,small,li,strong,b,em,i,code,td,th,h3,h4,summary,label,div,aside,section,mark,button):not(.dcg-container *){color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :is(.desmos-question-clue small,.desmos-full-entry>span,.desmos-current-copy>span,.v2-question>summary,.v2-question>summary *,.desmos-step-heading button,.desmos-controls>span,.desmos-entry-hint,.v2-copy,.player-tabs button:not(.active),.v2-mode-toggle button:not([aria-pressed="true"]),.adapted-question-notice,.desmos-step-nav button:not(.active):not(.complete)){color:var(--p-muted)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :is(.player-tabs button.active,.v2-mode-toggle button[aria-pressed="true"],.v2-try-check,.v2-finish-primary,.desmos-step-nav button.active,.v2-footer .desmos-controls>button:last-child:not(:disabled)){color:#fff!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :is(.desmos-step-nav button.complete,.v2-result){color:var(--p-accent)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .v2-try-feedback:not(:empty){color:#9a4a00!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .v2-try-done{color:#1d7a3a!important}
/* Light panel surfaces: clear the older dark-theme gradients (equation boxes, cards, hand-solution
   steps) so dark text never sits on a dark box. Desmos, figures, math and the alternate-method glow keep theirs. */
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :where(div,p,section,aside,article,li,ol,ul,span,details,summary,figure,table,td,th,code,pre,header,footer,nav,button):not(.dcg-container):not(.dcg-container *):not(.alternate-method-discovery):not(.alternate-method-discovery *):not(svg *):not(math *):not(.v2-result):not(mark){background-image:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) :where(.dataset,.question-equation,.math-container,.math-display,.formal-compact,.solution-steps>li,.remember,.deep-dive,.takeaway-patterns>span,.hand-step,.hand-card){background-color:var(--p-card)!important;border-color:var(--p-line)!important;color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-question-body .dataset{border-radius:10px;padding:10px 12px!important;text-align:center}
html:root body.bb-mode:not(.bb-dark) .workspace-panel select{background-color:#fff!important;color:var(--p-text)!important;border:1px solid var(--p-line)!important;color-scheme:light}
/* Shared panel pieces (both themes) */
html:root body.bb-mode .workspace-panel .v2-player .player-tabs{background:var(--p-card)!important;border:1px solid var(--p-line)!important}
html:root body.bb-mode .workspace-panel .v2-player .player-tabs button{background:transparent!important;background-image:none!important;border:0!important;color:var(--p-muted)!important;font-weight:600!important;box-shadow:none!important}
html:root body.bb-mode .workspace-panel .v2-player .player-tabs button.active{background:var(--p-primary-bg)!important;color:var(--p-primary-fg)!important}
html:root body.bb-mode .workspace-panel .v2-player .view-question{background:transparent!important;background-image:none!important;border:1px solid var(--p-line)!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-player .mode-intro[data-v2]{background:var(--p-card)!important;border:1px solid var(--p-line)!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-player .mode-intro[data-v2] strong,html:root body.bb-mode .workspace-panel .v2-player .mode-intro[data-v2] p{color:var(--p-text)!important;opacity:1!important}
html:root body.bb-mode .workspace-panel .v2-question>summary{display:flex!important;justify-content:space-between!important;align-items:center!important}
/* Narrow panels: the side column scrolls as one piece so nothing overlaps on short screens. */
@container workspace (max-width:899px){
 html:root body.bb-mode .workspace-panel .v2-side{overflow-y:auto!important;overscroll-behavior:contain}
 html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy{flex:none!important;overflow:visible!important;max-height:none!important}
 html:root body.bb-mode .workspace-panel .v2-question{flex:none!important;max-height:none!important}
 html:root body.bb-mode .workspace-panel .v2-player .desmos-player-grid{grid-template-rows:minmax(170px,46%) minmax(0,1fr)!important}
}
/* The step card */
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy{background:var(--p-card)!important;background-image:none!important;border:1px solid var(--p-line)!important;border-radius:14px!important;box-shadow:none!important;outline:none!important;padding:16px 18px!important;color:var(--p-text)!important;font-family:var(--ui)!important;animation:none!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy>*{margin-left:0!important;margin-right:0!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;margin:0 0 12px!important;padding:0!important;border:0!important;background:none!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-heading b{font-size:17px!important;font-weight:700!important;line-height:1.3!important;text-transform:none!important;letter-spacing:-.005em!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-heading button{flex:none;height:30px!important;padding:0 12px!important;border:1px solid var(--p-line)!important;border-radius:999px!important;background:transparent!important;background-image:none!important;color:var(--p-muted)!important;font-size:12.5px!important;font-weight:500!important;box-shadow:none!important}
/* One label style */
html:root body.bb-mode .workspace-panel .v2-player .desmos-question-clue small,html:root body.bb-mode .workspace-panel .v2-player .desmos-full-entry>span,html:root body.bb-mode .workspace-panel .v2-player .desmos-current-copy>span,html:root body.bb-mode .workspace-panel .v2-question>summary,html:root body.bb-mode .workspace-panel .v2-player .desmos-notation-title{display:block;font-family:var(--ui)!important;font-size:12px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;color:var(--p-muted)!important;opacity:1!important;margin:0 0 4px!important}
/* Sections inside the card: no nested boxes */
html:root body.bb-mode .workspace-panel .v2-player .desmos-question-clue,html:root body.bb-mode .workspace-panel .v2-player .desmos-full-entry,html:root body.bb-mode .workspace-panel .v2-player .desmos-current-copy,html:root body.bb-mode .workspace-panel .v2-player .desmos-notation{background:none!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0 0 14px!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-question-clue{padding-left:10px!important;border-left:3px solid var(--p-accent)!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-question-clue p{margin:0!important;font-size:15px!important}
html:root body.bb-mode .workspace-panel mark,html:root body.bb-mode .workspace-panel .v2-player mark{background:var(--p-accent-soft)!important;color:inherit!important;border-radius:3px;padding:0 2px}
html:root body.bb-mode .workspace-panel .v2-player .desmos-current-copy p,html:root body.bb-mode .workspace-panel .v2-player [data-detail]{font-size:15.5px!important;line-height:1.6!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-current-copy .why-line{border-top:1px solid var(--p-line)!important;padding-top:10px!important;margin-top:10px!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-current-copy strong{color:var(--p-text)!important}
/* Entry: typeset math in a single chip; the plain text stays as a fallback */
html:root body.bb-mode .workspace-panel .v2-player .desmos-full-entry code{display:inline-block;margin-top:2px;padding:6px 10px!important;border-radius:8px!important;background:var(--p-accent-soft)!important;color:var(--p-text)!important;font-size:14px!important}
html:root body.bb-mode .workspace-panel .v2-player .desmos-full-entry.v2-has-math code{display:none!important}
.v2-entry-math{display:inline-block;max-width:100%;overflow-x:auto;margin-top:2px;padding:8px 12px;border-radius:8px;background:var(--p-accent-soft);color:var(--p-text);font-size:21px;line-height:1.2}
.v2-entry-math math{font-family:var(--math)!important}
.v2-trying .v2-entry-math{filter:blur(6px);user-select:none}
.v2-trying.v2-hint-2 .v2-entry-math{filter:none;user-select:auto}
html:root body.bb-mode .workspace-panel .v2-copy{border-color:var(--p-line)!important;color:var(--p-muted)!important;font-family:var(--ui)!important}
html:root body.bb-mode .workspace-panel .desmos-entry-hint{color:var(--p-muted)!important;font-size:12.5px!important}
/* Question box, mode toggle, try/finish boxes, result chip, controls */
html:root body.bb-mode .workspace-panel .v2-question{background:var(--p-card)!important;border:1px solid var(--p-line)!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-question>summary{background:transparent!important;padding:9px 0!important}
html:root body.bb-mode .workspace-panel .v2-question-body{color:var(--p-text)!important;font-size:16px!important}
html:root body.bb-mode .workspace-panel .v2-question-body:not(#_) :where(p,span,.question-paragraph){font-weight:400!important}
html:root body.bb-mode .workspace-panel .v2-question-body .adapted-question-notice{font-family:var(--ui)!important;font-size:12px!important;font-weight:500!important;color:var(--p-muted)!important}
html:root body.bb-mode .workspace-panel .v2-mode-toggle{background:var(--p-card)!important;border:1px solid var(--p-line)}
html:root body.bb-mode .workspace-panel .v2-mode-toggle button{color:var(--p-muted)!important;opacity:1!important;font-family:var(--ui)!important;font-weight:600!important}
html:root body.bb-mode .workspace-panel .v2-mode-toggle button[aria-pressed="true"]{background:var(--p-primary-bg)!important;color:var(--p-primary-fg)!important}
html:root body.bb-mode .workspace-panel .v2-try,html:root body.bb-mode .workspace-panel .v2-finish{background:var(--p-accent-soft)!important;border:1px solid var(--p-accent)!important;color:var(--p-text)!important}
html:root body.bb-mode .workspace-panel .v2-try-actions button,html:root body.bb-mode .workspace-panel .v2-finish-actions button{border-color:var(--p-line)!important;color:var(--p-text)!important;background:transparent!important}
html:root body.bb-mode .workspace-panel .v2-try-actions .v2-try-check,html:root body.bb-mode .workspace-panel .v2-finish-actions .v2-finish-primary{background:var(--p-primary-bg)!important;border-color:var(--p-primary-bg)!important;color:var(--p-primary-fg)!important}
html:root body.bb-mode .workspace-panel .v2-result{background:var(--p-primary-fg)!important;color:var(--p-accent)!important;border-color:var(--p-accent)!important;font-family:var(--ui)!important}
body.bb-mode:not(.bb-dark) .workspace-panel .v2-result{background:#fff!important}
html:root body.bb-mode .workspace-panel .v2-footer{border-top-color:var(--p-line)!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-controls>button{height:40px!important;min-height:40px!important;background:transparent!important;background-image:none!important;border:1px solid var(--p-line)!important;color:var(--p-text)!important;font-size:14px!important;font-weight:600!important;box-shadow:none!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-controls>button:last-child:not(:disabled){background:var(--p-primary-bg)!important;border-color:var(--p-primary-bg)!important;color:var(--p-primary-fg)!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-controls>button:disabled{opacity:.45!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-controls>span{color:var(--p-muted)!important;opacity:1!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav button{background:transparent!important;background-image:none!important;border:1px solid var(--p-line)!important;color:var(--p-muted)!important;box-shadow:none!important;font-family:var(--ui)!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav button.complete{border-color:var(--p-accent)!important;color:var(--p-accent)!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav button.active{background:var(--p-accent)!important;border-color:var(--p-accent)!important;color:var(--p-primary-fg)!important}
body.bb-mode.bb-dark .workspace-panel .v2-footer .desmos-step-nav button.active{color:#0b0f17!important}
body.bb-mode:not(.bb-dark) .workspace-panel .v2-footer .desmos-step-nav button.active{color:#fff!important}

/* ---------- Student-produced response: Bluebook's split screen with directions on the left. */
html:root body.bb-mode .bb-question-area.v2-spr{width:min(1180px,calc(100vw - 48px))!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:0}
.v2-spr>.v2-spr-directions{grid-column:1;grid-row:1/3;overflow:auto;padding:4px 32px 24px 4px;border-right:3px solid #d5d9e0;font-size:15px;line-height:1.55;color:inherit}
.v2-spr>.bb-question-bar,.v2-spr>.bb-fit-viewport{grid-column:2;margin-left:32px}
.v2-spr>.bb-question-bar{grid-row:1}.v2-spr>.bb-fit-viewport{grid-row:2;min-height:0}
.v2-spr-directions h3{margin:0 0 10px;font-size:17px;font-weight:700}
.v2-spr-directions ul{margin:0 0 16px;padding-left:20px}.v2-spr-directions li{margin:0 0 6px}
.v2-spr-directions table{width:100%;border-collapse:collapse;font-size:14px}
.v2-spr-directions th,.v2-spr-directions td{border:1px solid #c4c9d1;padding:7px 9px;text-align:left;vertical-align:top}
.v2-spr-directions th{font-weight:600}
.v2-spr-directions td:first-child{font-family:var(--serif);font-size:16px;white-space:nowrap}
body.bb-dark .v2-spr>.v2-spr-directions{border-right-color:#ffffff26}
body.bb-dark .v2-spr-directions th,body.bb-dark .v2-spr-directions td{border-color:#ffffff33}
/* The minimized-tool pill sits above the footer instead of over Back/Next. */
html:root body.bb-mode .workspace-restore{bottom:calc(var(--bb-footer,64px) + 12px)!important;top:auto!important}
/* Docked calculator: it takes the directions' place (as in Bluebook) and the question column
   fits the remaining width instead of being pushed off-screen. */
html:root body.bb-mode.workspace-docked .bb-question-area,html:root body.bb-mode.workspace-docked .bb-question-area.v2-spr{width:min(760px,calc(100vw - var(--workspace-dock-width,50vw) - 48px))!important}
html:root body.bb-mode.workspace-docked .bb-question-area.v2-spr{display:flex!important}
html:root body.bb-mode.workspace-docked .v2-spr>.v2-spr-directions{display:none!important}
html:root body.bb-mode.workspace-docked .v2-spr>.bb-question-bar,html:root body.bb-mode.workspace-docked .v2-spr>.bb-fit-viewport{margin-left:0!important}
@media (max-width:900px){
 html:root body.bb-mode .bb-question-area.v2-spr{display:flex!important;width:calc(100vw - 40px)!important}
 .v2-spr>.v2-spr-directions{display:none}
 .v2-spr>.bb-question-bar,.v2-spr>.bb-fit-viewport{margin-left:0}
}

/* Respect reduced-motion preferences for the premium-layer animations. */
@media (prefers-reduced-motion:reduce){html:root body.bb-mode .bb-stage,html:root body.bb-mode .bb-stage .practice-feedback{animation:none!important}html:root body.bb-mode .bb-stage .options button,html:root body.bb-mode .bb-footer button,html:root body.bb-mode .bb-top button,html:root body.bb-mode .workspace-panel button{transition:none!important;transform:none!important}}

/* Light mode drops the marble swirl everywhere (owner picked the flat cool-paper white). */
html[data-theme="light"] .study-glass-motion,body.bb-mode:not(.bb-dark) .study-glass-motion{display:none!important}

/* ================= Compact explanation chrome (owner report 2026-11-13: congested on short
   windows, black scrollbars, unreadable alternate-method menu) ================= */

/* One slim title row: lesson title | Show me / Let me try | tabs. "View question" is redundant
   with the question box beside the step, so it is hidden. */
html:root body.bb-mode .workspace-panel .workspace-panel-header{min-height:44px!important;padding:6px 12px!important}
html:root body.bb-mode .workspace-panel .workspace-panel-header h2{font-size:12px!important;letter-spacing:.1em!important}
html:root body.bb-mode .workspace-panel .v2-player>.player-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:10px!important;padding:6px 12px!important;min-height:0!important;box-shadow:none!important}
html:root body.bb-mode .workspace-panel .v2-player>.player-header .view-question{display:none!important}
html:root body.bb-mode .workspace-panel .v2-player>.player-header>div{display:block!important;min-width:0}
html:root body.bb-mode .workspace-panel .v2-player>.player-header h3{font-size:15px!important;font-weight:600!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block!important}
html:root body.bb-mode .workspace-panel .v2-player:not([data-mode="desmos"]) .v2-mode-toggle{display:none!important}
html:root body.bb-mode .workspace-panel .v2-player .v2-mode-toggle{align-self:center;padding:3px}
html:root body.bb-mode .workspace-panel .v2-player .v2-mode-toggle button{padding:5px 12px;font-size:12.5px}
html:root body.bb-mode .workspace-panel .v2-player .player-tabs button{padding:6px 12px!important;font-size:12.5px!important}
html:root body.bb-mode .workspace-panel .v2-player .mode-intro[data-v2]{margin:0 0 8px!important;padding:5px 10px!important;min-height:0!important}

/* Side column: the question keeps its own height; the step card takes the rest. */
html:root body.bb-mode .workspace-panel .v2-question{flex:0 0 auto!important;max-height:38%}
html:root body.bb-mode .workspace-panel .v2-question:not([open]){max-height:none}
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-heading button{height:28px!important;padding:0 10px!important;font-size:12px!important}

/* Last step: the footer button itself becomes the next action. */
html:root body.bb-mode .workspace-panel .v2-footer.v2-last .desmos-controls>button:last-child{display:none!important}
html:root body.bb-mode .workspace-panel .v2-footer .v2-answer,html:root body.bb-mode .workspace-panel .v2-footer .v2-similar{order:4;flex:none;height:40px;padding:0 18px;border-radius:999px;font:600 14px var(--ui);cursor:pointer;white-space:nowrap}
html:root body.bb-mode .workspace-panel .v2-footer .v2-answer{background:var(--p-primary-bg);border:1px solid var(--p-primary-bg);color:var(--p-primary-fg)}
html:root body.bb-mode .workspace-panel .v2-footer .v2-similar{order:3;background:transparent;border:1px solid var(--p-line);color:var(--p-text)}
html:root body.bb-mode .workspace-panel .v2-footer [hidden]{display:none!important}

/* Scrollbars follow the panel theme (they were dark tracks in the light panel). */
html:root body.bb-mode:not(.bb-dark) .workspace-panel,html:root body.bb-mode:not(.bb-dark) .workspace-panel *{scrollbar-color:#C3C9D4 transparent!important;scrollbar-width:thin}
html:root body.bb-mode.bb-dark .workspace-panel,html:root body.bb-mode.bb-dark .workspace-panel *{scrollbar-color:rgba(255,255,255,.28) transparent!important;scrollbar-width:thin}
html:root body.bb-mode:not(.bb-dark) .bb-fit-viewport,html:root body.bb-mode:not(.bb-dark) .v2-spr-directions{scrollbar-color:#C3C9D4 transparent;scrollbar-width:thin}

/* Alternate-method menu in the light panel (was a black box with dark text). */
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .table-method-menu{background:#FCFDFE!important;background-image:none!important;border:1px solid var(--p-line)!important;border-radius:12px!important;box-shadow:0 12px 32px rgba(16,24,40,.16)!important;padding:6px!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .table-method-menu button{background:transparent!important;background-image:none!important;border:0!important;border-radius:8px!important;color:var(--p-text)!important;box-shadow:none!important;text-align:left}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .table-method-menu button:hover{background:var(--p-card)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .table-method-menu button[aria-pressed="true"]{background:var(--p-accent-soft)!important;color:var(--p-accent)!important}

/* Narrow panels: switch on the left, tabs on the right, no title. */
@container workspace (max-width:899px){
 html:root body.bb-mode .workspace-panel .v2-player>.player-header{grid-template-columns:auto auto!important;justify-content:space-between!important}
 html:root body.bb-mode .workspace-panel .v2-player>.player-header>div{display:none!important}
 html:root body.bb-mode .workspace-panel .v2-footer .v2-similar{display:none!important}
 html:root body.bb-mode .workspace-panel .v2-footer .v2-answer{padding:0 14px;font-size:13px}
}
/* Short windows (zoomed-in browsers, small laptops): give the height to the calculator and step. */
@media (max-height:640px){
 html:root body.bb-mode .workspace-panel .workspace-panel-header{min-height:36px!important;padding:3px 10px!important}
 html:root body.bb-mode .workspace-panel .workspace-panel-actions button,html:root body.bb-mode .workspace-panel .workspace-panel-actions select{width:28px!important;height:28px!important;min-height:28px!important}
 html:root body.bb-mode .workspace-panel .v2-player>.player-header{padding:4px 10px!important}
 html:root body.bb-mode .workspace-panel .v2-player>.player-body{padding:6px 8px 8px!important}
 html:root body.bb-mode .workspace-panel .v2-player .mode-intro[data-v2]{margin-bottom:6px!important;padding:3px 10px!important;font-size:12.5px}
 html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy{padding:12px 14px!important}
 html:root body.bb-mode .workspace-panel .v2-player .desmos-step-heading b{font-size:15.5px!important}
 html:root body.bb-mode .workspace-panel .v2-footer{padding-top:6px!important;margin-top:6px!important}
 html:root body.bb-mode .workspace-panel .v2-footer .desmos-controls>button,html:root body.bb-mode .workspace-panel .v2-footer .v2-answer,html:root body.bb-mode .workspace-panel .v2-footer .v2-similar{height:36px!important;min-height:36px!important}
 html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav button{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important}
}
html:root body.bb-mode .workspace-panel .v2-player>.player-header>div{grid-column:1!important;grid-row:1!important}
html:root body.bb-mode .workspace-panel .v2-player>.player-header .v2-mode-toggle{grid-column:2!important;grid-row:1!important}
html:root body.bb-mode .workspace-panel .v2-player>.player-header .player-tabs{grid-column:3!important;grid-row:1!important;justify-self:end;margin:0!important;flex-wrap:nowrap!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .v2-player:not(#_) .v2-footer .v2-answer{color:#fff!important}
html:root body.bb-mode.bb-dark .workspace-panel .v2-footer .v2-answer{color:#0b0f17!important}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav{scrollbar-width:none!important;justify-content:flex-start}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav::-webkit-scrollbar{display:none}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav>button:first-child{margin-left:auto}
html:root body.bb-mode .workspace-panel .v2-footer .desmos-step-nav>button:last-child{margin-right:auto}
@container workspace (max-width:899px){
 html:root body.bb-mode .workspace-panel .v2-player>.player-header .v2-mode-toggle{grid-column:1!important}
 html:root body.bb-mode .workspace-panel .v2-player>.player-header .player-tabs{grid-column:2!important}
}

/* ================= Fit and comfort on standard laptop heights (student test run 2026-11-13) =====
   The question text may scale down a little (never below 86%) when that lets the whole question
   fit without scrolling; beyond that it scrolls. Choices and spacing are a bit more compact. */
html:root body.bb-mode .bb-stage{font-size:calc(18px * clamp(.86, var(--bb-question-scale,1), 1))!important}
html:root body.bb-mode .bb-stage .options{gap:9px!important;margin-top:14px!important}
html:root body.bb-mode .bb-stage .options button{min-height:48px!important;padding:8px 14px!important}
html:root body.bb-mode .bb-question-bar{margin-bottom:18px!important}
html:root body.bb-mode .bb-stage .question-data-table th,html:root body.bb-mode .bb-stage .question-data-table td{padding:5px 14px!important}
html:root body.bb-mode .bb-stage p,html:root body.bb-mode .bb-stage .question-paragraph{margin-bottom:14px!important}
html:root body.bb-mode .bb-stage .practice-feedback:not([hidden]){scroll-margin:12px}
html:root body.bb-mode .bb-stage .practice-feedback .practice-feedback-actions .primary{display:inline-flex!important;align-items:center;height:34px!important;min-height:34px!important;width:auto!important;padding:0 16px!important;border:0!important;border-radius:999px!important;font:600 14px var(--ui)!important;cursor:pointer;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .bb-stage .practice-feedback .practice-feedback-actions .primary{background:#1b1d21!important;color:#fff!important}
html:root body.bb-mode.bb-dark .bb-stage .practice-feedback .practice-feedback-actions .primary{background:#fff!important;color:#0b0f17!important}
/* Tables and choices inside the explanation's question box: compact, matching the panel. */
html:root body.bb-mode .workspace-panel .v2-question-body table{font-size:15px!important;border-collapse:collapse!important;margin:0 0 8px!important;width:auto!important;background:transparent!important}
html:root body.bb-mode .workspace-panel .v2-question-body th,html:root body.bb-mode .workspace-panel .v2-question-body td{font-size:15px!important;padding:3px 14px!important;border:1px solid var(--p-line)!important;background:transparent!important;color:var(--p-text)!important;text-align:center}
html:root body.bb-mode .workspace-panel .v2-question-body .question-drawer-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px 14px!important;margin-top:8px!important;font-size:14.5px!important}
html:root body.bb-mode .workspace-panel .v2-question-body .question-drawer-options>*{padding:2px 0!important;border:0!important;background:none!important;display:flex;gap:8px;align-items:baseline}

/* ================= Hand Explanation player in the light panel =================
   It kept its dark card, light text and dark buttons on the light panel. Dark mode is unchanged. */
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_),html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) :where(p,span,small,li,strong,b,em,h3,h4,div,section,article,label,td,th){color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) :where(div,p,section,article,header,footer,nav,button,li,span):not(svg *):not(math *){background-image:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-header small,html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-step-label,html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-progress span{color:var(--p-muted)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-header h3{font:700 18px/1.3 var(--ui)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-current{background:var(--p-card)!important;border:1px solid var(--p-line)!important;border-radius:14px!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-current h4{font:700 19px/1.3 var(--ui)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-math{background:#FCFDFE!important;border:1px solid var(--p-line)!important;border-radius:10px!important;box-shadow:none!important;font-family:var(--serif)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-views{background:var(--p-card)!important;border:1px solid var(--p-line)!important;border-radius:999px!important;padding:3px!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-views button{background:transparent!important;border:0!important;border-radius:999px!important;color:var(--p-muted)!important;font:600 12.5px var(--ui)!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-views button[aria-pressed="true"],html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-views button.active,html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-views button[aria-selected="true"]{background:var(--p-primary-bg)!important;color:#fff!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-nav{border-top:1px solid var(--p-line)!important;background:transparent!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-nav>button{height:40px;padding:0 18px!important;border:1px solid var(--p-line)!important;border-radius:999px!important;background:transparent!important;color:var(--p-text)!important;font:600 14px var(--ui)!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-nav>button:last-child:not(:disabled){background:var(--p-primary-bg)!important;border-color:var(--p-primary-bg)!important;color:#fff!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-nav>button:disabled{opacity:.45}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-steps button{background:transparent!important;border:1px solid var(--p-line)!important;border-radius:50%!important;color:var(--p-muted)!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-steps button[aria-current="step"],html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-steps button.active{background:var(--p-accent)!important;border-color:var(--p-accent)!important;color:#fff!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) progress{accent-color:var(--p-accent)}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-original,html:root body.bb-mode:not(.bb-dark) .workspace-panel .hand-v2:not(#_) .hand-v2-foundations{background:var(--p-card)!important;border:1px solid var(--p-line)!important;border-radius:14px!important}

/* ================= Panel open/close motion (owner request 2026-11-13) =================
   The tool panel used to appear instantly. It now eases in according to how it is placed, and
   the close button plays a short matching exit (explanation-v2.js adds .v2-closing). */
@keyframes v2-panel-full{from{opacity:0;transform:scale(.975) translateY(10px)}to{opacity:1;transform:none}}
@keyframes v2-panel-right{from{opacity:0;transform:translateX(36px)}to{opacity:1;transform:none}}
@keyframes v2-panel-left{from{opacity:0;transform:translateX(-36px)}to{opacity:1;transform:none}}
@keyframes v2-panel-sheet{from{opacity:.4;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes v2-panel-float{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
@keyframes v2-content-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
html:root body.bb-mode .workspace-panel:not([hidden]){animation:v2-panel-float .24s cubic-bezier(.2,.8,.2,1) both;transform-origin:50% 40%}
html:root body.bb-mode .workspace-panel[data-mode="fullscreen"]:not([hidden]){animation-name:v2-panel-full;animation-duration:.28s}
html:root body.bb-mode .workspace-panel[data-mode="right"]:not([hidden]){animation-name:v2-panel-right}
html:root body.bb-mode .workspace-panel[data-mode="left"]:not([hidden]){animation-name:v2-panel-left}
html:root body.bb-mode .workspace-panel[data-mode="sheet"]:not([hidden]){animation-name:v2-panel-sheet;animation-duration:.26s}
/* Contents settle in just after the panel: calculator first, then the side column and controls. */
html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .desmos-player-grid>div:first-child{animation:v2-content-in .3s ease-out .06s both}
html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .v2-side{animation:v2-content-in .3s ease-out .12s both}
html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .v2-footer{animation:v2-content-in .3s ease-out .16s both}
/* Exit. */
@keyframes v2-panel-out{from{opacity:1;transform:none}to{opacity:0;transform:scale(.985) translateY(8px)}}
@keyframes v2-panel-out-right{from{opacity:1;transform:none}to{opacity:0;transform:translateX(28px)}}
@keyframes v2-panel-out-left{from{opacity:1;transform:none}to{opacity:0;transform:translateX(-28px)}}
@keyframes v2-panel-out-sheet{from{opacity:1;transform:none}to{opacity:0;transform:translateY(24px)}}
html:root body.bb-mode .workspace-panel.v2-closing:not([hidden]){animation:v2-panel-out .17s ease-in both!important;pointer-events:none}
html:root body.bb-mode .workspace-panel.v2-closing[data-mode="right"]:not([hidden]){animation-name:v2-panel-out-right!important}
html:root body.bb-mode .workspace-panel.v2-closing[data-mode="left"]:not([hidden]){animation-name:v2-panel-out-left!important}
html:root body.bb-mode .workspace-panel.v2-closing[data-mode="sheet"]:not([hidden]){animation-name:v2-panel-out-sheet!important}
/* The question card eases over when a panel docks beside it, instead of jumping. */
html:root body.bb-mode .bb-question-area{transition:left .24s cubic-bezier(.2,.8,.2,1),right .24s cubic-bezier(.2,.8,.2,1),width .24s cubic-bezier(.2,.8,.2,1)}
html:root body.bb-mode.workspace-adjusting .bb-question-area{transition:none}
@media (prefers-reduced-motion:reduce){
 html:root body.bb-mode .workspace-panel:not([hidden]),html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .desmos-player-grid>div:first-child,html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .v2-side,html:root body.bb-mode .workspace-panel:not([hidden]) .v2-player .v2-footer{animation:none!important}
 html:root body.bb-mode .workspace-panel.v2-closing:not([hidden]){animation:none!important}
 html:root body.bb-mode .bb-question-area{transition:none!important}
}

/* ================= Video explanations: fit the panel (feature audit 2026-11-14) =================
   A portrait video was 853px tall in a ~560px panel, so Play and the other controls sat far
   below the fold. The video now scales to the panel's height and the controls stay visible. */
html:root body.bb-mode .workspace-panel .workspace-feature[data-feature="brief"],html:root body.bb-mode .workspace-panel .workspace-feature[data-feature="detailed"]{height:100%!important;min-height:0!important}
html:root body.bb-mode .workspace-panel .video-explanation-panel{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;box-sizing:border-box!important;padding:12px 16px 14px!important;gap:10px;border:0!important;border-radius:0!important;box-shadow:none!important}
html:root body.bb-mode .workspace-panel .video-explanation-head{flex:0 0 auto!important;height:auto!important;display:block!important}
html:root body.bb-mode .workspace-panel .video-explanation-head small{display:none!important}
html:root body.bb-mode .workspace-panel .video-explanation-head h3{margin:0!important;font:700 17px/1.3 var(--ui)!important}
html:root body.bb-mode .workspace-panel .video-explanation-head p{margin:2px 0 0!important;font:400 13.5px/1.45 var(--ui)!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html:root body.bb-mode .workspace-panel .video-stage{flex:1 1 auto!important;min-height:0!important;width:100%!important;max-width:none!important;height:auto!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start;gap:10px!important;margin:0!important;--v2-video-h:86%}
html:root body.bb-mode .workspace-panel .video-stage[data-size="small"]{--v2-video-h:60%}
html:root body.bb-mode .workspace-panel .video-stage[data-size="large"]{--v2-video-h:100%}
html:root body.bb-mode .workspace-panel .video-stage video{flex:0 1 auto!important;min-height:0!important;height:calc(var(--v2-video-h) - 58px)!important;max-height:calc(100% - 58px)!important;width:auto!important;max-width:100%!important;aspect-ratio:var(--video-aspect-ratio,9/16);object-fit:contain;border-radius:12px!important;background:#000}
html:root body.bb-mode .workspace-panel .video-tools{flex:0 0 auto!important;width:auto!important;max-width:100%;height:auto!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:6px!important;margin:0!important}
html:root body.bb-mode .workspace-panel .video-tools button,html:root body.bb-mode .workspace-panel .video-tools select{height:34px!important;min-height:34px!important;padding:0 12px!important;border:1px solid var(--p-line)!important;border-radius:999px!important;background:transparent!important;background-image:none!important;color:var(--p-text)!important;font:600 13px var(--ui)!important;box-shadow:none!important;cursor:pointer}
html:root body.bb-mode .workspace-panel .video-tools>button:first-child{background:var(--p-primary-bg)!important;border-color:var(--p-primary-bg)!important;color:var(--p-primary-fg)!important;min-width:76px}
html:root body.bb-mode .workspace-panel .video-tools label{display:inline-flex;align-items:center;gap:6px;font:500 13px var(--ui)!important;color:var(--p-muted)!important}
html:root body.bb-mode .workspace-panel .video-size-controls{display:inline-flex!important;gap:2px!important;padding:2px;border:1px solid var(--p-line);border-radius:999px}
html:root body.bb-mode .workspace-panel .video-size-controls button{border:0!important;height:28px!important;min-height:28px!important;padding:0 10px!important}
html:root body.bb-mode .workspace-panel .video-size-controls button[aria-pressed="true"]{background:var(--p-accent-soft)!important;color:var(--p-accent)!important}
/* Light panel: the video card follows the panel instead of staying a dark slab. */
html:root body.bb-mode:not(.bb-dark) .workspace-panel .video-explanation-panel{background:transparent!important;background-image:none!important;color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .video-explanation-panel :where(h3,p,span,label,div){color:var(--p-text)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .video-explanation-head p{color:var(--p-muted)!important}
html:root body.bb-mode:not(.bb-dark) .workspace-panel .video-tools select{color-scheme:light}

/* ================= Gentle motion layer (owner request 2026-11-14) =================
   Nothing should pop in from nowhere, and nothing should show off. Short fades with a few pixels
   of travel, 130-240ms, all switched off for people who ask for reduced motion. `translate` and
   `scale` are used instead of `transform` so centered dialogs keep their own positioning. */
@keyframes v2-dialog-in{from{opacity:0;translate:0 8px;scale:.985}to{opacity:1;translate:0 0;scale:1}}
@keyframes v2-dialog-out{from{opacity:1}to{opacity:0;translate:0 5px;scale:.99}}
@keyframes v2-fade{from{opacity:0}to{opacity:1}}
@keyframes v2-fade-out{from{opacity:1}to{opacity:0}}
@keyframes v2-rise{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}
@keyframes v2-drop{from{opacity:0;translate:0 -5px}to{opacity:1;translate:0 0}}
@keyframes v2-step-in{from{opacity:.35;translate:0 3px}to{opacity:1;translate:0 0}}
dialog[open]{animation:v2-dialog-in .19s cubic-bezier(.2,.7,.2,1) both}
dialog[open]::backdrop{animation:v2-fade .19s ease-out both}
dialog[open].v2-dialog-closing{animation:v2-dialog-out .13s ease-in both}
dialog[open].v2-dialog-closing::backdrop{animation:v2-fade-out .13s ease-in both}
/* Step card: a soft settle when the step changes. */
html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy.v2-step-in{animation:v2-step-in .2s ease-out both!important}
/* Question box, practice box, restore pill, answer feedback. */
html:root body.bb-mode .workspace-panel .v2-question[open]>:not(summary){animation:v2-drop .18s ease-out both}
html:root body.bb-mode .workspace-panel :is(.v2-try,.v2-finish){animation:v2-rise .2s ease-out both}
html:root body.bb-mode .workspace-panel :is(.v2-try-feedback:not(:empty),.v2-result){animation:v2-fade .18s ease-out both}
html:root body.bb-mode .workspace-restore{animation:v2-rise .2s ease-out both}
html:root body.bb-mode .bb-stage .practice-feedback:not([hidden]){animation:v2-drop .2s ease-out both}
html:root body.bb-mode .workspace-panel .workspace-feature.v2-feature-in{animation:v2-fade .18s ease-out both}
/* Light/dark switch: colors cross-fade instead of snapping. The class is on for about 300ms. */
html.v2-theme-fade body,html.v2-theme-fade body *:not(.dcg-container *){transition:background-color .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease,fill .22s ease!important}
/* Light mode: the similar-questions entry was only reachable in dark mode. */
html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry{display:flex!important;align-items:center;justify-content:flex-end;gap:10px;margin:14px 0 0!important;padding:0!important;background:none!important;box-shadow:none!important}
html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry small{font:500 12.5px var(--ui)!important;color:#5b616b!important;opacity:1!important}
html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry .similar-question-button{min-height:34px!important;padding:0 14px!important;border:1px solid #d5dae3!important;border-radius:999px!important;background:#fff!important;background-image:none!important;color:#324dc7!important;font:600 13px var(--ui)!important;box-shadow:none!important;gap:6px!important;cursor:pointer;transition:background-color .15s,border-color .15s}
html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry .similar-question-button:hover{background:#f1f4fd!important;border-color:#324dc7!important}
@media (prefers-reduced-motion:reduce){
 dialog[open],dialog[open]::backdrop,dialog[open].v2-dialog-closing,html:root body.bb-mode .workspace-panel .v2-player .desmos-step-copy.v2-step-in,html:root body.bb-mode .workspace-panel .v2-question[open]>:not(summary),html:root body.bb-mode .workspace-panel :is(.v2-try,.v2-finish,.v2-try-feedback,.v2-result),html:root body.bb-mode .workspace-restore,html:root body.bb-mode .bb-stage .practice-feedback,html:root body.bb-mode .workspace-panel .workspace-feature.v2-feature-in{animation:none!important}
 html.v2-theme-fade body,html.v2-theme-fade body *{transition:none!important}
}

/* ================= Phone fixes from the feature audit (2026-11-14) ================= */
@media (max-width:520px){
 /* Four explanation buttons (Interactive, Hand, Brief video, Detailed) share the row instead of
    the fourth being pushed off the right edge. */
 html:root body.bb-mode .bb-footer-left .always-answer-actions{width:100%!important;max-width:100%!important;min-width:0!important}
 html:root body.bb-mode .bb-footer-left .always-answer-actions>button[data-always="view"]{flex:1 1 0!important;min-width:0!important;width:auto!important;padding:0 4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 /* Top tools: keep "Bluebook mode" on one line. */
 html:root body.bb-mode header.bb-top nav{gap:4px!important}
 html:root body.bb-mode header.bb-top nav button{white-space:nowrap!important;font-size:11.5px!important;gap:3px!important}
 /* Dark mode toolbar: slider, similar questions and Question tools stay on one row, so the tools
    button no longer drops onto the question card. */
 html:root body.bb-mode.bb-dark .question-header-toolbar{flex-wrap:nowrap!important;gap:6px!important;align-items:center!important}
 html:root body.bb-mode.bb-dark .question-header-toolbar .question-position{flex:1 1 0!important;min-width:0!important;width:auto!important}
 html:root body.bb-mode.bb-dark .question-header-toolbar .question-position input[type=range]{flex:1 1 0!important;min-width:36px!important;width:auto!important}
 html:root body.bb-mode.bb-dark .question-header-toolbar :is(.similar-question-entry,.bb-dark-tools){flex:0 0 auto!important;margin:0!important}
 html:root body.bb-mode.bb-dark .question-header-toolbar :is(.similar-question-button,.bb-dark-tools>button,.bb-dark-tools>summary){font-size:11.5px!important;padding-inline:8px!important;white-space:nowrap!important}
}
/* Theme switch: the question keeps its place while colors cross-fade (no second fade-in on top). */
html.v2-theme-fade body.bb-mode .bb-stage{animation:none!important}
@media (max-width:520px){html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry small{display:none!important}html:root body.bb-mode:not(.bb-dark) .bb-stage .similar-question-entry{margin:6px 0 0!important}}
