/* ============================================================
   Ask Bo (assets/tutor.js), on the website and in the apps: a chat with Bo, the students' bobcat.
   Bo's messages sit on white cards with a 2px border, the student's on the accent; the composer
   stays at the bottom (above the tab bar in the apps). Big Sky rules: lips under pressable things,
   44px touch targets, no motion when reduced.
   ============================================================ */
.bo-shell { container-type: inline-size; }
.bo-page { max-width: 780px; margin: 0 auto; padding: 18px 16px 0; }
.bo-col { display: flex; flex-direction: column; min-width: 0; min-height: calc(100dvh - 120px); }
html[data-app] .bo-page { padding-top: 12px; }
html[data-app] .bo-col { min-height: calc(100dvh - var(--ab-h) - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.bo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* the way back to the classes, above Bo's name */
.bo-nav { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: -2px; }
.bo-nav .btn { min-height: 38px; gap: 6px; }
@media (pointer: coarse) { .bo-nav .btn { min-height: 44px; } }
html[data-app] .bo-nav { display: none; }   /* the apps have their tab bar and back gesture */
.bo-av { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); }
.bo-title { flex: 1; min-width: 0; }
.bo-title h1 { margin: 0; font: 800 28px/1.1 var(--font-display); letter-spacing: -.015em; color: var(--ink); }
.bo-title p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.bo-knows-btn { flex: none; width: 44px; height: 44px; }
.bo-classes { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.bo-classes::-webkit-scrollbar { display: none; }
.bo-class { flex: none; }
.bo-main { flex: 1; display: flex; flex-direction: column; margin-top: 12px; }
.bo-loading { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.bo-loading i { height: 64px; border-radius: 20px; background: var(--surface-3); animation: ah-pulse 1.1s ease-in-out infinite alternate; }
.bo-loading i:nth-child(2) { width: 70%; align-self: flex-end; animation-delay: .15s; }

/* ---------- the chat ---------- */
.bo-log { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 6px 0 12px; }
.bo-msg { display: flex; align-items: flex-end; gap: 10px; }
.bo-msg.you { justify-content: flex-end; }
.bo-mini { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--accent-soft); }
.bo-bubble { position: relative; min-width: 0; max-width: min(620px, 86%); padding: 12px 14px; border-radius: 20px; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.bo-msg.bo .bo-bubble { border: 2px solid var(--border); border-bottom-left-radius: 6px; background: var(--surface); color: var(--ink); }
.bo-msg.you .bo-bubble { border-bottom-right-radius: 6px; background: var(--accent); color: var(--accent-ink, #fff); }
.bo-bubble p { margin: 0 0 8px; }
.bo-bubble p:last-child { margin-bottom: 0; }
.bo-bubble :is(ul, ol) { margin: 4px 0 8px; padding-left: 22px; }
.bo-bubble li { margin: 3px 0; }
.bo-bubble code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font-family: var(--font-mono, monospace); font-size: .92em; }
.bo-msg.you .bo-bubble code { background: rgba(255, 255, 255, .18); }
.bo-bubble mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.bo-tools { display: flex; justify-content: flex-end; gap: 2px; margin: 4px -8px -8px 0; }
.bo-tool { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.bo-tool:hover { background: var(--surface-2); color: var(--ink); }
.bo-tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (pointer: coarse) { .bo-tool { width: 44px; height: 44px; } }
.bo-remember { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0 !important; padding: 8px 10px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: 13.5px; }
.bo-remember svg { color: var(--gold, #b7791f); }
.bo-photo-tag { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font: 700 12.5px/1 var(--font-body); opacity: .92; }
.bo-msg.typing .bo-bubble { display: flex; gap: 5px; padding: 17px 16px; }
.bo-msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: bo-dot 1s ease-in-out infinite; }
.bo-msg.typing i:nth-child(2) { animation-delay: .15s; }
.bo-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bo-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bo-msg.err .bo-bubble { border-color: var(--coral, #e5533d); }
.bo-msg.err .btn { margin-top: 8px; }
.bo-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 10px; }
.bo-suggest[hidden] { display: none; }
.bo-chip { min-height: 40px; padding: 0 14px; cursor: pointer; font-size: 14px; }
.bo-suggest.bo-next { padding-top: 4px; }
/* code in a chat message */
.bo-code { margin: 6px 0; padding: 10px 12px; overflow-x: auto; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); font: 500 13.5px/1.5 var(--font-mono); white-space: pre; scrollbar-width: thin; }
.bo-msg.you .bo-code { background: rgba(255, 255, 255, .16); color: inherit; }
/* "Ask Bo about this", under a missed question */
.ask-bo { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; text-decoration: none; }
.ask-bo-av { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); }
.ask-bo-av svg { width: 18px; height: 18px; }
@media (pointer: coarse) { .bo-chip { min-height: 44px; } }

/* ---------- the composer ---------- */
.bo-compose { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 80%, transparent); }
html[data-app] .bo-compose { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
@media (max-width: 900px) { html:not([data-app]) .bo-compose { bottom: calc(70px + env(safe-area-inset-bottom)); padding-bottom: 10px; } }   /* above the website's phone tab bar */
.bo-row { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border: 2px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 3px 0 var(--lip, var(--border-strong)); }
.bo-row:focus-within { border-color: var(--accent); }
.bo-q { flex: 1; min-width: 0; min-height: 44px; max-height: 168px; padding: 10px 6px; border: 0 !important; background: none !important; box-shadow: none !important; color: var(--ink); font-size: 16px !important; line-height: 1.4; resize: none; }
.bo-q:focus { outline: none; }
.bo-photo { flex: none; width: 44px; height: 44px; cursor: pointer; color: var(--muted); }
.bo-photo:hover { color: var(--ink); }
.bo-send { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 16px; justify-content: center; }
.bo-photo-prev { position: relative; display: inline-flex; margin: 0 0 8px; }
.bo-photo-prev[hidden] { display: none; }
.bo-photo-prev img { width: 76px; height: 76px; object-fit: cover; border: 2px solid var(--border); border-radius: 14px; }
.bo-photo-prev .icon-btn { position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); }
.bo-foot { margin: 6px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }

/* ---------- before the chat: sign in, meet Bo, consent ---------- */
.bo-gate { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 580px; margin: 0 auto; padding: 24px 4px 40px; text-align: center; }
.bo-gate-av { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 34px; background: var(--accent-soft); }
.bo-gate h2 { margin: 0; font: 800 26px/1.15 var(--font-display); letter-spacing: -.015em; color: var(--ink); }
.bo-gate p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.bo-gate-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.bo-perks { list-style: none; display: grid; gap: 10px; width: 100%; margin: 6px 0; padding: 0; text-align: left; }
.bo-perks li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink-2); line-height: 1.45; }
.bo-perks svg { flex: none; margin-top: 2px; color: var(--accent-deep); }
.bo-perks b { color: var(--ink); }
.bo-consent p { text-align: left; }

/* ---------- What Bo knows: a sheet (the i button) ---------- */
.bo-k-sub { margin: -2px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.bo-k-meter { display: block; height: 8px; margin: 6px 0 3px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bo-k-meter i { display: block; height: 100%; border-radius: inherit; background: var(--pine, #15803d); }
.bo-k-list small { color: var(--muted); font-size: 12.5px; }
.bo-k-use { margin: 0; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bo-k-file pre { margin: 6px 0 0; max-height: 300px; overflow: auto; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--border); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.bo-k-file pre:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
:root .bo-k-h.bo-k-h { margin: 16px 0 6px; font: 800 15px/1.2 var(--font-display); letter-spacing: 0; color: var(--ink); }   /* above the skins' h3 sizes */
.bo-k-list { list-style: none; margin: 0; padding: 0; }
.bo-k-list li { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.4; }
.bo-k-list b { color: var(--ink); }
.bo-k-list span { color: var(--ink-2); }
.bo-notes { list-style: none; margin: 0; padding: 0; }
.bo-notes li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 14px; }
.bo-notes li span { flex: 1; }
.bo-knows .bo-gate-acts { justify-content: flex-start; margin: 14px 0 10px; }

/* ---------- Bo's board (App.boBoard): where he works things out, a page at a time ----------
   A whiteboard by day and a slate board at night: a faint dot grid, a title with a marker stroke under it,
   numbered steps with their math on its own line, the answer boxed in pine and tips on gold. Each new line is wiped in left to right as Bo writes it (the one motion here;
   still when motion is off). In the chat it sits beside the messages on wide screens and above them,
   sticky, on narrow ones, where it folds down to its bar. The call has the same board on white. */
.bb { --bb-dot: color-mix(in srgb, var(--ink) 9%, transparent); position: relative; display: flex; flex-direction: column; min-width: 0; border: 2px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 4px 0 var(--lip, var(--border-strong)); color: var(--ink); }
.bb-bar { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 6px 8px 6px 16px; border-bottom: 2px solid var(--border); }
:root .bb-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 800 15.5px/1.2 var(--font-display); letter-spacing: 0; color: var(--ink); }
.bb-name svg { flex: none; color: var(--accent-deep); }
.bb-pager { display: inline-flex; align-items: center; gap: 2px; }
.bb-pager[hidden] { display: none; }
.bb-pos { min-width: 92px; color: var(--muted); font: 700 13px/1 var(--font-body); font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.bb-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); cursor: pointer; }
.bb-btn[hidden] { display: none; }
.bb-btn:hover:not([disabled]) { background: var(--surface-2); color: var(--ink); }
.bb-btn[disabled] { opacity: .35; cursor: default; }
.bb-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (pointer: coarse) { .bb-btn { width: 44px; height: 44px; } }
.bb-fold svg { transform: rotate(180deg); transition: transform .2s ease-out; }
.bb[data-fold] .bb-fold svg { transform: none; }
.bb-sheet { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 22px; border-radius: 0 0 20px 20px; background-image: radial-gradient(var(--bb-dot) 1.2px, transparent 1.4px); background-size: 22px 22px; background-position: 11px 11px; scrollbar-width: thin; }
.bb-sheet:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
:root .bb-title { margin: 0 0 16px; padding-bottom: 10px; font: 800 21px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 56px 4px no-repeat; border-radius: 0 0 2px 2px; }
.bb-items { display: flex; flex-direction: column; gap: 14px; }
.bb-item p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.bb-math { font-size: 18px; text-align: center; overflow-x: auto; overflow-y: hidden; padding: 2px 0; color: var(--ink); scrollbar-width: thin; }
.bb-math mjx-container[display="true"] { margin: 0 !important; }
.bb-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.bb-n { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink-2); border-radius: 50%; color: var(--ink); font: 800 14px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.bb-step-b { min-width: 0; padding-top: 3px; }
.bb-step-b p { color: var(--ink-2); font-size: 15.5px; }
.bb-step .bb-math { text-align: left; padding-top: 6px; }
.bb-step mjx-container[display="true"] { text-align: left !important; }
.bb-answer { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 14px; border: 2px solid var(--pine); border-radius: 16px; background: color-mix(in srgb, var(--pine) 9%, var(--surface)); }
.bb-answer-l { display: inline-flex; align-items: center; gap: 5px; color: var(--good); font: 800 13px/1 var(--font-body); }
.bb-answer .bb-math { font-size: 20px; }
.bb-answer > p, .bb-item.bb-math > p { margin: 0; text-align: center; font-size: 17px; line-height: 1.5; color: var(--ink); text-wrap: balance; }
.bb-answer > p { font-size: 18px; font-weight: 600; }
.bb-mixed mjx-container { font-size: 112%; }
/* phones: the drawing shrinks to fit, so its numbers and labels are drawn larger to stay readable (about 10px and up) */
@media (max-width: 560px) {
  .bd .bd-tick { font-size: 13px; }
  .bd .bd-axl { font-size: 14px; }
  .bd .bd-lab, .bd .bd-prob { font-size: 15px; }
  .bd .bd-note { font-size: 14px; }
  .bd .bd-curve { stroke-width: 3.2; }
}
.bb-tip { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--gold-soft); }
.bb-tip-i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--gold); }
.bb-tip p { color: var(--ink); font-size: 15px; }
.bb-writing { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; color: var(--muted); font-size: 13.5px; }
.bb-writing svg { color: var(--accent-deep); animation: bb-pen 1.1s ease-in-out infinite alternate; }
@keyframes bb-pen { from { transform: translate(-2px, 1px) rotate(-6deg); } to { transform: translate(3px, -1px) rotate(4deg); } }
.bb-new { animation: bb-write .6s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0ms); }
@keyframes bb-write { from { clip-path: inset(-4px 100% -4px -4px); opacity: .35; } to { clip-path: inset(-4px -4px -4px -4px); opacity: 1; } }
.bb-empty { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 120px; padding: 6px 4px; color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: center; }
.bb-empty p { margin: 0; }
.bb-empty-h { color: var(--ink-2); font: 800 16px/1.3 var(--font-display); }
.bb-flash { animation: bb-flash .9s ease-out; }
@keyframes bb-flash { 0%, 30% { border-color: var(--accent); } 100% { border-color: var(--border); } }

