/* ==========================================================================
   Exam screen — Bluebook-style (Digital SAT) testing interface
   ========================================================================== */

:root {
  /* Accent blue: selected answers, answered questions, Next/Back */
  --bb-accent: #314dc6;
  --bb-accent-hover: #2840a8;
  --bb-accent-ring: rgba(49, 77, 198, .2);
  --bb-ink: #1a1a1a;
  --bb-gray: #5f6368;
  --bb-bar: #ffffff;
  /* Multicolour dashed rule under the header, above the footer and under the question bar */
  --bb-rainbow: repeating-linear-gradient(90deg, #dd4d44 0px 22px, transparent 22px 25px, #e27926 25px 47px, transparent 47px 50px, #edbb33 50px 72px, transparent 72px 75px, #f5e235 75px 97px, transparent 97px 100px, #aed83a 100px 122px, transparent 122px 125px, #56c46a 125px 147px, transparent 147px 150px, #25b992 150px 172px, transparent 172px 175px, #28cce9 175px 197px, transparent 197px 200px, #2192de 200px 222px, transparent 222px 225px, #355cd7 225px 247px, transparent 247px 250px, #513ad6 250px 272px, transparent 272px 275px, #753bd9 275px 297px, transparent 297px 300px, #9c46de 300px 322px, transparent 322px 325px, #c340de 325px 347px, transparent 347px 350px, #dc469d 350px 372px, transparent 372px 375px, #dc5381 375px 397px, transparent 397px 400px, #e86c91 400px 422px, transparent 422px 425px, #e87e5d 425px 447px, transparent 447px 450px);
  --bb-line: #d0d0d5;
  --bb-red: #c13145;
}
.bb {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: #fff; color: var(--bb-ink);
  font-family: var(--font-ui);
  font-size: 15px;
}
.bb button:not(.bb-choice) { font-family: inherit; }

/* ---------------- Header ---------------- */
.bb-header {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 74px; padding: 8px 28px; background: var(--bb-bar);
}
.bb-h-left { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.bb-section-title { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bb-link-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; border: 0; background: none;
  font-weight: 600; font-size: 14px; color: var(--bb-ink);
}
.bb-link-btn .ico { width: 18px; height: 18px; transition: transform .15s; }
.bb-link-btn.is-open .ico { transform: rotate(180deg); }
.bb-link-btn:hover { text-decoration: underline; }
.bb-h-center { display: grid; justify-items: center; gap: 4px; }
.bb-timer { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; min-height: 26px; }
.bb-timer.is-hidden { visibility: hidden; height: 0; min-height: 0; overflow: hidden; }
.bb-timer.is-warning { color: #c62828; }
.bb-pill-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 12px; min-height: 26px; border: 1px solid #6b7280; border-radius: 999px; background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--bb-ink);
}
.bb-pill-sm .ico { width: 16px; height: 16px; }
.bb-pill-sm:hover { background: #f3f4f6; }
.bb-h-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.bb-tool {
  position: relative; display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 6px 8px 4px;
  border: 0; border-radius: 8px; background: transparent; color: var(--bb-ink); font-size: 12.5px; font-weight: 600;
}
.bb-tool .ico { width: 24px; height: 24px; stroke-width: 1.7; }
.bb-tool:hover { background: rgba(0, 0, 0, .05); }
.bb-tool.is-active { color: var(--bb-accent); }
.bb-tool.is-active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -6px; height: 3px; border-radius: 3px; background: var(--bb-accent); }
.bb-more-wrap { position: relative; }
.bb-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; min-width: 220px; padding: 6px;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
}
.bb-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
  background: transparent; font-size: 14px; font-weight: 600; text-align: left; color: var(--bb-ink);
}
.bb-menu button:hover { background: #f2f2f4; }
.bb-menu .ico { width: 19px; height: 19px; color: var(--bb-gray); }

/* Signature dashed divider line, in many colours */
.bb-dashline { flex: none; height: 2px; background: var(--bb-rainbow); }

/* ---------------- Directions ---------------- */
.bb-directions {
  position: absolute; left: 0; right: 0; top: 77px; bottom: 0; z-index: 60;
  background: rgba(0, 0, 0, .28); display: flex; justify-content: center; align-items: flex-start; padding: 0 16px;
}
.bb-directions-inner {
  width: min(1100px, 100%); max-height: calc(100% - 24px); display: flex; flex-direction: column;
  background: #fff; border-radius: 0 0 14px 14px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .45);
}
.bb-directions-body { overflow: auto; padding: 26px 36px 8px; font-family: var(--font-serif); font-size: 16.5px; line-height: 1.6; }
.bb-directions-body p { margin: 0 0 .8em; }
.bb-directions-foot { display: flex; justify-content: flex-end; padding: 14px 24px 18px; }
.bb-directions-foot .bb-btn--primary { background: #fedb00; color: #111; }
.bb-directions-foot .bb-btn--primary:hover { background: #f5cf00; }
.bb-dir-list { margin: 0 0 1em; padding-left: 22px; }
.bb-dir-list li { margin-bottom: .45em; }
.bb-examples { border-collapse: collapse; width: 100%; max-width: 640px; font-family: var(--font-serif); font-size: 15px; margin: 6px 0 12px; }
.bb-examples th, .bb-examples td { border: 1px solid #a1a1aa; padding: 8px 10px; text-align: center; vertical-align: middle; }
.bb-examples th { font-family: var(--font-ui); font-size: 13px; font-weight: 700; background: #f5f5f6; }

/* ---------------- Main ---------------- */
.bb-main { flex: 1; min-height: 0; overflow: auto; position: relative; background: #fff; }
.bb-stage--single { display: flex; justify-content: center; padding: 28px 24px 48px; min-height: 100%; }
.bb-qcol { width: 100%; max-width: 740px; }

.bb-qhead {
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 0; margin-bottom: 18px;
  background: #f1f3f4; min-height: 40px; position: relative;
}
.bb-qhead::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--bb-rainbow); }
.bb-qnum {
  display: grid; place-items: center; min-width: 34px; height: 40px; padding: 0 8px;
  background: var(--bb-ink); color: #fff; font-weight: 700; font-size: 17px; font-family: var(--font-ui);
}
.bb-mark {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; background: none; border-radius: 6px;
  font-size: 14.5px; font-weight: 600; color: var(--bb-ink);
}
.bb-mark .ico { width: 20px; height: 20px; }
.bb-mark:hover span { text-decoration: underline; }
.bb-mark.is-marked .ico { color: var(--bb-red); }
.bb-abc {
  margin-left: auto; display: grid; place-items: center; min-width: 46px; height: 30px; padding: 0 6px;
  border: 1.5px solid var(--bb-ink); border-radius: 6px; background: #fff; color: var(--bb-ink);
}
.bb-abc span { position: relative; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.bb-abc span::after { content: ''; position: absolute; left: -4px; right: -4px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-12deg); }
.bb-abc.is-on { background: var(--bb-accent); border-color: var(--bb-accent); color: #fff; }
.bb-abc:hover { box-shadow: 0 0 0 3px var(--bb-accent-ring); }

.bb-prompt { margin-bottom: 22px; }

/* Answer choices */
.bb-choices { display: grid; gap: 14px; }
.bb-choice-row { display: flex; align-items: center; gap: 12px; position: relative; }
.bb-choice {
  position: relative; flex: 1; display: flex; align-items: center; gap: 14px; min-height: 52px;
  padding: 9px 16px 9px 12px; border: 1px solid #3d3d3d; border-radius: 9px; background: #fff;
  text-align: left; color: var(--bb-ink);
  font-family: var(--font-serif); font-size: 17.5px; line-height: 1.5;
  transition: box-shadow .12s, border-color .12s;
}
.bb-choice:hover { box-shadow: inset 0 0 0 1px #3d3d3d; }
.bb-letter {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.6px solid var(--bb-ink);
  display: grid; place-items: center; font-family: var(--font-ui); font-weight: 700; font-size: 14.5px;
  background: #fff;
}
.bb-choice-text { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.bb-choice-text .katex { font-size: 1.08em; }
.bb-choice.is-selected { border: 1px solid var(--bb-accent); box-shadow: inset 0 0 0 2px var(--bb-accent), 0 0 0 1px var(--bb-accent); }
.bb-choice.is-selected .bb-letter { background: var(--bb-accent); border-color: var(--bb-accent); color: #fff; }

.bb-choice-row.is-eliminated .bb-choice { color: #8a8f98; border-color: #a7acb5; box-shadow: none; }
.bb-choice-row.is-eliminated .bb-choice > * { opacity: .55; }
.bb-choice-row.is-eliminated .bb-choice::after {
  content: ''; position: absolute; left: -6px; right: -6px; top: 50%; height: 2px; background: #2b2b2b; pointer-events: none;
}
.bb-elim {
  flex: none; position: relative; width: 28px; height: 28px; margin: 0 8px; border-radius: 50%; border: 1.5px solid var(--bb-ink);
  background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--bb-ink);
}
.bb-elim::after { content: ''; position: absolute; left: -5px; right: -5px; top: 50%; height: 1.5px; background: var(--bb-ink); }
.bb-elim:hover { background: #f0f0f2; }
.bb-undo {
  flex: none; width: 44px; border: 0; background: none; padding: 4px 2px; font-weight: 700; font-size: 13.5px;
  text-decoration: underline; color: var(--bb-ink);
}

/* ---------------- Student-produced response: split screen ---------------- */
.bb-stage--split { --split: 50%; display: grid; grid-template-columns: var(--split) 14px 1fr; height: 100%; }
.bb-stage--split.is-resizing { user-select: none; cursor: col-resize; }
.bb-pane { min-width: 0; overflow: auto; }
.bb-pane-inner { padding: 28px 36px 48px; max-width: 760px; margin: 0 auto; }
.bb-pane--left { background: #fff; }
.bb-spr-dir { font-family: var(--font-serif); font-size: 16px; line-height: 1.6; }
.bb-spr-dir summary {
  font-family: var(--font-ui); font-size: 17px; font-weight: 700; margin-bottom: 12px; cursor: pointer; list-style: none;
}
.bb-spr-dir summary::-webkit-details-marker { display: none; }
.bb-examples-title { margin: 10px 0 4px; font-family: var(--font-ui); }
.bb-divider {
  position: relative; display: flex; justify-content: center; cursor: col-resize; outline: none; touch-action: none;
}
.bb-divider::before { content: ''; width: 2px; height: 100%; background: #cfcfd4; }
.bb-divider-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 44px; border-radius: 6px; background: #1a1a1a; color: #fff; display: grid; place-items: center;
}
.bb-divider-grip .ico { width: 14px; height: 14px; }
.bb-divider:hover::before, .bb-divider:focus-visible::before { background: var(--bb-accent); }

.bb-spr { margin-top: 6px; }
.bb-spr-input {
  display: block; width: 180px; height: 52px; padding: 0 14px; border: 1px solid #3d3d3d; border-radius: 9px;
  font-family: var(--font-serif); font-size: 22px; letter-spacing: .04em; color: var(--bb-ink); background: #fff; outline: none;
  box-shadow: inset 0 -3px 0 #3d3d3d;
}
.bb-spr-input:focus { border-color: var(--bb-accent); box-shadow: inset 0 -3px 0 var(--bb-accent), 0 0 0 3px var(--bb-accent-ring); }
.bb-spr-preview { margin-top: 14px; font-size: 15px; font-weight: 600; min-height: 34px; display: flex; align-items: center; gap: 8px; }
.bb-spr-preview-val { font-family: var(--font-serif); font-weight: 400; font-size: 19px; }

/* ---------------- Check Your Work page ---------------- */
.bb-review { max-width: 920px; margin: 0 auto; padding: 34px 24px 48px; text-align: center; }
.bb-review h1 { font-size: 30px; font-weight: 700; margin-bottom: 14px; }
.bb-review > p { margin: 0 0 4px; font-size: 16px; }
.bb-review-card {
  margin-top: 26px; text-align: left; background: #fff; border-radius: 14px; padding: 22px 28px 26px;
  box-shadow: 0 6px 30px -10px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .05);
}
.bb-review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid #e6e6e9; }
.bb-review-card-head h2 { margin: 0; font-size: 19px; }
.bb-review-stat { margin: 18px 0 0; color: var(--bb-gray); font-size: 14px; }
.bb-review-warn { color: #b45309; font-weight: 700; }

/* ---------------- Question grid ---------------- */
.bb-legend { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.bb-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.bb-legend-pin .ico { width: 18px; height: 18px; color: var(--bb-ink); }
.bb-legend-box { width: 16px; height: 16px; border: 1.5px dashed #555; border-radius: 3px; }
.bb-legend-flag .ico { width: 16px; height: 16px; color: var(--bb-red); }
.bb-grid { display: flex; flex-wrap: wrap; gap: 18px 12px; padding: 22px 4px 6px; justify-content: flex-start; }
.bb-grid--lg { gap: 22px 16px; justify-content: center; }
.bb-gcell {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px;
  border: 1.5px dashed #5f6368; background: #fff; color: var(--bb-accent); font-weight: 700; font-size: 15px;
}
.bb-grid--lg .bb-gcell { width: 46px; height: 46px; font-size: 16px; }
.bb-gcell:hover { box-shadow: 0 0 0 3px var(--bb-accent-ring); }
.bb-gcell.is-answered { background: var(--bb-accent); border: 1.5px solid var(--bb-accent); color: #fff; }
.bb-gpin { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); line-height: 0; }
.bb-gpin .ico { width: 18px; height: 18px; color: var(--bb-ink); }
.bb-gflag { position: absolute; top: -8px; right: -7px; line-height: 0; }
.bb-gflag .ico { width: 16px; height: 16px; color: var(--bb-red); filter: drop-shadow(0 0 1px #fff); }
.bb-gcell.is-current { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bb-ink); }

/* ---------------- Footer ---------------- */
.bb-footer {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 70px; padding: 8px 28px; background: var(--bb-bar);
}
.bb-f-left { min-width: 0; }
.bb-student { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bb-f-center { position: relative; display: flex; justify-content: center; }
.bb-navbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 16px; border: 0; border-radius: 8px;
  background: var(--bb-ink); color: #fff; font-weight: 700; font-size: 14.5px;
}
.bb-navbtn .ico { width: 18px; height: 18px; }
.bb-navbtn:hover { background: #000; }
.bb-f-right { display: flex; justify-content: flex-end; gap: 10px; }
.bb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 84px; min-height: 42px; padding: 8px 22px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none !important;
}
.bb-btn--primary { background: var(--bb-accent); color: #fff; }
.bb-btn--primary:hover { background: var(--bb-accent-hover); }
.bb-btn--outline { background: #fff; color: var(--bb-accent); border-color: var(--bb-accent); }
.bb-btn--outline:hover { background: #f4f4f5; }

/* Question navigator (Question X of Y) */
.bb-navpop {
  position: absolute; bottom: calc(100% + 22px); left: 50%; transform: translateX(-50%); z-index: 65;
  width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 200px); overflow: auto;
  background: #fff; border-radius: 14px; padding: 18px 22px 20px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
}
.bb-navpop-head { display: flex; align-items: center; justify-content: center; position: relative; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #e6e6e9; }
.bb-navpop-head h3 { margin: 0; font-size: 17px; }
.bb-navpop-head .bb-icon-btn { position: absolute; right: -8px; top: -6px; }
.bb-navpop-foot { display: flex; justify-content: center; margin-top: 18px; }
.bb-navpop-arrow { position: fixed; display: none; }
.bb-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.bb-icon-btn:hover { background: rgba(0, 0, 0, .07); }
.bb-icon-btn .ico { width: 19px; height: 19px; }

/* ---------------- Floating panels: Calculator / Reference ---------------- */
.bb-float {
  position: fixed; z-index: 80; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 12px; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .1);
  min-width: 280px; min-height: 220px;
}
.bb-float.is-dragging { user-select: none; }
.bb-float.is-dragging iframe { pointer-events: none; }
.bb-float.is-expanded { left: 12px !important; top: 84px !important; width: calc(100vw - 24px) !important; height: calc(100vh - 170px) !important; }
.bb-float-head {
  flex: none; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 10px;
  background: #1a1a1a; color: #fff; cursor: move; touch-action: none; user-select: none;
}
.bb-float-grip .ico { width: 16px; height: 16px; opacity: .6; }
.bb-float-title { font-weight: 700; font-size: 14.5px; }
.bb-float-head .bb-icon-btn { color: #fff; }
.bb-float-head .bb-icon-btn:hover { background: rgba(255, 255, 255, .15); }
.bb-float-head .bb-icon-btn:first-of-type { margin-left: auto; }
.bb-seg { display: inline-flex; margin-left: 12px; padding: 2px; background: rgba(255, 255, 255, .12); border-radius: 8px; }
.bb-seg button { border: 0; background: transparent; color: #d8d8dc; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 6px; }
.bb-seg button.is-on { background: #fff; color: #1a1a1a; }
.bb-float-body { position: relative; flex: 1; min-height: 0; }
.calc-host { position: absolute; inset: 0; }
.calc-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center; color: var(--bb-gray); background: #fff; }
.calc-msg p { margin: 0; }
.calc-msg-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.bb-float-resize {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, #a1a1aa 50%, #a1a1aa 60%, transparent 60%, transparent 72%, #a1a1aa 72%, #a1a1aa 82%, transparent 82%);
}
.bb-float--ref .bb-float-body { overflow: auto; }
.ref-sheet { padding: 18px 20px 24px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 10px; }
.ref-item { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.ref-fig svg { display: block; max-width: 100%; height: auto; }
.ref-tex { font-size: 15px; line-height: 1.7; }
.ref-tex--caption { font-size: 12.5px; font-weight: 600; color: var(--bb-gray); }
.ref-notes { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e6e6e9; font-family: var(--font-serif); font-size: 15px; }
.ref-notes p { margin: 0 0 6px; }

/* During the exam the site's cream-and-mint tokens switch to the exam's neutral greys and blue, so
   dialogs (Submit, Time's up, Help), toasts, focus rings and the calculator spinner match the exam */
body.is-exam {
  --bg: #ffffff; --surface-2: #f7f7f8; --surface-3: #efeff1; --border: #e6e6e9; --frame: #d4d4d8;
  --ink: #1a1a1a; --ink-2: #3a3a3f; --muted: #5f6368; --line: #e6e6e9; --line-2: #d4d4d8;
  --primary: var(--bb-accent); --primary-hover: var(--bb-accent-hover); --primary-soft: #eef1fd;
  --primary-ring: var(--bb-accent-ring); --focus-ring: 0 0 0 3px var(--bb-accent-ring);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .38);
}
body.is-exam .modal-overlay { background: rgba(0, 0, 0, .45); }
body.is-exam .toast { background: #1a1a1a; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .bb-header, .bb-footer { padding-left: 14px; padding-right: 14px; }
  .bb-pane-inner { padding: 22px 22px 40px; }
}
@media (max-width: 720px) {
  .bb-header { grid-template-columns: 1fr auto auto; gap: 8px; min-height: 64px; padding: 6px 10px; }
  .bb-section-title { font-size: 14px; }
  .bb-link-btn { font-size: 13px; }
  .bb-h-center { order: 0; }
  .bb-timer { font-size: 17px; min-height: 22px; }
  .bb-pill-sm { min-height: 22px; padding: 1px 10px; font-size: 11.5px; }
  .bb-h-right { gap: 0; }
  .bb-tool { min-width: 40px; padding: 6px 6px; }
  /* Visually hidden, but still gives the icon-only buttons an accessible name */
  .bb-tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bb-directions { top: 67px; padding: 0; }
  .bb-directions-body { padding: 18px 18px 6px; font-size: 15.5px; }
  .bb-stage--single { padding: 18px 16px 36px; }
  .bb-choice { font-size: 16.5px; padding: 8px 12px 8px 10px; gap: 10px; }
  .bb-stage--split { display: block; height: auto; }
  .bb-divider { display: none; }
  .bb-pane { overflow: visible; }
  .bb-pane--left { border-bottom: 1px solid #e6e6e9; background: #fafafa; }
  .bb-pane--left .bb-pane-inner { padding: 12px 16px; }
  .bb-spr-dir summary { margin: 0; font-size: 15px; }
  .bb-spr-dir summary::after { content: ' ▾'; color: var(--bb-gray); }
  .bb-spr-dir[open] summary { margin-bottom: 10px; }
  .bb-pane--right .bb-pane-inner { padding: 18px 16px 36px; }
  .bb-footer { grid-template-columns: auto 1fr auto; gap: 8px; min-height: 62px; padding: 6px 10px; }
  .bb-f-left { display: none; }
  .bb-f-center { justify-content: flex-start; position: static; }
  .bb-navbtn { font-size: 13px; padding: 8px 10px; }
  .bb-btn { min-width: 0; padding: 8px 14px; min-height: 38px; font-size: 14px; }
  .bb-f-right { gap: 6px; }
  .bb-navpop { position: fixed; bottom: 72px; left: 12px; right: 12px; transform: none; width: auto; max-height: calc(100vh - 160px); padding: 14px 14px 16px; }
  .bb-grid { gap: 16px 10px; justify-content: center; }
  .bb-review { padding: 22px 14px 36px; }
  .bb-review h1 { font-size: 24px; }
  .bb-review-card { padding: 16px 14px 20px; }
  .bb-float { left: 8px !important; right: 8px !important; width: auto !important; top: 72px !important; height: calc(100vh - 150px) !important; }
  /* Keep the calculator's Graphing/Scientific switch and close button inside 320–375px screens */
  .bb-float--calc .bb-float-title { display: none; }
  .bb-seg { margin-left: 4px; }
  .bb-float-head .bb-icon-btn { flex: none; }
}
