@font-face {
  font-family: "Brainpower Pixel";
  src: url('/racs/css/fonts/PixelifySans.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
/* Only these five shapes use the open-counter derivative. The other letters,
   original font, layout metrics and sans-serif score digits stay unchanged. */
@font-face {
  font-family: "Brainpower Pixel";
  src: url('/racs/css/fonts/BrainpowerPixelClear.woff2?v=full-face-5-20261008') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0035, U+0038, U+0043, U+0047, U+0063, U+0065;
}
/* Art is a coherent scene, never a second cropped tree or a sticker gutter. */
body.bio-page::after { content: none; }
body.bio-page::before { background-image: var(--pixel-world); background-position: center; background-size: cover; }
/* Keep the painted scene anchored. Actual frame loops are a separate asset. */
body.bio-page::before { inset: 0; image-rendering: pixelated; animation: none; transform: none; will-change: auto; }
body[data-motion-paused="true"]::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { body.bio-page::before { animation: none; will-change: auto; } }
body[data-bio-world="cells"] { --pixel-world: url('/racs/img/bio/pixel-cell-interior-morning-grid.png'); --game-world-image: url('/racs/img/bio/pixel-cell-interior-morning-grid.png'); }
body.bio-page > .topbar { background: #12334f; border: 0; color: #f6feff; box-shadow: none; }
body.bio-page .topbar .brand { color: inherit; }
body.bio-page .topbar .brand > span:not(.brainpower-wordmark), body.bio-page .topbar .brainpower-context { color: #e9fcff; }
body.bio-page .bio-session-bar { color: #e9fcff; background: rgb(12 37 64 / .75); border: 0; }
body.bio-page .bio-session-bar a { color: #cdf477; }
body.bio-page .bio-learner-nameplate { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding: 4px 10px; border: 2px solid #173e53; background: #d9f3f7; color: #173e53; box-shadow: inset 2px 2px #f4feff, inset -2px -2px #75a5b6; font: 700 clamp(12px, 1.2vw, 15px)/1.25 "Brainpower Pixel", var(--sans); overflow-wrap: anywhere; box-sizing: border-box; }
.bio-page .topbar-in { justify-content: center; }
.bio-home-page:not(.bio-student-home) .topbar { display: none; }
.bio-home-page:not(.bio-student-home) .bio-home-wrap { display: grid; place-items: center; padding: clamp(16px, 3vw, 24px); width: 100%; max-width: none; }
.bio-home-page:not(.bio-student-home)::before { filter: brightness(.65) saturate(1.15); }
.bio-home-page:not(.bio-student-home) .bio-home-hero { display: grid; width: min(900px, 100%); min-height: 0; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; text-align: center; }
/* One shared center line, without the old portrait panel or negative margin. */
.bio-home-page:not(.bio-student-home) .bio-home-hero-copy { display: grid; justify-items: center; gap: clamp(12px, 3vh, 24px); width: 100%; max-width: none; min-width: 0; padding: 0; margin: 0; background: none; }
.bio-home-page:not(.bio-student-home) .bio-logo-stage { width: calc(100% - 8px); margin-inline: auto; transform: translateY(4px) rotate(-1deg); transform-origin: center; }
.bio-logo-stage { position: relative; width: min(900px, 86vw); isolation: isolate; }
.bio-entry-logo { display: block; width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 9px 0 rgb(5 20 46 / .7)); animation: brainpower-arrive 500ms ease-out both; }
.bio-home-hero h1 { color: #e9fcff; font: 700 clamp(19px, 3vw, 30px)/1.2 var(--sans); margin: 24px 0; text-shadow: 2px 3px #102b52; }
.bio-home-hero .bio-home-hero-actions { justify-content: center; }
.bio-home-hero #bio-home-start { min-height: 64px; min-width: 260px; padding: 16px 30px; background: #c5ee68; border: 3px solid #f1ffbc; border-bottom-color: #5b942d; border-right-color: #5b942d; box-shadow: 6px 6px #102b52; font-size: 22px; color: #143829; }
.bio-home-page:not(.bio-student-home) .bio-home-hero :is(h1, #bio-home-start) { font-family: "Brainpower Pixel", "Arial Black", "Segoe UI Black", var(--sans); font-weight: 700; letter-spacing: .015em; line-height: 1.2; }
.bio-home-page:not(.bio-student-home) .bio-home-hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 0; transform: rotate(-3deg); text-shadow: 2px 2px 0 #17375f, 4px 4px 0 #071e41; }
.bio-home-page:not(.bio-student-home) .bio-home-hero-actions { margin-top: 0; }
.bio-home-page:not(.bio-student-home) #bio-home-start { font-size: clamp(24px, 3vw, 30px); border-radius: 0; transform: rotate(-2deg); box-shadow: inset 2px 2px 0 #fbffe2, inset -2px -2px 0 #659536, 6px 7px 0 #102b52; text-decoration: none; }
.bio-home-page:not(.bio-student-home) #bio-home-start:hover { transform: rotate(-2deg) translateY(-2px); background: #d8ff86; }
.bio-home-page:not(.bio-student-home) #bio-home-start:active { transform: rotate(-2deg) translate(3px, 3px); box-shadow: inset 2px 2px 0 #fbffe2, inset -2px -2px 0 #659536, 3px 4px 0 #102b52; }
.bio-home-page:not(.bio-student-home) #bio-home-start:focus-visible { outline: 3px solid #e9fcff; outline-offset: 6px; }
/* The rally is a second, larger line, on the same center as logo and action. */
.bio-home-page:not(.bio-student-home) .bio-home-hero .entry-motto { width: 100%; color: #fff; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.18; }
.entry-motto .entry-belief, .auth-entry-motto .entry-belief { display: block; color: #fff; max-width: 820px; margin-inline: auto; }
.entry-motto .entry-rally, .auth-entry-motto .entry-rally { display: block; margin-top: 10px; color: #ff5550; font-size: clamp(40px, 7.2vw, 76px); line-height: 1; white-space: nowrap; text-shadow: 2px 2px 0 #7b172e, 4px 4px 0 #071e41; }
.bio-home-hero #bio-home-start:active { transform: translate(3px, 3px); box-shadow: 3px 3px #102b52; }
.pixel-bolt { position: absolute; width: 8px; height: 8px; background: #f4ffbc; box-shadow: 8px -8px #e1f8ff, 8px 0 #e1f8ff, 16px 0 #77edfa, 16px 8px #77edfa, 24px 8px #f4ffbc, 24px 16px #f4ffbc; animation: pixel-charge 5s steps(1) infinite; z-index: -1; }
.bolt-one { left: 30%; top: 0; }
.bolt-two { right: 15%; bottom: 0; animation-delay: 2.5s; transform: rotate(180deg); }
body[data-motion-paused="true"] .pixel-bolt { animation-play-state: paused; }
@keyframes pixel-charge { 0%, 85%, 100% { opacity: 0; } 86%, 88%, 92% { opacity: 1; } 90%, 94% { opacity: .3; } }
@keyframes brainpower-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.bio-student-home .bio-home-my-prep { padding: 16px; background: rgb(232 249 255 / .91); border: 2px solid #b9e7f5; box-shadow: 5px 5px #153657; }
.bio-student-home .bio-home-action:nth-child(1) { border-left: 6px solid #419de5; }
.bio-student-home .bio-home-action:nth-child(2) { border-left: 6px solid #fc963e; background: #fff5dd; }
.bio-student-home .bio-home-action:nth-child(3) { border-left: 6px solid #9760d3; background: #f0e4ff; }
.bio-student-home .bio-home-action:nth-child(4) { border-left: 6px solid #78b94b; background: #eff8df; }
.bio-student-home .bio-home-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
.bio-student-home .bio-home-action:nth-child(4){background:rgb(225 217 255 / .92);border-color:#ac90e0}.bio-student-home .bio-home-action:nth-child(4) .bio-home-action-icon{background:#c9b4f2;color:#48336d}
@media (max-width: 700px) { .bio-student-home .bio-home-actions { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.bio-cells-page .cell-hero { background: rgb(13 45 74 / .9); color: #eaffff; border: 1px solid #84dfe5; box-shadow: none; }
.bio-cells-page .cell-hero h1 { color: inherit; }
.bio-cells-page .cell-clock:empty { display: none; }
.bio-cells-page .cell-step { background: rgb(7 40 68 / .36); border: 1px solid rgb(182 246 246 / .7); box-shadow: none; }
.bio-cells-page .cell-step > h2 { align-self: start; color: #fff; background: #174e67; padding: 4px 12px; }
.bio-cells-page .cell-reading-layout { align-items: center; }
.bio-cells-page .cell-reading-copy { align-self: center; background: rgb(245 253 255 / .96); padding: 18px; border: 2px solid #9cdbde; box-shadow: 4px 4px #154a66; }
.bio-cells-page .cell-next .muted { color: #f1ffff; text-shadow: 1px 1px #14344f; }
.bio-cells-page .cell-body > p { color: #f1ffff; text-shadow: 1px 1px #14344f; }
.bio-cells-page:has(.cell-card-application) .cell-next [data-next] { display: none; }
.bio-cells-page .cell-step-head { text-shadow: 1px 1px #14344f; }
.cell-gloss-popup { text-align: left; border-radius: 2px; box-shadow: 4px 4px #173e3066; }
.cell-gloss-popup[dir="rtl"] { text-align: right; }
.cell-gloss-focus .cell-gloss-trigger { background: #ffe98a; border-bottom: 3px solid #d95d22; box-shadow: 0 2px #d95d2240; }
.cell-reread { margin: 0; padding: 6px 8px; border-left: 4px solid #e07730; background: #fff0dc; color: #733018; font-size: .9rem; }
.cell-card-application { flex: none; width: min(840px, 100%); margin: auto; padding: 12px; color: #173e35; }
.cell-card-application h3 { margin: 0 0 12px; font-size: clamp(1rem, 2.5vh, 1.5rem); }
.cell-card-application .cell-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cell-card-application .cell-options button, .cell-card-advance { min-height: 44px; }
.cell-card-application .cell-feedback { margin: 8px 0; }
.cell-card-key { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; margin-right: 6px; background: #d9ecb6; border: 1px solid #658a45; }
.cell-card-advance { margin-top: 6px; }
.student-work-action, .student-work-inbox-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.student-work-action { padding: 8px; border-left: 4px solid #ff953d; background: #e8f5ef; color: #173e35; }
.student-work-actions, .student-work-inbox-list { display: grid; gap: 6px; }
.student-work-reminder { margin-block: 12px; }
.student-work-inbox { margin-top: 12px; padding: 10px; background: #f2f9e2; border-left: 4px solid #78b94b; }
.student-work-inbox h2 { font-size: 1rem; margin: 0 0 8px; }
.student-work-inbox p { margin: 0; font-size: .9rem; }
.student-work-inbox a { min-height: 44px; flex: none; }
.cell-step[data-step-type="match"] .cell-match { height: calc(100% - 54px); min-height: 0; }
.cell-step[data-step-type="match"] .cell-match > div { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); align-content: stretch; gap: 7px; }
.cell-step[data-step-type="match"] .cell-match button { display: flex; align-items: center; min-height: 0; font-size: clamp(.85rem, 1.2vw, 1rem); border-radius: 2px; box-shadow: 2px 2px #173e3050; line-height: 1.15; }
.cell-complete { max-width: 1000px; width: 100%; margin: auto; padding: 18px 24px; border-radius: 2px; background: rgb(244 253 255 / .96); box-shadow: 6px 6px #102b52; }
.cell-complete canvas { float: right; image-rendering: pixelated; }
.cell-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; text-align: left; }
.cell-summary p { display: grid; gap: 4px; margin: 0; padding: 9px; border-left: 3px solid #ff963f; background: #e5f3ec; color: #163e35; font-size: .9rem; }
.cell-summary p .cell-part-sprite { grid-row: 1 / 3; float: right; }
.teacher-shell[data-teacher-theme="ing"], .teacher-shell[data-teacher-theme="snyder"], .teacher-shell[data-teacher-theme="stewart"] { --teacher-scene: url('/racs/img/bio/pixel-cell-interior-morning-grid.png'); }
.teacher-shell::before { background: linear-gradient(120deg, color-mix(in srgb, var(--teacher-deep) 65%, transparent), transparent 55%), var(--teacher-scene) center/cover; }
.teacher-shell::after { content: none; }
.auth-shell { background: #163452 url('/racs/img/bio/pixel-cell-interior-morning-grid.png') center/cover; }
.teacher-shell .teacher-brand { background: var(--teacher-deep, #12334f); }
.teacher-shell .teacher-brand > span { color: #e9fcff; }
@media (max-width: 650px) and (orientation: portrait) {
  .cell-step[data-step-type="match"] .cell-match > div { grid-template-columns: 1fr; grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 5px; }
  .cell-step[data-step-type="match"] .cell-match button { padding: 3px 6px; font-size: .82rem; }
  .cell-match .cell-part-sprite { width: 24px; height: 24px; margin-right: 4px; }
  .cell-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .cell-summary p { padding: 5px; font-size: .8rem; }
  .cell-complete { padding: 12px; }
}
@media (max-height: 500px) {
  .bio-cells-page:has(.cell-card-application) .cell-step-head, .bio-cells-page:has(.cell-card-application) .cell-step > h2 { display: none; }
  .cell-card-application { padding: 7px; }
  .cell-card-application .cell-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cell-card-application h3 { margin-bottom: 6px; }
  .cell-card-application .cell-feedback { font-size: .85rem; }
  .bio-cells-page .cell-reading-copy { padding: 8px; }
  .cell-step[data-step-type="match"] .cell-match button { font-size: .8rem; padding: 2px 5px; }
  .cell-summary p { padding: 4px; font-size: .78rem; }
  .cell-summary p .cell-part-sprite { width: 26px; height: 26px; }
  .cell-complete h2 { font-size: 1.5rem; }
  .cell-complete canvas { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .pixel-bolt, .bio-entry-logo { animation: none; } .pixel-bolt { opacity: 0; } }
.bio-quiz-page.bio-quiz-live .bio-cloud-status[data-save-state="failed"],
.bio-quiz-page.bio-quiz-live .bio-cloud-status[data-retrying="true"],
.bio-quiz-page.bio-quiz-live .bio-cloud-status:has(#cloud-save-retry:not([hidden])) {
  display:flex;align-items:center;justify-content:space-between;flex:none;gap:8px;
  padding:4px 8px;margin:3px 0;color:#391b0a;background:#ffe9b5;border:2px solid #d47720;
}