/* in the chat: a link to each page in Bo's message */
.bo-onb { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; margin: 4px 0 8px; padding: 6px 12px; border: 2px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); font: 600 14px/1.35 var(--font-body); text-align: left; cursor: pointer; }
.bo-onb:last-child { margin-bottom: 0; }
.bo-onb svg { flex: none; }
.bo-onb b { color: var(--ink); font-weight: 700; }
.bo-onb:hover, .bo-onb.on { border-color: var(--accent); }
.bo-onb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .bo-onb { min-height: 44px; } }
/* the chat's board: above the messages, sticky under the top bar; folds down to its bar */
.bo-board { position: sticky; top: 10px; z-index: 6; margin-top: 12px; }
.app:not(.landing) .bo-board { top: 72px; }   /* under the top bar, where there is one */
.bo-board[hidden] { display: none; }
html[data-app] .bo-board { top: calc(var(--ab-h) + env(safe-area-inset-top) + 8px); }
.bo-board .bb-sheet { max-height: min(32dvh, 320px); }
.bo-board .bb-empty { min-height: 0; padding: 0; }
.bo-board[data-fold] .bb-sheet { display: none; }
.bo-board[data-fold] .bb-bar { border-bottom: 0; }
@container (min-width: 1000px) {
  .bo-page { max-width: 1320px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); grid-template-rows: auto auto 1fr; column-gap: 32px; }
  .bo-head { grid-column: 1; grid-row: 1; }
  .bo-classes { grid-column: 1; grid-row: 2; }
  .bo-main { grid-column: 1; grid-row: 3; }
  .bo-board, .app:not(.landing) .bo-board { grid-column: 2; grid-row: 1 / span 3; align-self: start; top: 20px; margin-top: 4px; height: calc(100dvh - 44px); max-height: 940px; }
  .app:not(.landing) .bo-board { top: 84px; height: calc(100dvh - 108px); }
  html[data-app] .bo-board { height: calc(100dvh - var(--ab-h) - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px); }
  .bo-board .bb-sheet { max-height: none; padding: 22px 26px 26px; }
  .bo-board .bb-empty { min-height: 100%; padding: 0 12px; }
  .bo-board .bb-fold { display: none; }
  .bo-board[data-fold] .bb-sheet { display: block; }
  .bo-board[data-fold] .bb-bar { border-bottom: 2px solid var(--border); }
}
@media (max-height: 620px) { .bo-board .bb-sheet { max-height: 26dvh; } }

/* ---------- the website's top bar button ---------- */
.bo-top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 5px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 14px/1 var(--font-body); text-decoration: none; white-space: nowrap; }
.bo-top:hover { border-color: var(--accent); }
.bo-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bo-top-av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); }
@media (max-width: 760px) { .bo-top { padding: 0 5px; } .bo-top > span:last-child { display: none; } }
html[data-app] .bo-top { display: none; }

@media (max-width: 520px) {
  .bo-title h1 { font-size: 24px; }
  .bo-av { width: 54px; height: 54px; border-radius: 17px; }
  .bo-bubble { max-width: 88%; }
  .bo-k-list li { grid-template-columns: 1fr; gap: 2px; }
}
/* Bo's drawings (assets/board-draw.js): marker colours from the theme, drawn stroke by stroke */
.bb-draw { margin: 0; }
.bd { --bd0: var(--accent); --bd1: var(--bad); --bd2: var(--good); --bd3: color-mix(in srgb, var(--accent) 50%, var(--bad)); --bd4: var(--warn); --bd5: var(--muted); }
.bd > svg { display: block; width: 100%; height: auto; max-height: 360px; overflow: visible; font-family: var(--font-body); }
.bd-c0 { --c: var(--bd0); } .bd-c1 { --c: var(--bd1); } .bd-c2 { --c: var(--bd2); } .bd-c3 { --c: var(--bd3); } .bd-c4 { --c: var(--bd4); } .bd-c5 { --c: var(--bd5); }
.bd-grid path, .bd-ticks path, .bd-tickline { stroke: color-mix(in srgb, var(--ink) 9%, transparent); stroke-width: 1; fill: none; }
.bd-ticks path, .bd-tickline { stroke: var(--ink-2); stroke-width: 1.4; }
.bd-axis { stroke: var(--ink-2); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.bd-axhead { stroke: var(--ink-2); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bd-curve, .bd-seg, .bd-shape, .bd-band, .bd-guide, .bd-mark, .bd-head { fill: none; stroke: var(--c, var(--ink)); stroke-linecap: round; stroke-linejoin: round; }
.bd-curve { stroke-width: 2.8; } .bd-seg, .bd-shape { stroke-width: 2.2; } .bd-band { stroke-width: 5; } .bd-guide { stroke-width: 1.6; } .bd-mark { stroke-width: 1.8; } .bd-head { stroke-width: 2.2; }
.bd-dash { stroke-dasharray: 6 5; }
.bd-fill { fill: var(--c, var(--accent)); fill-opacity: .17; stroke: none; }
.bd-dot { fill: var(--c, var(--ink)); stroke: var(--surface); stroke-width: 1.6; }
.bd-dot.open { fill: var(--surface); stroke: var(--c, var(--ink)); stroke-width: 2.2; }
.bd-tick { fill: var(--muted); font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-axl { fill: var(--ink-2); font-size: 11.5px; font-weight: 700; font-style: italic; }
.bd-lab, .bd-note, .bd-prob { fill: var(--c, var(--ink)); font-size: 13px; font-weight: 800; paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; }
.bd-note { fill: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.bd-prob { fill: var(--muted); font-size: 11.5px; font-weight: 700; }
.bd-cap { margin: 8px 2px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; text-align: center; text-wrap: pretty; }
.bd-bad { margin: 0; color: var(--muted); font-size: 14px; }
.bd-table-wrap { overflow-x: auto; }
.bd-table { margin: 0 auto; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.bd-table th, .bd-table td { padding: 6px 14px; border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); text-align: center; color: var(--ink); }
.bd-table thead th { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-weight: 800; }
.bd-table tbody th { font-weight: 700; color: var(--ink-2); }
.bd-rbox { fill: var(--c); fill-opacity: .16; stroke: var(--c); stroke-width: 1.3; stroke-opacity: .85; }
.bd-slice { fill: var(--c); fill-opacity: .82; stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.bd-key { fill: var(--c); fill-opacity: .82; }
.bd-keyt { fill: var(--ink); font-size: 13px; font-weight: 600; }
.bd-pct { fill: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.bd-uc { fill: var(--ink-2); font-size: 11.5px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.bd-median { fill: none; stroke: var(--c, var(--ink)); stroke-width: 3.4; stroke-linecap: round; }
.bd-frame { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; }
.bd-vshade { fill: var(--bd4); fill-opacity: .3; }
.bd-vnum { fill: var(--ink); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.bd-flowt { fill: var(--ink); font-size: 13px; font-weight: 600; }
.bd-stat { margin: 6px 2px 0; color: var(--ink-2); font: 700 14px/1.3 var(--font-body); font-variant-numeric: tabular-nums; text-align: center; }
.bd-sliders { display: grid; gap: 10px; margin: 10px 4px 0; }
.bd-sl { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); align-items: center; gap: 12px; color: var(--ink-2); font: 600 14px/1.2 var(--font-body); }
.bd-sl-n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bd-sl-n i { font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.bd-sl-n output { display: inline-block; min-width: 3.2ch; color: var(--accent-deep); font-weight: 800; }
.bd-sl input[type="range"] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.bd-sl input[type="range"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
/* a graph you can move (board-draw.js): drag it, zoom it, point at a curve to read it; its buttons show on hover, focus and touch */
.bd-live { position: relative; border-radius: 12px; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; outline: none; -webkit-tap-highlight-color: transparent; }
.bd-live.bd-grab { cursor: grabbing; }
.bd-live:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.bd-tools { position: absolute; top: 2px; right: 2px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease-out; }
.bd-live:hover .bd-tools, .bd-live:focus-within .bd-tools { opacity: 1; }
@media (hover: none) { .bd-tools { opacity: 1; } }
.bd-tb { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1.5px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink-2); cursor: pointer; box-shadow: 0 2px 6px rgba(13, 22, 38, .08); }
.bd-tb:hover { border-color: var(--accent); color: var(--accent-deep); }
.bd-tb:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.bd-tb[hidden] { display: none; }
@media (pointer: coarse) { .bd-tb { width: 40px; height: 40px; border-radius: 12px; } }
.bd-trace-v { fill: none; stroke: var(--c, var(--ink)); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .6; }
.bd-trace-dot { fill: var(--c, var(--ink)); stroke: var(--surface); stroke-width: 2.5; }
.bd-trace-t { fill: var(--ink); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.bd-trace-m { fill: var(--muted); font-size: 11.5px; font-weight: 700; }
.bd-hint { position: absolute; left: 50%; bottom: 10px; z-index: 1; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(13, 22, 38, .84); color: #fff; font: 700 12.5px/1.2 var(--font-body); white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(-50%); transition: opacity .2s ease-out; }
.bd-hint.on { opacity: 1; }

/* the grapher: one of Bo's graphs on the whole screen, with your own functions */
html.bdx-lock, html.bdx-lock body { overflow: hidden; }
.bdx { position: fixed; inset: 0; z-index: 140; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); opacity: 0; transition: opacity .18s ease-out; }
.bdx.open { opacity: 1; }
.bdx-top { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 20px; border-bottom: 2px solid var(--border); }
.bdx-top h2 { display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font: 800 18px/1.2 var(--font-display); white-space: nowrap; text-overflow: ellipsis; }
.bdx-top h2 svg { flex: none; color: var(--accent); }
.bdx-hint { flex: 1; margin: 0; color: var(--muted); font-size: 13.5px; text-align: right; }
.bdx-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.bdx-x:hover { background: var(--surface-3, var(--border)); }
.bdx-x:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bdx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
.bdx-side { min-height: 0; overflow-y: auto; padding: 16px 18px 24px; border-right: 2px solid var(--border); background: var(--bg); }
:root .bdx .bdx-h { margin: 18px 0 8px; color: var(--muted); font: 800 12.5px/1.2 var(--font-body) !important; letter-spacing: .06em; text-transform: uppercase; }
:root .bdx .bdx-h:first-child { margin-top: 0; }
.bdx-fns { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bdx-fn { --c: var(--bd0); display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 12px; background: var(--surface); }
.bdx-fn label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; min-height: 40px; cursor: pointer; font-size: 15px; font-weight: 600; }
.bdx-fn label span { min-width: 0; overflow-wrap: anywhere; }
.bdx-fn input { width: 18px; height: 18px; accent-color: var(--accent); }
.bdx-sw { flex: none; width: 18px; height: 4px; border-radius: 2px; background: var(--c); }
.bdx-fn:has(input:not(:checked)) label { color: var(--muted); }
.bdx-fn:has(input:not(:checked)) .bdx-sw { opacity: .35; }
.bdx-none { color: var(--muted); font-size: 14px; }
.bdx-rm { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.bdx-rm:hover { background: var(--surface-2); color: var(--bad); }
.bdx-add { margin-top: 12px; }
.bdx-add label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.bdx-row { display: flex; align-items: center; gap: 6px; }
.bdx-y { color: var(--ink-2); font: italic 700 15px/1 var(--font-body); }
.bdx-row .input { flex: 1; min-width: 0; min-height: 42px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 15px; }
.bdx-err { margin: 6px 0 0; color: var(--bad); font-size: 13.5px; line-height: 1.4; }
.bdx-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 36px; padding: 6px 0; cursor: pointer; font-size: 14.5px; line-height: 1.35; }
.bdx-opt input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.bdx-opt:has(input:disabled) { color: var(--muted); cursor: default; }
.bdx-tan { padding-left: 28px; }
.bdx-of { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.bdx-of:empty { display: none; }
.bdx-side .bd-sliders { margin: 0; }
.bdx-read { min-height: 2.8em; margin: 18px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.4; }
.bdx-read:empty { visibility: hidden; }
.bdx-plot { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface); }
.bdx-plot .bd { height: 100%; border-radius: 0; }
.bd-big { touch-action: none; }
.bd-big > svg { width: 100%; height: 100%; max-height: none; }
.bd-big .bd-tools { top: 12px; right: 12px; opacity: 1; flex-direction: column; }
.bd-big .bd-tb { width: 42px; height: 42px; border-radius: 12px; }
.bd-big .bd-tick { font-size: 12px; }
.bd-big .bd-lab { font-size: 14px; }
.bd-big .bd-curve { stroke-width: 3; }

/* the drawings Bo can make on top of those (assets/board-draw-more.js): his own SVG, pictures, 3D surfaces, contour maps, fields */
.bd { position: relative; }
.bd-view { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1.5px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink-2); cursor: zoom-in; opacity: 0; transition: opacity .15s ease-out; }
.bd:hover .bd-view, .bd-view:focus-visible, .bd:focus-within .bd-view { opacity: 1; }
@media (hover: none) { .bd-view { opacity: .9; } }
.bd-view:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bd-sheet > svg { display: block; width: 100%; height: auto; max-height: 420px; }
.bd-sheet text { font-family: var(--font-body); }
.bd-imgbox { position: relative; margin: 0 auto; width: 100%; max-width: 520px; max-height: 520px; overflow: hidden; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--border); }
.bd-imgbox img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.bd-img-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; color: var(--muted); font-size: 14px; text-align: center; background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 3%, transparent) 14px 28px); }
.bd-img-wait.bad { color: var(--ink-2); }
.bd-img-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: bd-img-pulse 1.1s ease-in-out infinite; }
@keyframes bd-img-pulse { 50% { opacity: .3; transform: scale(.65); } }
.bd-level { fill: none; stroke: var(--c, var(--accent)); stroke-width: 1.6; stroke-linejoin: round; }
.bd-field { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.2; stroke-linecap: round; }
.bd-imp { stroke-width: 2.6; }
.bd-surface > svg { cursor: grab; touch-action: none; max-height: 400px; }
.bd-surface > svg:active { cursor: grabbing; }
.bd-surface > svg:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.bd-3dfloor { fill: color-mix(in srgb, var(--ink) 4%, transparent); stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1; }
.bd-3dedge { stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1; fill: none; }
.bd-3dsurf path { stroke: color-mix(in srgb, #000 22%, transparent); stroke-width: .5; stroke-linejoin: round; }
.bd-3dax { stroke: var(--ink-2); stroke-width: 1.4; fill: none; stroke-linecap: round; }
.bd-3d-hint { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }
html.bdx-lock { overflow: hidden; }
.bdv { position: fixed; inset: 0; z-index: 600; display: flex; flex-direction: column; background: var(--surface); opacity: 0; transition: opacity .16s ease-out; }
.bdv.open { opacity: 1; }
.bdv-bar { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1.5px solid var(--border); }
.bdv-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); }
.bdv-b { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 20px/1 var(--font-body); cursor: pointer; }
.bdv-b:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bdv-x { margin-left: 4px; }
.bdv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; cursor: grab; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.bdv-art { width: min(100%, 1100px); transform-origin: center; }
.bdv-art > svg, .bdv-art > .bd-sheet > svg { width: 100%; height: auto; max-height: calc(100dvh - 120px); }
.bdv-art > .bd-imgbox { max-width: none; max-height: calc(100dvh - 120px); }
@media (prefers-reduced-motion: reduce) { .bd-img-dot { animation: none; } .bdv { transition: none; } }
@media (max-width: 760px) {
  .bdx-hint { display: none; }
  .bdx-top { padding-left: 16px; }
  .bdx-top h2 { flex: 1; }
  .bdx-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .bdx-plot { grid-row: 1; }
  .bdx-side { grid-row: 2; max-height: 42dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); border-right: 0; border-top: 2px solid var(--border); }
}
@media (prefers-reduced-motion: reduce) { .bdx, .bd-tools, .bd-hint { transition: none; } }
@media print { .bd-tools, .bd-hint, .bd-trace { display: none !important; } }
/* a drawing that did not come out: said plainly, not left blank */
.bb-draw-bad { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 2px dashed var(--border); border-radius: 14px; color: var(--muted); }
.bb-draw-bad p { color: var(--muted); font-size: 14.5px; }
.bb-draw-bad svg { flex: none; margin-top: 2px; }
/* code on the board */
.bb-code { position: relative; }
.bb-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); font: 500 14px/1.55 var(--font-mono, 'JetBrains Mono', ui-monospace, monospace); tab-size: 4; scrollbar-width: thin; }
.bb-code-l { display: inline-block; margin: 0 0 4px 2px; color: var(--muted); font: 700 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: .04em; }
/* a question on the board: tap an answer (or type one), see at once whether it is right, and why */
.bb-check { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border: 2px solid var(--accent-line); border-radius: 16px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.bb-chk-l { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-deep); font: 800 13px/1 var(--font-body); }
.bb-chk-q p { margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.45; }
.bb-chk-opts { display: grid; gap: 8px; }
.bb-chk-o { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 15px/1.35 var(--font-body); text-align: left; cursor: pointer; }
.bb-chk-o:hover:not([disabled]) { border-color: var(--accent); }
.bb-chk-o:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bb-chk-o[disabled] { cursor: default; }
.bb-chk-k { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font: 800 13px/1 var(--font-display); }
.bb-chk-o.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.bb-chk-o.ok .bb-chk-k { background: var(--good); color: var(--surface); }
.bb-chk-o.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.bb-chk-o.no .bb-chk-k { background: var(--bad); color: var(--surface); }
.bb-chk-in { display: flex; gap: 8px; }
.bb-chk-in .input { flex: 1; min-width: 0; min-height: 46px; }
.bb-chk-in .btn { flex: none; min-height: 46px; }
.bb-chk-fb { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.bb-chk-fb[hidden] { display: none; }
.bb-chk-fb.ok { border-left: 4px solid var(--good); }
.bb-chk-fb.no { border-left: 4px solid var(--bad); }
.bb-chk-fb .res { color: var(--ink); font: 800 15px/1.3 var(--font-body); }
.bb-chk-fb.ok .res { color: var(--good); }
.bb-chk-fb p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.bb-chk-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-chk-acts .btn { min-height: 40px; }
@media (pointer: coarse) { .bb-chk-acts .btn { min-height: 44px; } }
.bd-anim .bd-ink { stroke-dasharray: 1; stroke-dashoffset: 1; animation: bd-ink .85s cubic-bezier(.45, 0, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 170ms + 100ms); }
.bd-anim .bd-pop { opacity: 0; animation: bd-pop .35s ease-out forwards; animation-delay: calc(var(--i, 0) * 170ms + 520ms); }
.bd-anim .bd-fill { animation-delay: calc(var(--i, 0) * 170ms + 300ms); }
.bd-anim .bd-table-wrap { animation: bd-pop .5s ease-out both; }
@keyframes bd-ink { to { stroke-dashoffset: 0; } }
@keyframes bd-pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bo-msg.typing i, .bo-loading i, .bb-new, .bb-writing svg, .bb-flash, .bd-anim .bd-ink, .bd-anim .bd-pop, .bd-anim .bd-table-wrap { animation: none; opacity: 1; stroke-dashoffset: 0; } .bb-fold svg { transition: none; } }
html[data-motion="off"] :is(.bo-msg.typing i, .bo-loading i, .bb-new, .bb-writing svg, .bb-flash) { animation: none; }
html[data-motion="off"] .bd-anim :is(.bd-ink, .bd-pop, .bd-table-wrap) { animation: none; opacity: 1; stroke-dashoffset: 0; }

/* ---------- Talk with Bo: the call (assets/talk.js) ----------
   The whole screen is the board you share (assets/bo-pad.js). Before the call a night sky covers it with Bo large in
   the middle on a pale disc; once you are talking the sky lifts and Bo moves to a tile in the corner, three rings behind
   him moving with whoever is talking (blue for you, pine for him; still when motion is off). The call's round buttons
   sit in a dark dock at the bottom, the board's tools on the left (along the bottom on a phone), his pages are paper
   cards on the board, and captions run over it like a video's: white on black, two lines, the words as they are said. */
.bo-talk-btn { flex: none; gap: 8px; }
.bo-mic { flex: none; width: 44px; height: 44px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-deep); }
.bo-mic:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent)); color: var(--ink); }
.bo-tool.on { background: var(--accent-soft); color: var(--accent-deep); }
.bo-msg.live .bo-text > :last-child::after { content: ""; display: inline-block; width: 8px; height: 1em; margin-left: 3px; vertical-align: -2px; border-radius: 2px; background: var(--accent); animation: bo-caret 1s steps(1) infinite; }
@keyframes bo-caret { 50% { opacity: 0; } }
@media (max-width: 620px) { .bo-talk-btn { display: none; } }   /* phones: the mic in the message box starts the call */

html.bt-lock, html.bt-lock body { overflow: hidden; }
html.bt-lock .toast { z-index: 95; }
.bt { --lvl: 0; --ring: #7DB8FF; --bt-ink: #F4F7FB; --bt-mute: rgba(226, 234, 245, .72); --bt-glass: rgba(255, 255, 255, .1); --bt-glass-2: rgba(255, 255, 255, .18); --bt-line: rgba(255, 255, 255, .16); --bt-you: #9CCBFF; --bt-bo: #5BD08A;
  --bt-dock: rgba(10, 22, 44, .92); --bt-dock-line: rgba(255, 255, 255, .08); --bar-h: 92px;
  position: fixed; inset: 0; z-index: 90; overflow: hidden; color: var(--bt-ink); color-scheme: dark; background: #0A162C; opacity: 0; transition: opacity .28s cubic-bezier(.16, 1, .3, 1); }
.bt.open { opacity: 1; }
.bt ::selection { background: #7DB8FF; color: #0A162C; }
.bt a { color: #9CCBFF; text-underline-offset: 3px; }
/* the board under everything; the night sky over it until the call is on */
.bt-pad { position: absolute; inset: 0; z-index: 0; }
.bt-pad .wb { position: absolute; inset: 0; }
.bt-scrim { position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(1.5px 1.5px at 14% 16%, rgba(255, 255, 255, .55), transparent 70%), radial-gradient(1px 1px at 31% 9%, rgba(255, 255, 255, .45), transparent 70%),
    radial-gradient(1.5px 1.5px at 72% 13%, rgba(255, 255, 255, .5), transparent 70%), radial-gradient(1px 1px at 86% 27%, rgba(255, 255, 255, .4), transparent 70%),
    radial-gradient(1px 1px at 8% 44%, rgba(255, 255, 255, .35), transparent 70%), radial-gradient(1.5px 1.5px at 93% 52%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(90% 62% at 50% 34%, #214476 0%, #142B4E 46%, #0A162C 100%);
  transition: opacity .55s cubic-bezier(.16, 1, .3, 1), visibility .55s; }
.bt[data-state="live"] .bt-scrim { opacity: 0; visibility: hidden; pointer-events: none; }
.bt:not([data-state="live"]) .wb-tools, .bt:not([data-state="live"]) .bt-caps { visibility: hidden; }

/* the top: the class, the clock, Bo's pages, captions and settings; over the board, only its buttons take taps */
.bt-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 14px 0 16px; pointer-events: none; }
.bt-top > * { pointer-events: auto; }
.bt-class { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; background: var(--cc, #1D63D6); color: var(--cc-ink, #fff); font: 800 13.5px/1 var(--font-display); box-shadow: 0 4px 14px rgba(10, 22, 44, .22); }
.bt-clock { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--bt-glass); color: var(--bt-ink); font: 700 13.5px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.bt[data-state="live"] .bt-clock { background: var(--bt-dock); box-shadow: 0 4px 14px rgba(10, 22, 44, .22); }
.bt-clock:has(#bt-clock-t:empty) { display: none; }
.bt-clock i { width: 8px; height: 8px; border-radius: 50%; background: #FFC629; }
.bt[data-state="live"] .bt-clock i { background: var(--bt-bo); box-shadow: 0 0 0 3px rgba(91, 208, 138, .25); }
.bt-spacer { flex: 1; pointer-events: none; }
.bt-icon { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bt-glass); color: var(--bt-ink); cursor: pointer; }
.bt[data-state="live"] .bt-top .bt-icon { background: var(--bt-dock); box-shadow: 0 4px 14px rgba(10, 22, 44, .22); }
.bt-icon:hover, .bt[data-state="live"] .bt-top .bt-icon:hover { background: #1E3457; }
.bt-icon[aria-expanded="true"], .bt[data-state="live"] .bt-top .bt-icon[aria-expanded="true"] { background: var(--bt-ink); color: #0A162C; }
.bt-icon[hidden] { display: none; }
.bt-icon.sm { width: 32px; height: 32px; background: transparent; color: inherit; opacity: .7; }
/* captions on: a red bar under CC, as in a video player */
.bt-cc::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 9px; height: 3px; border-radius: 2px; background: #FF3B30; transform: scaleX(0); transition: transform .15s ease-out; }
.bt-cc[aria-pressed="true"]::after { transform: scaleX(1); }
.bt-pages-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bt-bo); color: #0A162C; font: 800 11px/18px var(--font-body); text-align: center; }
.bt-pages-n:empty { display: none; }
.bt-icon:focus-visible, .bt-orb:focus-visible, .bt-btn:focus-visible .bt-btn-ic, .bt-btn:focus-within .bt-btn-ic { outline: 3px solid #9CCBFF; outline-offset: 3px; }

/* Bo: large in the middle before the call; a tile in the corner once you are talking */
.bt-stage { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 22px; padding: calc(64px + env(safe-area-inset-top)) 20px calc(var(--bar-h) + 24px); overflow-y: auto; }
.bt[data-state="live"] .bt-stage { pointer-events: none; overflow: visible; }
.bt-who { display: flex; flex-direction: column; align-items: center; }
.bt-orb { position: relative; width: 196px; height: 196px; margin-bottom: 16px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: width .35s cubic-bezier(.16, 1, .3, 1), height .35s cubic-bezier(.16, 1, .3, 1); }
.bt-face { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #FFFFFF 0%, #E6F0FC 70%, #CFE0F6 100%); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); transform: scale(calc(1 + var(--lvl) * .035)); }
.bt-face svg { width: 70%; height: 70%; }
.bt-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--ring); opacity: 0; transition: opacity .3s ease-out, background-color .3s ease-out; }
.bt-ring.r1 { z-index: 3; transform: scale(calc(1.07 + var(--lvl) * .2)); }
.bt-ring.r2 { z-index: 2; transform: scale(calc(1.17 + var(--lvl) * .42)); }
.bt-ring.r3 { z-index: 1; transform: scale(calc(1.28 + var(--lvl) * .7)); }
.bt[data-state="live"] .bt-ring.r1 { opacity: .3; }
.bt[data-state="live"] .bt-ring.r2 { opacity: .16; }
.bt[data-state="live"] .bt-ring.r3 { opacity: .08; }
.bt[data-who="bo"], .bt[data-voice="bo"] { --ring: var(--bt-bo); }
.bt[data-who="you"] { --ring: var(--bt-you); }
.bt[data-who="muted"] .bt-ring { opacity: 0 !important; }
.bt[data-who="muted"] .bt-face { filter: saturate(.4); opacity: .8; }
.bt[data-who="thinking"] .bt-ring.r1 { opacity: .55; background: none; border: 3px dashed #FFC629; animation: bt-turn 2.4s linear infinite; }
.bt[data-state="connecting"] .bt-ring { background: var(--bt-ink); animation: bt-call 1.8s cubic-bezier(.16, 1, .3, 1) infinite; }
.bt[data-state="connecting"] .bt-ring.r2 { animation-delay: .3s; }
.bt[data-state="connecting"] .bt-ring.r3 { animation-delay: .6s; }
@keyframes bt-call { 0% { opacity: .35; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes bt-turn { to { transform: scale(1.1) rotate(360deg); } }
.bt[data-state="error"] .bt-face, .bt[data-state="ended"] .bt-face { filter: grayscale(.6); opacity: .75; }
.bt-name { margin: 0; font: 800 28px/1.1 var(--font-display); letter-spacing: -.01em; }
.bt-status { min-height: 1.4em; margin: 4px 0 0; color: var(--bt-mute); font-size: 15px; text-align: center; }
.bt[data-state="live"] .bt-who { position: absolute; top: calc(66px + env(safe-area-inset-top)); right: 18px; flex-direction: row-reverse; gap: 12px; pointer-events: auto; animation: bt-tile .5s cubic-bezier(.16, 1, .3, 1); }
.bt[data-state="live"] .bt-orb { width: 64px; height: 64px; margin: 0; }
.bt[data-state="live"] .bt-face { box-shadow: 0 6px 18px rgba(10, 22, 44, .3); }
.bt[data-state="live"] .bt-name { display: none; }
.bt[data-state="live"] .bt-status { min-height: 0; margin: 0; padding: 7px 13px; border-radius: 999px; background: var(--bt-dock); color: var(--bt-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 14px rgba(10, 22, 44, .22); }
.bt[data-state="live"] .bt-status:empty { display: none; }
@keyframes bt-tile { from { opacity: 0; transform: scale(.6); } }

/* first call, a call that could not connect, a call that ended: a card under Bo; on a call, a photo waiting to go */
.bt-extra { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(560px, 100%); }
.bt-extra:empty { display: none; }
.bt[data-state="live"] .bt-extra { position: absolute; left: 50%; bottom: calc(var(--bar-h) + 104px + env(safe-area-inset-bottom)); width: auto; max-width: calc(100% - 32px); transform: translateX(-50%); pointer-events: auto; }
.bt-hello, .bt-msg { width: 100%; padding: 18px 20px 20px; border: 1px solid var(--bt-line); border-radius: 22px; background: rgba(255, 255, 255, .07); text-align: left; }
.bt-free { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 198, 41, .14); color: #FFE08A !important; }
.bt-free b { color: #FFE08A; }
:root .bt .bt-hello h3 { margin: 0 0 6px; font: 800 21px/1.2 var(--font-display) !important; color: var(--bt-ink); }
.bt-hello p, .bt-msg p { margin: 0 0 10px; color: rgba(236, 242, 250, .86); line-height: 1.5; }
.bt-hello b { color: var(--bt-ink); }
.bt-hello .btn { width: 100%; justify-content: center; margin-top: 6px; }
.bt-fine { color: var(--bt-mute) !important; font-size: 13px; line-height: 1.5; }
.bt-msg { text-align: center; }
.bt-msg-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bt-chip { min-height: 44px; padding: 0 16px; cursor: pointer; font-size: 14.5px; }
.bt-photo { display: inline-flex; align-items: center; gap: 10px; padding: 6px; border-radius: 16px; background: var(--bt-dock); font-size: 13.5px; box-shadow: 0 6px 20px rgba(10, 22, 44, .3); }
.bt-photo img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; }

/* captions, as in a video player: white on black, centred over the bottom of the board, two lines that roll up */
.bt-caps { --cc-fs: 24px; position: absolute; left: 50%; bottom: calc(var(--bar-h) + 22px + env(safe-area-inset-bottom)); z-index: 4; width: min(900px, calc(100% - 32px)); transform: translateX(-50%); pointer-events: none; text-align: center; transition: opacity .6s ease-out, bottom .2s ease-out; }
.bt.typing .bt-caps { bottom: calc(var(--bar-h) + 84px + env(safe-area-inset-bottom)); }
.bt-caps.off, .bt-caps.idle { opacity: 0; }
.bt-caps.off { display: none; }
.cc-win { display: flex; flex-direction: column; justify-content: flex-end; max-height: calc(var(--cc-fs) * 1.5 * 2 + 1px); overflow: hidden; }
.cc-cue { flex: none; margin: 0; font: 600 var(--cc-fs)/1.5 var(--font-body); letter-spacing: .005em; text-wrap: pretty; }
.cc-t { padding: .08em .38em; border-radius: 3px; background: rgba(8, 8, 8, .75); color: #FFFFFF; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cc-who { margin-right: .1em; font-weight: 800; }
.cc-bo .cc-who { color: #69DB7C; }
.cc-you .cc-who { color: #9CCBFF; }
.bt[data-cc-bg="solid"] .cc-t { background: #000000; }
.bt[data-cc-bg="outline"] .cc-t { background: none; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 4px #000, 0 2px 8px rgba(0, 0, 0, .8); }
.bt[data-cc-size="s"] .bt-caps { --cc-fs: 18px; }
.bt[data-cc-size="l"] .bt-caps { --cc-fs: 31px; }
.bt[data-cc-size="xl"] .bt-caps { --cc-fs: 40px; }

/* typing to Bo, over the dock */
.bt-type { position: absolute; left: 50%; bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom)); z-index: 6; display: flex; gap: 8px; width: min(640px, calc(100% - 32px)); transform: translateX(-50%); }
.bt-type[hidden] { display: none; }
.bt-type .input { flex: 1; min-width: 0; min-height: 50px; font-size: 16px; border-radius: 16px; box-shadow: 0 8px 26px rgba(10, 22, 44, .25); }
.bt-type .btn { width: 54px; min-height: 50px; padding: 0; justify-content: center; border-radius: 16px; }
/* the dock: the call's buttons */
.bt-bar { position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 2.4vw, 18px); padding: 10px clamp(12px, 3vw, 20px) 9px; border: 1px solid var(--bt-dock-line); border-radius: 28px; background: var(--bt-dock); box-shadow: 0 12px 34px rgba(10, 22, 44, .34); transform: translateX(-50%); }
.bt:not([data-state="live"]) .bt-bar { background: rgba(10, 22, 44, .45); box-shadow: none; }
.bt-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 56px; padding: 0; border: 0; background: none; color: var(--bt-mute); font: 700 12px/1 var(--font-body); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bt-btn-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--bt-glass-2); color: var(--bt-ink); transition: transform .1s ease-out, background-color .15s ease-out; }
.bt-btn:hover .bt-btn-ic { background: rgba(255, 255, 255, .26); }
.bt-btn:active .bt-btn-ic { transform: scale(.94); }
.bt-btn[disabled] { cursor: default; opacity: .45; }
.bt-btn[aria-pressed="true"] .bt-btn-ic, .bt-btn[aria-expanded="true"] .bt-btn-ic { background: var(--bt-ink); color: #0A162C; }
.bt-look .bt-btn-ic { background: #1A64D6; color: #fff; }
.bt-look:hover .bt-btn-ic { background: #2B73E3; }
.bt-end .bt-btn-ic { background: #F2564B; color: #fff; }
.bt-end:hover .bt-btn-ic { background: #E0473C; }

/* the settings and Bo's pages: cards under the top bar */
.bt-set, .bt-pages { position: absolute; top: calc(62px + env(safe-area-inset-top)); right: 14px; z-index: 7; width: min(360px, calc(100% - 28px)); max-height: calc(100dvh - var(--bar-h) - 110px); overflow-y: auto; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--ink); color-scheme: light dark; box-shadow: 0 18px 50px rgba(0, 0, 0, .4); }
.bt-set[hidden], .bt-pages[hidden] { display: none; }
.bt-set .bt-fine { color: var(--muted) !important; margin: 6px 0 0; }
.bt-set-h { margin: 16px 0 8px; font: 800 15px/1.2 var(--font-display) !important; color: var(--ink); }
.bt-set-h:first-child { margin-top: 0; }
.bt-set-l { display: block; margin: 10px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bt-set select { width: 100%; }
.bt-opts { display: flex; flex-direction: column; gap: 2px; }
.bt-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 12px; cursor: pointer; font-size: 14.5px; }
.bt-opt:hover { background: var(--surface-2); }
.bt-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.bt-speed { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-switch { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; cursor: pointer; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.bt-switch input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.bt-switch b { display: block; color: var(--ink); }
.bt-cc-opts[hidden] { display: none; }
.bt-set #bt-try { margin-top: 14px; }
.bt-pages ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bt-page-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 600 14.5px/1.3 var(--font-body); text-align: left; cursor: pointer; }
.bt-page-i:hover { background: var(--surface-2); }
.bt-page-i svg { flex: none; color: var(--accent); }
.bt-page-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-page-i em { color: var(--muted); font-size: 12.5px; font-style: normal; }

/* Bo's pages on the board: paper cards, light on either board */
.bt-card { width: 420px; --surface: #FFFFFF; --surface-2: #F0F4F9; --ink: #0D1626; --ink-2: #33415C; --muted: #5B6B82; --border: #E1E7EF; --lip: #0A162C; --accent: #1A64D6; --accent-deep: #1450B0; --accent-soft: #E3EEFD; --accent-line: #A9C8F5; --pine: #22A447; --good: #137036; --gold: #8A5C00; --gold-soft: #FFF4D1; --coral: #F2564B; --bad: #C92A2A; --warn: #B76E00;
  border-color: #D5DEEA; color: var(--ink); color-scheme: light; box-shadow: 0 14px 36px rgba(13, 22, 38, .18); }
.bt-card .bb-sheet { max-height: none; }
.bt-card .bb-math { font-size: 21px; }
.bt-card .bb-answer .bb-math { font-size: 23px; }
.bt-card .bd > svg { max-height: 420px; }
.bt-card .bd-cap { font-size: 15.5px; }
.bt-card.folded .bb-sheet { display: none; }
.bt-card.folded .bb-bar { border-bottom: 0; }
.bt-card .bb-name { font-size: 13.5px; }

@media (max-width: 760px) {
  .bt { --bar-h: 84px; }
  .bt-orb { width: 128px; height: 128px; margin-bottom: 10px; }
  .bt-name { font-size: 22px; }
  .bt-stage { gap: 16px; }
  .bt-top { gap: 6px; padding-left: 12px; padding-right: 10px; }
  .bt-icon { width: 42px; height: 42px; }
  .bt[data-state="live"] .bt-who { top: calc(62px + env(safe-area-inset-top)); right: 12px; gap: 8px; }
  .bt[data-state="live"] .bt-orb { width: 52px; height: 52px; }
  .bt[data-state="live"] .bt-status { padding: 6px 10px; font-size: 12.5px; }
  .bt-bar { left: 8px; right: 8px; justify-content: space-around; gap: 0; padding: 8px 6px 7px; transform: none; border-radius: 24px; }
  .bt-btn { min-width: 0; flex: 1; font-size: 11px; }
  .bt-btn-ic { width: 50px; height: 50px; }
  .bt-caps { --cc-fs: 18px; bottom: calc(var(--bar-h) + 78px + env(safe-area-inset-bottom)); }
  .bt[data-cc-size="s"] .bt-caps { --cc-fs: 15px; }
  .bt[data-cc-size="l"] .bt-caps { --cc-fs: 22px; }
  .bt[data-cc-size="xl"] .bt-caps { --cc-fs: 27px; }
  .bt.typing .bt-caps { bottom: calc(var(--bar-h) + 138px + env(safe-area-inset-bottom)); }
  .bt[data-state="live"] .bt-extra { bottom: calc(var(--bar-h) + 150px + env(safe-area-inset-bottom)); }
  .bt-type { bottom: calc(var(--bar-h) + 72px + env(safe-area-inset-bottom)); }
  .bt-card { width: 340px; }
  .bt-card .bb-math { font-size: 19px; }
}
@media (max-height: 640px) { .bt-orb { width: 128px; height: 128px; } .bt-stage { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .bt, .bt-orb, .bt-ring, .bt-face, .bt-btn-ic, .bt-scrim, .bt-caps { transition: none; } .bt-ring, .bo-msg.live .bo-text > :last-child::after { animation: none !important; } .bt-face { transform: none; } .bt[data-state="live"] .bt-who { animation: none; } }
html[data-motion="off"] :is(.bt, .bt-orb, .bt-ring, .bt-face, .bt-btn-ic, .bt-scrim, .bt-caps) { transition: none; }
html[data-motion="off"] .bt-ring, html[data-motion="off"] .bt[data-state="live"] .bt-who { animation: none !important; }
html[data-motion="off"] .bt-face { transform: none; }

/* ---------- the shared board (assets/bo-pad.js): squared paper you write on, its tools in a dark dock ---------- */
.wb { --wb-bg: #FBFCFE; --wb-c: #0D1626; position: relative; overflow: hidden; background: var(--wb-bg); color-scheme: light; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.wb.dark { --wb-bg: #13213A; color-scheme: dark; }
.wb-ink { position: absolute; inset: 0; display: block; touch-action: none; cursor: crosshair; }
.wb[data-tool="eraser"] .wb-ink { cursor: cell; }
.wb[data-tool="text"] .wb-ink { cursor: text; }
.wb[data-tool="hand"] .wb-ink { cursor: grab; }
.wb.panning .wb-ink { cursor: grabbing; }
.wb-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; }
.wb-card { position: absolute; pointer-events: auto; touch-action: pan-y; -webkit-user-select: text; user-select: text; }
.wb-card .bb-bar { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.wb-card.dragging { box-shadow: 0 22px 50px rgba(13, 22, 38, .28); }
.wb-card.dragging .bb-bar { cursor: grabbing; }
.wb-card[hidden] { display: none; }
.wb-tools { position: absolute; z-index: 3; left: 14px; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; background: rgba(10, 22, 44, .92); box-shadow: 0 12px 34px rgba(10, 22, 44, .3); transform: translateY(-50%); }
.wb-b { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: none; color: #DCE5F2; cursor: pointer; }
.wb-b span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wb-b:hover { background: rgba(255, 255, 255, .1); }
.wb-b[aria-pressed="true"] { background: #F4F7FB; color: #0A162C; }
.wb-b:disabled { opacity: .35; cursor: default; background: none; }
.wb-b:focus-visible { outline: 3px solid #9CCBFF; outline-offset: 1px; }
.wb-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--wb-c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 3px rgba(10, 22, 44, .5); }
.wb-sep { flex: none; width: 24px; height: 1px; margin: 3px 0; background: rgba(255, 255, 255, .16); }
.wb-pop { position: absolute; z-index: 4; width: 228px; padding: 12px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(10, 22, 44, .3); }
.wb-pop[hidden] { display: none; }
.wb-swatches, .wb-sizes { display: flex; justify-content: space-between; gap: 6px; }
.wb-sizes { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); justify-content: flex-start; }
.wb-sw { width: 34px; height: 34px; padding: 0; border: 3px solid transparent; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px var(--surface); cursor: pointer; }
.wb.dark .wb-sw { background: var(--sw-d); }
.wb-sw[aria-checked="true"] { border-color: var(--accent); }
.wb-sz { display: grid; place-items: center; width: 44px; height: 36px; padding: 0; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.wb-sz i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--wb-c); }
.wb-sz[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.wb-sw:focus-visible, .wb-sz:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wb-tin { position: absolute; z-index: 3; }
.wb-tin textarea { display: block; min-width: 120px; padding: 0 4px; border: 2px dashed var(--accent, #1A64D6); border-radius: 6px; background: rgba(255, 255, 255, .92); font: 600 26px/1.25 var(--font-body); white-space: pre; resize: none; overflow: hidden; outline: none; }
.wb.dark .wb-tin textarea { background: rgba(19, 33, 58, .92); }
/* in a call, the tools stay clear of the dock */
.bt .wb-tools { top: calc(50% - 20px); }
@media (max-width: 760px) {
  .wb-tools { left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: flex-start; gap: 0; padding: 4px; overflow-x: auto; scrollbar-width: none; transform: none; }
  .wb-tools::-webkit-scrollbar { display: none; }
  .wb-b { flex: none; width: 40px; height: 40px; }
  .wb-sep { width: 1px; height: 22px; margin: 0 3px; }
  .bt .wb-tools { top: auto; bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom)); }
}

/* "Write it out" in the chat: the board on the whole screen */
html.wb-lock, html.wb-lock body { overflow: hidden; }
.wb-sheet { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); }
.wb-sheet-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top)) 14px 10px 18px; border-bottom: 2px solid var(--border); }
.wb-sheet-top h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 800 18px/1.2 var(--font-display); }
.wb-sheet-top h2 svg { color: var(--accent); }
.wb-sheet-top p { margin: 0; color: var(--muted); font-size: 14px; }
.wb-sheet-sp { flex: 1; }
.wb-sheet-b { position: relative; flex: 1; min-height: 0; }
.wb-sheet-b .wb { position: absolute; inset: 0; }
@media (max-width: 760px) { .wb-sheet-top p { display: none; } .wb-sheet-top h2 { flex: 1 1 100%; font-size: 16px; } .wb-sheet-top .btn { flex: 1; justify-content: center; } .wb-sheet-sp { display: none; } }

/* ---------- Bo on every page (assets/bo-float.js) ----------
   He floats in the bottom corner (above the tab bar on phones), bobbing gently; drag him anywhere, he settles on
   the nearer side. A tap opens his panel: a card above the corner on wide screens, a sheet from the bottom on
   phones. What he sees is one chip you can switch off; the ways in are chips; his board pages sit in the answer. */
.bf-fab { position: fixed; right: 18px; bottom: 18px; z-index: 58; display: flex; align-items: center; gap: 0; height: 64px; min-width: 64px; padding: 0; border: 2px solid var(--accent-line); border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--ink) 45%, transparent), 0 2px 6px color-mix(in srgb, var(--ink) 10%, transparent); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; transition: box-shadow .2s ease-out, border-color .2s ease-out; }
.bf-fab[hidden] { display: none; }
.bf-fab.left { right: auto; left: 18px; flex-direction: row-reverse; }
.bf-fab-av { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); overflow: visible; animation: bf-float 3.8s ease-in-out infinite; }
.bf-fab-av .bobcat { width: 54px; height: 54px; margin-top: -8px; filter: none; }
.bf-fab-l { max-width: 0; overflow: hidden; white-space: nowrap; font: 800 15px/1 var(--font-display); color: var(--accent-deep); transition: max-width .25s cubic-bezier(.2, .8, .2, 1), padding .25s; }
.bf-fab:hover, .bf-fab:focus-visible { border-color: var(--accent); box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 55%, transparent); }
@media (hover: hover) { .bf-fab:hover .bf-fab-l, .bf-fab:focus-visible .bf-fab-l { max-width: 90px; padding: 0 14px 0 6px; } .bf-fab.left:hover .bf-fab-l, .bf-fab.left:focus-visible .bf-fab-l { padding: 0 6px 0 14px; } }
.bf-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bf-fab.dragging { cursor: grabbing; transition: none; box-shadow: 0 22px 40px -12px color-mix(in srgb, var(--ink) 50%, transparent); }
.bf-fab.dragging .bf-fab-av { animation: none; transform: scale(1.08) rotate(-6deg); }
.bf-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border: 2px solid var(--surface); border-radius: 50%; background: var(--bad); transform: scale(0); transition: transform .2s; }
.bf-fab.left .bf-dot { right: auto; left: 2px; }
.bf-fab.unread .bf-dot { transform: scale(1); }
@keyframes bf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 900px) { .bf-fab { bottom: calc(80px + env(safe-area-inset-bottom)); right: 14px; height: 58px; min-width: 58px; } .bf-fab.left { left: 14px; } .bf-fab-av { width: 54px; height: 54px; } .bf-fab-av .bobcat { width: 48px; height: 48px; } }
body:has(.lesson-foot) .bf-fab { bottom: 108px; }
@media (max-width: 640px) { body:has(.lesson-foot) .bf-fab { bottom: 162px; } }
html.bt-lock .bf-fab, html.bt-lock .bf-pop, html.bt-lock .bf-tip, html.bt-lock .bf-sel { display: none !important; }
/* a nudge beside him */
.bf-tip { position: fixed; right: 92px; bottom: 30px; z-index: 58; display: flex; align-items: center; gap: 2px; max-width: min(300px, calc(100vw - 120px)); padding: 4px 4px 4px 2px; border: 2px solid var(--accent-line); border-radius: 16px 16px 4px 16px; background: var(--surface); box-shadow: var(--shadow); animation: bf-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.bf-tip.left { right: auto; left: 92px; border-radius: 16px 16px 16px 4px; }
.bf-tip[hidden] { display: none; }
.bf-tip-b { padding: 6px 8px 6px 10px; border: 0; background: none; color: var(--ink); font: 600 14px/1.35 var(--font-body); text-align: left; cursor: pointer; }
.bf-tip-x { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.bf-tip-x:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) { .bf-tip { bottom: calc(92px + env(safe-area-inset-bottom)); right: 82px; } .bf-tip.left { left: 82px; } }
@keyframes bf-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
/* the panel: a card in the corner, or a sheet on a phone */
.bf-back { position: fixed; inset: 0; z-index: 74; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.bf-back[hidden] { display: none; }
.bf-pop { position: fixed; right: 18px; bottom: 18px; z-index: 75; display: flex; flex-direction: column; width: min(420px, calc(100vw - 36px)); height: min(640px, calc(100dvh - 104px)); border: 2px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 24px 60px -18px color-mix(in srgb, var(--ink) 50%, transparent); overflow: hidden; opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right; transition: opacity .18s ease-out, transform .22s cubic-bezier(.2, .8, .2, 1); }
.bf-pop.left { right: auto; left: 18px; transform-origin: bottom left; }
.bf-pop.open { opacity: 1; transform: none; }
.bf-pop[hidden] { display: none; }
.bf-grab { display: none; }
.bf-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 14px; border-bottom: 2px solid var(--border); }
.bf-av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); }
.bf-av .bobcat { filter: none; }
.bf-ttl { flex: 1; min-width: 0; }
.bf-ttl h2 { margin: 0; font: 800 18px/1.15 var(--font-display); color: var(--ink); }
.bf-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.bf-ic:hover:not([disabled]) { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.bf-ic:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.bf-ic[disabled] { opacity: .4; cursor: default; }
.bf-ctx { padding: 8px 12px 0; }
.bf-see { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 10px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--muted); font: 600 13px/1.3 var(--font-body); text-align: left; cursor: pointer; }
.bf-see span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-see.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-deep); }
.bf-see b { color: var(--ink); font-weight: 700; }
.bf-see:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.bf-sw { position: relative; flex: none; width: 30px; height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.bf-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.bf-see.on .bf-sw { background: var(--accent); }
.bf-see.on .bf-sw::after { transform: translateX(12px); }
.bf-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 6px; scrollbar-width: thin; }
.bf-hi { display: flex; gap: 10px; align-items: flex-start; }
.bf-hi-av { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); }
.bf-hi-av .bobcat, .bf-mini-av .bobcat, .bf-sel-av .bobcat, .bf-pointbar-av .bobcat { filter: none; }
.bf-hi p { margin: 0; padding: 10px 12px; border: 2px solid var(--border); border-radius: 4px 16px 16px 16px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.bf-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0 48px; }
.bf-item { position: relative; min-width: 46px; min-height: 40px; padding: 0 10px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: 800 14px/1 var(--font-display); font-variant-numeric: tabular-nums; cursor: pointer; }
.bf-item:hover { border-color: var(--accent); color: var(--accent-deep); }
.bf-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.bf-item i { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border: 2px solid var(--surface); border-radius: 50%; }
.bf-item.wrong { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); } .bf-item.wrong i { background: var(--bad); }
.bf-item.right i { background: var(--good); }
.bf-item.answered { background: var(--surface-2); }
.bf-acts { display: grid; gap: 6px; margin: 12px 0 0 48px; }
.bf-act { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 12px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 14.5px/1.3 var(--font-body); text-align: left; cursor: pointer; }
.bf-act svg { flex: none; color: var(--accent-deep); }
.bf-act:hover { border-color: var(--accent); background: var(--accent-soft); }
.bf-act:focus-visible, .bf-pointer:focus-visible, .bf-mini:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.bf-pointer { display: flex; align-items: center; gap: 9px; width: calc(100% - 48px); margin: 8px 0 0 48px; padding: 9px 12px; border: 2px dashed var(--accent-line); border-radius: 12px; background: none; color: var(--accent-deep); font: 500 14px/1.35 var(--font-body); text-align: left; cursor: pointer; }
.bf-pointer b { color: var(--accent-deep); }
.bf-pointer:hover { border-style: solid; background: var(--accent-soft); }
.bf-pointer svg { flex: none; }
.bf-tipline { margin: 12px 0 4px 48px; color: var(--muted); font-size: 13px; }
.bf-page { margin: 4px 0 12px; padding: 10px; border: 2px dashed var(--accent-line); border-radius: 14px; }
.bf-page-h { display: flex; gap: 7px; margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.bf-page-h svg { flex: none; margin-top: 3px; color: var(--accent-deep); }
.bf-page-h b { color: var(--ink); }
.bf-page .bf-items, .bf-page .bf-acts { margin-left: 0; margin-top: 8px; }
/* the conversation */
.bf-msg { display: flex; gap: 8px; margin: 0 0 12px; }
.bf-msg.you { justify-content: flex-end; }
.bf-mini-av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); }
.bf-bub { min-width: 0; max-width: 100%; padding: 9px 12px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.bf-msg.you .bf-bub { max-width: 86%; border-bottom-right-radius: 5px; background: var(--accent); color: var(--accent-ink, #fff); }
.bf-msg.you .bf-bub p { margin: 0; }
.bf-msg.bo .bf-bub { flex: 1; border: 2px solid var(--border); border-top-left-radius: 5px; color: var(--ink); }
.bf-msg.err .bf-bub { border-color: var(--coral, #e5533d); }
.bf-msg.err .bf-bub p { margin: 0 0 8px; }
.bf-say p, .bf-say ul, .bf-say ol { margin: 0 0 8px; } .bf-say > :last-child { margin-bottom: 0; }
.bf-say ul, .bf-say ol { padding-left: 20px; }
.bf-flow > * + * { margin-top: 10px; }
.bf-board { margin: 0 -4px; border: 2px solid var(--border); border-radius: 14px; overflow: hidden; }
.bf-board .bb-bar { display: none; }
.bf-board .bb-sheet { max-height: none; padding: 12px 12px 14px; border-radius: 12px; }
.bf-board .bb-title { font-size: 17px; margin-bottom: 10px; }
.bf-board .bb-items { gap: 10px; }
.bf-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.bf-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bo-dot 1s ease-in-out infinite; }
.bf-dots i:nth-child(2) { animation-delay: .15s; } .bf-dots i:nth-child(3) { animation-delay: .3s; }
.bf-msg.bo:not(.typing) .bf-dots { display: none; }
.bf-tools { display: flex; justify-content: flex-end; margin-top: 4px; }
.bf-tool { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.bf-tool:hover { background: var(--surface-2); color: var(--ink); }
.bf-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.bf-next { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px 40px; }
.bf-mini { min-height: 34px; padding: 0 11px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--font-body); cursor: pointer; }
.bf-mini:hover { border-color: var(--accent); color: var(--accent-deep); }
@media (pointer: coarse) { .bf-mini { min-height: 40px; } .bf-act { min-height: 46px; } }
/* what goes with the question, and the box */
.bf-compose { padding: 8px 10px 8px; border-top: 2px solid var(--border); background: var(--surface); }
.bf-compose.off .bf-row, .bf-compose.off .bf-chips { opacity: .5; pointer-events: none; }
.bf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bf-chips[hidden] { display: none; }
.bf-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 34px; padding: 4px 4px 4px 9px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 13px; line-height: 1.3; }
.bf-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bf-chip b { color: var(--accent-deep); }
.bf-chip svg { flex: none; color: var(--accent-deep); }
.bf-chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.bf-chip button { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.bf-chip button:hover { background: var(--surface); color: var(--ink); }
.bf-quick { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.bf-row { display: flex; align-items: flex-end; gap: 4px; }
.bf-q { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; padding: 10px 12px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); font: 15px/1.4 var(--font-body); resize: none; }
.bf-q:focus { outline: none; border-color: var(--accent); }
.bf-send { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; display: grid; place-items: center; }
.bf-foot { margin: 6px 2px 0; color: var(--muted); font-size: 11.5px; text-align: center; }
/* sign in, Max, consent: fitted to the panel */
.bf-gate { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px 12px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.bf-gate p { margin: 0; }
.bf-gate-h { color: var(--ink); font: 800 19px/1.25 var(--font-display) !important; }
.bf-gate-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bf-perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bf-perks li { display: flex; gap: 10px; align-items: flex-start; }
.bf-perks svg { flex: none; margin-top: 3px; color: var(--accent-deep); }
.bf-consent .bo-gate { padding: 4px 0 8px; gap: 10px; }
.bf-consent .bo-gate-av { width: 72px; height: 72px; border-radius: 22px; }
.bf-consent .bo-gate-av svg { width: 60px; height: 60px; }
.bf-consent .bo-gate h2 { font-size: 20px; }
.bf-consent .bo-gate p { font-size: 14px; text-align: left; }
/* point at it */
html.bf-pointing, html.bf-pointing * { cursor: crosshair !important; }
.bf-pointbar { position: fixed; left: 50%; top: 12px; z-index: 90; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 8px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font: 600 14px/1.3 var(--font-body); transform: translateX(-50%); animation: bf-in .25s ease-out both; }
.bf-pointbar .btn { flex: none; }
.bf-pointbar-av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); }
.bf-hl { position: fixed; z-index: 89; border: 3px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none; transition: all .08s ease-out; }
.bf-hl[hidden] { display: none; }
/* select text: Explain */
.bf-sel { position: fixed; z-index: 80; display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--ink); box-shadow: var(--shadow); animation: bf-in .18s ease-out both; }
.bf-sel[hidden] { display: none; }
.bf-sel button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 11px; background: none; color: var(--bg); font: 700 13.5px/1 var(--font-body); white-space: nowrap; cursor: pointer; }
.bf-sel button:first-child { background: var(--accent); color: var(--accent-ink, #fff); }
.bf-sel button:hover { filter: brightness(1.1); }
.bf-sel-av { display: grid; place-items: center; width: 24px; height: 24px; margin-left: -4px; border-radius: 8px; background: var(--accent-soft); }
@media (pointer: coarse) { .bf-sel button { min-height: 42px; } }
/* phones: a sheet from the bottom */
@media (max-width: 640px) {
  .bf-pop, .bf-pop.left { left: 0; right: 0; bottom: 0; width: 100%; height: min(88dvh, 720px); border-width: 2px 0 0; border-radius: 22px 22px 0 0; transform: translateY(40px); transform-origin: bottom center; padding-bottom: env(safe-area-inset-bottom); }
  .bf-grab { display: block; width: 44px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--border); }
  .bf-head { padding-top: 6px; }
  .bf-items, .bf-acts, .bf-tipline { margin-left: 0; } .bf-pointer { width: 100%; margin-left: 0; }
  .bf-next { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .bf-fab-av, .bf-dots i { animation: none; } .bf-pop, .bf-fab-l, .bf-hl { transition: none; } .bf-tip, .bf-sel, .bf-pointbar { animation: none; } }
html[data-motion="off"] :is(.bf-fab-av, .bf-dots i, .bf-tip, .bf-sel, .bf-pointbar) { animation: none; }
html[data-motion="off"] :is(.bf-pop, .bf-fab-l, .bf-hl) { transition: none; }
@media print { .bf-fab, .bf-pop, .bf-tip, .bf-sel, .bf-back, .bf-pointbar, .bf-hl { display: none !important; } }
.bf-ic[hidden] { display: none; }
/* the free minutes with Bo, on Meet Bo */
.bo-free { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(460px, 100%); margin: 4px auto 14px; padding: 18px 20px; border: 2px solid var(--gold, #8A5C00); border-radius: 20px; background: var(--gold-soft, #FFF4D1); }
.bo-free p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.45; text-align: center; }

/* ---------- Bo's characters (assets/bo-characters.js): radio cards in Settings, Ask Bo's sheet and a call's settings ---------- */
.bc-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bc-pick.compact { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.bc-card { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); cursor: pointer; box-shadow: 0 3px 0 var(--lip, var(--border)); }
.bc-card:hover { border-color: var(--accent-line, var(--border)); }
.bc-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); box-shadow: 0 3px 0 var(--accent-deep, var(--accent)); }
.bc-card input { position: absolute; opacity: 0; pointer-events: none; }
.bc-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.bc-av { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--accent-soft); }
.compact .bc-av { width: 46px; height: 46px; border-radius: 13px; }
.bc-t { min-width: 0; display: grid; gap: 2px; }
.bc-t b { font-family: var(--font-display, inherit); font-size: 16.5px; font-weight: 800; color: var(--ink); }
.bc-t > span { font-size: 14px; line-height: 1.4; color: var(--ink-2, var(--ink)); }
.bc-t i { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.bc-def { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 700 11px/1.6 var(--font-body, inherit); text-transform: uppercase; letter-spacing: 0.05em; vertical-align: 2px; }
.compact .bc-t > span { font-size: 13px; }
.bo-char-btn { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 2px; padding: 3px 10px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 13.5px/1.4 var(--font-body, inherit); cursor: pointer; }
.bo-char-btn:hover { border-color: var(--accent-line, var(--border)); }
.bo-char-btn svg { transform: rotate(0deg); opacity: 0.7; }
.bo-char-modal { max-width: 720px; display: grid; gap: 12px; padding: 22px 24px 24px; }
.bo-char-modal h2 { margin: 0; font-size: 22px; }
.bt-char-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bt-char-line .linkbtn { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bt-set .bc-card { padding: 8px 10px; border-radius: 14px; box-shadow: none; }
@media (max-width: 520px) { .bc-pick { grid-template-columns: minmax(0, 1fr); } }
/* the review call from the heads-up before an exam */
.bt-exam { width: 100%; padding: 16px 18px; border: 1px solid rgba(127, 178, 255, .35); border-radius: 18px; background: rgba(26, 100, 214, .22); text-align: left; }
.bt-hello .bt-exam { margin: 0 0 12px; padding: 12px 14px; }
.bt-exam p { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: rgba(236, 242, 250, .9); line-height: 1.5; }
.bt-exam p svg { flex: none; margin-top: 3px; color: #9CC2FF; }
.bt-exam b { color: var(--bt-ink); }
.bt-exam .btn { width: 100%; justify-content: center; margin-top: 14px; }
.bo-exam-note { display: flex; align-items: flex-start; gap: 10px; width: min(520px, 100%); margin: 0 auto 18px; padding: 14px 16px; border: 2px solid var(--line, #D6E2F5); border-radius: 16px; background: var(--card, #fff); text-align: left; }
.bo-exam-note svg { flex: none; margin-top: 2px; color: var(--accent, #1A64D6); }
.bo-exam-note p { margin: 0; line-height: 1.5; }
/* not right: the thumbs down under Bo's answers, and what was wrong */
.bo-tool[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft, rgba(26, 100, 214, .1)); }
.bo-bad { margin: 10px 0 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.bo-bad p { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.bo-bad p svg { flex: none; margin-top: 3px; color: var(--good, #15803D); }
.bo-bad-row { display: flex; gap: 8px; margin-bottom: 6px; }
.bo-bad-row .input { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.bf-tool[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft, rgba(26, 100, 214, .1)); }
/* the study room panel on a call (classmates join: assets/room.js) */
.bt-room-b { position: relative; }
.bt-room .bt-pages-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bt-room-t { margin: 0 0 12px; color: var(--ink-2); line-height: 1.5; font-size: 14.5px; }
.bt-room-t b { color: var(--ink); }
.bt-room-code { margin: 0 0 12px; padding: 10px 0; border-radius: 14px; background: var(--surface-2); font: 800 34px/1.1 var(--font-mono, ui-monospace, monospace); letter-spacing: .12em; color: var(--ink); text-align: center; }
.bt-room-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bt-room-acts .btn, .bt-room > .btn { flex: 1 1 auto; justify-content: center; }

/* ---------- a study room, for a classmate who joins a call (assets/room.js) ----------
   The board on the whole screen, as on the call; the captions over its bottom; a box to ask Bo below. */
.rm { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); }
.rm-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px 16px; border-bottom: 2px solid var(--border); }
.rm-av { flex: none; display: grid; place-items: center; }
.rm-t { min-width: 0; }
.rm-t h2 { margin: 0; font: 800 18px/1.2 var(--font-display); overflow-wrap: anywhere; }
.rm-t p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.rm-sp { flex: 1; }
.rm-pad { position: relative; flex: 1; min-height: 0; }
.rm-pad .wb { position: absolute; inset: 0; }
.rm-caps { display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow-y: auto; padding: 10px 16px; border-top: 2px solid var(--border); background: var(--surface-2); }
.rm-cap { margin: 0; font-size: 16px; line-height: 1.45; }
.rm-cap b { color: var(--accent); }
.rm-cap.you, .rm-cap.guest, .rm-cap.me { color: var(--ink-2); }
.rm-cap.me { font-style: italic; }
.rm-cap.hint { color: var(--muted); }
.rm-ask { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.rm-ask .input { flex: 1 1 auto; min-width: 0; min-height: 48px; }
.rm-ask .btn { flex: none; min-height: 48px; }
.rm-page { display: grid; place-items: start center; padding: 24px 16px 48px; }
.rm-box { display: flex; flex-direction: column; gap: 12px; width: min(460px, 100%); padding: 24px; border: 2px solid var(--border); border-radius: 22px; background: var(--card); }
.rm-box h1 { margin: 0; font: 800 24px/1.2 var(--font-display); }
.rm-box p { margin: 0; }
.rm-join-av { align-self: center; }
.rm-code { font: 800 26px/1.2 var(--font-mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: uppercase; text-align: center; min-height: 56px; }
.rm-err { color: var(--bad, #B42318); font-weight: 600; }
.rm-box .btn.lg { justify-content: center; }
@media (max-width: 760px) { .rm-t h2 { font-size: 16px; } .rm-av { display: none; } .rm-caps { max-height: 24vh; } .rm-ask .btn span, .rm-ask .btn { padding-inline: 14px; } }
/* a call picking itself up again after a drop (assets/talk.js, Live.rebuild) */
.bt[data-rc="1"] .bt-status { color: #FFD27A; }
.bt[data-rc="1"] .bt-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #FFB020; vertical-align: 1px; animation: bt-rc 1s ease-in-out infinite alternate; }
@keyframes bt-rc { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bt[data-rc="1"] .bt-status::before { animation: none; } }
#bt-micfix { margin-top: 10px; }
