/* ==========================================================================
   Bluebook Practice Test UI Stylesheet (Pixel-Accurate Replica of PDF Pages 1-32)
   ========================================================================== */

:root {
    --bb-navy: #1d2b4f;
    --bb-blue: #2557a7;
    --bb-blue-hover: #1b4280;
    --bb-yellow: #f6c614;
    --bb-yellow-hover: #e5b507;
    --bb-red: #c92a2a;
    --bb-bg: #ffffff;
    --bb-header-bg: #f4f6f9;
    --bb-text: #1e1e1e;
    --bb-muted: #595959;
    --bb-border: #b5b5b5;
    --bb-hl-yellow: #fff176;
    --bb-hl-blue: #bae6fd;
    --bb-hl-pink: #fbcfe8;
}

* {
    box-sizing: border-box;
}

body.bb-exam-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--bb-text);
    background: var(--bb-bg);
    user-select: none;
}

/* ==========================================================================
   1. Top Header & Navy Banner (PDF Page 1, 2, 25)
   ========================================================================== */
.bb-header {
    background: var(--bb-header-bg);
    padding: 8px 24px 6px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 66px;
    position: relative;
    z-index: 100;
}

.bb-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.bb-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.2;
}

.bb-directions-btn {
    background: transparent;
    border: none;
    padding: 2px 6px 2px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e1e1e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
}

.bb-directions-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.bb-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.bb-timer-display {
    font-size: 21px;
    font-weight: 700;
    color: #1e1e1e;
    letter-spacing: 0.5px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.bb-timer-display.bb-timer-warning {
    color: var(--bb-red);
}

.bb-timer-hide-btn {
    background: #fff;
    border: 1.5px solid #333;
    border-radius: 999px;
    padding: 1px 13px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e1e1e;
    cursor: pointer;
    line-height: 1.3;
}

.bb-timer-hide-btn:hover {
    background: #eaeaea;
}

.bb-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    position: relative;
}

.bb-tool-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #1e1e1e;
    cursor: pointer;
    border-radius: 6px;
    position: relative;
}

.bb-tool-btn:hover,
.bb-tool-btn.active {
    background: rgba(0, 0, 0, 0.08);
}

.bb-tool-btn svg {
    width: 20px;
    height: 20px;
    stroke: #1e1e1e;
}

/* Dark Tooltip under Highlights & Notes (PDF Page 1 bottom) */
.bb-dark-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    right: 48px;
    background: #2b2b2b;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.4;
    width: 245px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    z-index: 250;
    pointer-events: none;
}

.bb-dark-tooltip::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 7px 7px 7px;
    border-style: solid;
    border-color: transparent transparent #2b2b2b transparent;
}

.bb-dark-tooltip strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Dashed line & Navy Banner */
.bb-dashed-rule {
    height: 3px;
    width: 100%;
    background: repeating-linear-gradient(
        to right,
        #1e1e1e 0px,
        #1e1e1e 22px,
        transparent 22px,
        transparent 28px
    );
    flex-shrink: 0;
}

.bb-navy-banner {
    background: var(--bb-navy);
    color: #ffffff;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 16px;
    margin: 0 28px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    flex-shrink: 0;
}

/* ==========================================================================
   2. Main Split Workspace (Passage Pane + Notes Pane + Divider + Question Pane)
   ========================================================================== */
.bb-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

.bb-pane-left {
    width: 50%;
    min-width: 22%;
    max-width: 78%;
    height: 100%;
    overflow-y: auto;
    padding: 28px 42px 48px 48px;
    user-select: text;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.65;
    color: #141414;
}

/* Custom Highlighter Cursor when Highlight Mode is active (PDF Page 26) */
.bb-pane-left.bb-highlight-cursor {
    cursor: text;
}

.bb-passage-figure {
    margin: 0 0 18px 0;
    text-align: center;
}

.bb-passage-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.bb-passage-content p {
    margin: 0 0 14px 0;
}

/* Official Bluebook Passage Data Table & Bullet List Styles */
.bb-table-wrap {
    margin: 0 0 18px 0;
    overflow-x: auto;
}

.bb-table-caption {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    text-align: center;
    color: #141414;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.bb-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #141414;
    background: #ffffff;
    border: 1.5px solid #333333;
}

.bb-data-table th,
.bb-data-table td {
    border: 1px solid #555555;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

.bb-data-table thead th {
    background: #ebedf0;
    font-weight: 700;
    color: #111111;
    border-bottom: 1.5px solid #333333;
}

.bb-data-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.bb-passage-list {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.bb-passage-list li {
    margin-bottom: 8px;
}

/* Highlight Spans & Underline Styles (PDF Pages 26, 29, 30) */
.bb-hl-span {
    padding: 1px 0;
    border-radius: 2px;
    cursor: pointer;
}

.bb-hl-yellow {
    background-color: var(--bb-hl-yellow);
}

.bb-hl-blue {
    background-color: var(--bb-hl-blue);
}

.bb-hl-pink {
    background-color: var(--bb-hl-pink);
}

.bb-ul-solid {
    text-decoration: underline solid #1e1e1e 1.5px;
    text-underline-offset: 3px;
}

.bb-ul-dashed {
    text-decoration: underline dashed #1e1e1e 1.5px;
    text-underline-offset: 3px;
}

.bb-ul-wavy {
    text-decoration: underline wavy #1e1e1e 1.3px;
    text-underline-offset: 3px;
}

/* Middle Collapsible Notes Column (PDF Pages 30, 31) */
.bb-notes-column {
    width: 240px;
    min-width: 210px;
    height: 100%;
    border-left: 2px solid #999;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}

.bb-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 60px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bb-note-card {
    border: 1.5px solid #333;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.bb-note-card-header {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #d0d0d0;
}

.bb-note-card-header.yellow {
    background: var(--bb-hl-yellow);
}
.bb-note-card-header.blue {
    background: var(--bb-hl-blue);
}
.bb-note-card-header.pink {
    background: var(--bb-hl-pink);
}

.bb-note-quote {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.bb-note-trash-btn {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #222;
}

.bb-note-textarea {
    width: 100%;
    min-height: 95px;
    border: none;
    resize: vertical;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    outline: none;
}

/* Delete This Note? Confirmation Box (PDF Page 30 bottom) */
.bb-delete-note-confirm {
    background: #2c2c2c;
    color: #fff;
    padding: 14px 16px;
    border-radius: 6px;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.bb-delete-note-confirm p {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
}

.bb-delete-note-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bb-btn-no {
    background: transparent;
    color: #fff;
    border: 1.5px solid #fff;
    border-radius: 999px;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.bb-btn-yes {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* Collapse & Expand Notes Panel Buttons (PDF Page 31) */
.bb-notes-collapse-btn {
    position: absolute;
    bottom: 14px;
    left: 12px;
    width: 30px;
    height: 30px;
    background: #2b2b2b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.bb-notes-expand-pill {
    position: absolute;
    bottom: 18px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: #4a4a4a;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Resizable Split Divider (PDF Page 1, 25) */
.bb-resizer {
    width: 10px;
    height: 100%;
    position: relative;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 30;
}

.bb-resizer::before {
    content: "";
    width: 3px;
    height: 100%;
    background: #8e8e8e;
    border-left: 1px solid #b5b5b5;
    border-right: 1px solid #b5b5b5;
}

.bb-resizer-handle {
    position: absolute;
    top: 28%;
    width: 16px;
    height: 38px;
    background: #1e1e1e;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Right Question Pane */
.bb-pane-right {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 28px 48px 48px 42px;
    user-select: text;
}

.bb-workspace.bb-single-pane .bb-pane-left,
.bb-workspace.bb-single-pane .bb-resizer {
    display: none !important;
}

.bb-workspace.bb-single-pane .bb-pane-right {
    max-width: 820px;
    margin: 0 auto;
}

/* Question Header Bar (Black Number Box + Mark for Review + ABC Option Eliminator) */
.bb-q-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f2f4f7;
    border-bottom: 2px dashed #555;
    padding: 0 8px 0 0;
    margin-bottom: 18px;
    min-height: 34px;
}

.bb-q-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-q-num-box {
    background: #1e1e1e;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.bb-mark-review-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1e1e1e;
    cursor: pointer;
    border-radius: 4px;
}

.bb-mark-review-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.bb-mark-review-btn.marked {
    font-weight: 700;
    text-decoration: underline;
}

.bb-abc-toggle-wrap {
    position: relative;
}

.bb-abc-btn {
    background: #fff;
    border: 1.5px solid #1e1e1e;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    color: #1e1e1e;
    line-height: 1;
}

.bb-abc-btn.active {
    background: var(--bb-blue);
    color: #fff;
    border-color: var(--bb-blue);
}

.bb-abc-btn::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: 50%;
    height: 1.5px;
    background: currentColor;
    transform: rotate(-18deg);
}

/* Question Stem & Choices (PDF Page 1, 27) */
.bb-q-stem {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.58;
    color: #141414;
    margin-bottom: 20px;
}

.bb-choices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bb-choice-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bb-choice-card {
    flex: 1;
    border: 1.5px solid #595959;
    border-radius: 8px;
    padding: 13px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    background: #ffffff;
    transition: border-color 0.12s, background-color 0.12s;
    position: relative;
}

.bb-choice-card:hover {
    background: #f5f8ff;
    border-color: var(--bb-blue);
}

.bb-choice-card.selected {
    border: 2.5px solid var(--bb-blue);
    background: #eef4ff;
}

.bb-choice-letter {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: 1.8px solid #1e1e1e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e1e1e;
    flex-shrink: 0;
    margin-top: 1px;
}

.bb-choice-card.selected .bb-choice-letter {
    background: var(--bb-blue);
    border-color: var(--bb-blue);
    color: #ffffff;
}

.bb-choice-text {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16.5px;
    line-height: 1.5;
    color: #141414;
    flex: 1;
}

/* Eliminated Choice Strikethrough (PDF Page 27) */
.bb-choice-row.eliminated .bb-choice-card {
    opacity: 0.48;
}

.bb-choice-row.eliminated .bb-choice-card::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    top: 50%;
    height: 2px;
    background: #1e1e1e;
    pointer-events: none;
}

.bb-elim-btn {
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #1e1e1e;
    flex-shrink: 0;
}

.bb-elim-circle {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    border: 1.5px solid #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    position: relative;
}

.bb-elim-circle::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    top: 50%;
    height: 1.5px;
    background: #1e1e1e;
}

.bb-elim-undo {
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    color: #1e1e1e;
}

/* ==========================================================================
   3. Floating Highlight & Underline Toolbar (PDF Pages 26, 29, 30)
   ========================================================================== */
.bb-hl-toolbar {
    position: fixed;
    background: #ffffff;
    border: 1.5px solid #bcbcbc;
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    z-index: 400;
}

.bb-hl-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bb-hl-color-dot.yellow {
    background: var(--bb-hl-yellow);
}
.bb-hl-color-dot.blue {
    background: var(--bb-hl-blue);
}
.bb-hl-color-dot.pink {
    background: var(--bb-hl-pink);
}

.bb-hl-color-dot.active {
    border: 2px solid #1e1e1e;
}

.bb-hl-icon-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #1e1e1e;
    position: relative;
}

.bb-hl-icon-btn:hover {
    background: #f0f0f0;
}

/* Underline Dropdown Submenu (PDF Page 29 top) */
.bb-ul-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #ffffff;
    border: 1px solid #bbb;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    min-width: 56px;
    z-index: 410;
}

.bb-ul-option {
    background: transparent;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.bb-ul-option:hover {
    background: #f0f4fa;
}

/* ==========================================================================
   4. Bottom Footer Bar & Question Menu Popover (PDF Pages 1, 28, 32)
   ========================================================================== */
.bb-footer {
    background: var(--bb-header-bg);
    padding: 10px 28px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 62px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.bb-student-name {
    font-size: 15.5px;
    font-weight: 700;
    color: #1e1e1e;
}

.bb-q-menu-btn {
    background: #1e1e1e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bb-q-menu-btn:hover {
    background: #333333;
}

.bb-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.bb-nav-btn {
    background: var(--bb-blue);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 9px 24px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}

.bb-nav-btn:hover {
    background: var(--bb-blue-hover);
}

/* Question Navigation Menu Popover (PDF Page 28) */
.bb-q-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 20px 24px;
    width: 480px;
    max-width: 94vw;
    z-index: 300;
    border: 1px solid #d5d5d5;
}

.bb-q-popover::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 9px 9px 0 9px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.bb-q-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bb-q-popover-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #1e1e1e;
}

.bb-q-popover-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.bb-q-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
    border-top: 1px solid #dcdcdc;
    border-bottom: 1px solid #dcdcdc;
    margin-bottom: 18px;
    font-size: 13px;
    color: #333;
}

.bb-q-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb-q-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 14px 10px;
    margin-bottom: 20px;
    justify-items: center;
}

.bb-q-cell-wrap {
    position: relative;
    padding-top: 14px;
}

.bb-q-current-pin {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    line-height: 1;
}

.bb-q-cell {
    width: 34px;
    height: 34px;
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: #ffffff;
    color: var(--bb-blue);
    border: 1.5px dashed #333;
}

.bb-q-cell.answered {
    background: var(--bb-blue);
    color: #ffffff;
    border: 1.5px solid var(--bb-blue);
}

.bb-q-cell-flag {
    position: absolute;
    top: -6px;
    right: -6px;
    color: var(--bb-red);
    font-size: 12px;
}

.bb-go-review-btn {
    display: block;
    margin: 0 auto;
    background: #ffffff;
    color: var(--bb-blue);
    border: 1.8px solid var(--bb-blue);
    border-radius: 999px;
    padding: 7px 22px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.bb-go-review-btn:hover {
    background: #eef4ff;
}

/* ==========================================================================
   5. Check Your Work Screen & Module Transition Screen (PDF Page 22, 23)
   ========================================================================== */
.bb-check-work-screen {
    flex: 1;
    background: #fafafa;
    overflow-y: auto;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bb-check-work-screen h1 {
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 12px 0;
    color: #1e1e1e;
}

.bb-check-work-sub {
    font-size: 14.5px;
    color: #333;
    text-align: center;
    margin: 0 0 6px 0;
}

.bb-check-work-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 24px 32px;
    width: 720px;
    max-width: 95vw;
    margin-top: 22px;
}

.bb-check-work-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #dcdcdc;
    margin-bottom: 22px;
}

.bb-check-work-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.bb-check-work-grid .bb-q-cell {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

/* Fullscreen Transition Loader: "This Module Is Over" (PDF Page 22 bottom) */
.bb-fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: #fafafa;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.bb-module-over-title {
    font-size: 24px;
    color: var(--bb-blue);
    font-weight: 400;
    margin: 0 0 16px 0;
}

.bb-module-over-text {
    font-size: 14.5px;
    color: #222;
    margin: 4px 0;
}

.bb-spinner-dots {
    margin-top: 28px;
    width: 40px;
    height: 40px;
    border: 4px dotted #1e1e1e;
    border-radius: 50%;
    animation: bb-spin 1.4s linear infinite;
}

@keyframes bb-spin {
    to { transform: rotate(360deg); }
}

/* You're All Finished! Screen (PDF Page 23) */
.bb-finished-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.1);
    padding: 36px 40px;
    width: 460px;
    max-width: 92vw;
    text-align: center;
}

.bb-yellow-btn {
    background: var(--bb-yellow);
    color: #1e1e1e;
    border: 1.5px solid #1e1e1e;
    border-radius: 999px;
    padding: 9px 26px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.bb-yellow-btn:hover {
    background: var(--bb-yellow-hover);
}

/* ==========================================================================
   6. More Dropdown, Directions Modal, and Help Modal (PDF Pages 2-21, 25)
   ========================================================================== */
.bb-more-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    width: 240px;
    padding: 8px 0;
    z-index: 350;
    border: 1px solid #ddd;
}

.bb-more-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14.5px;
    color: #1e1e1e;
    cursor: pointer;
    text-align: left;
}

.bb-more-item:hover {
    background: #f2f5fa;
}

/* Directions Popover (PDF Page 25 bottom) */
.bb-directions-popover {
    position: fixed;
    top: 66px;
    left: 28px;
    width: 780px;
    max-width: calc(100vw - 56px);
    min-height: 420px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    padding: 32px 36px 24px;
    z-index: 450;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #ccc;
}

.bb-directions-body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1e1e1e;
}

.bb-directions-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Help Modal with 13 Accordions & Sticky Close Button (PDF Pages 2-21) */
.bb-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bb-help-modal {
    background: #ffffff;
    border-radius: 8px;
    width: 580px;
    max-width: 95vw;
    height: 82vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.bb-help-header {
    padding: 20px 28px 12px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.bb-help-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bb-help-header-top h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
}

.bb-help-expand-controls {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.bb-help-expand-controls button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1e1e1e;
    padding: 2px 4px;
}

.bb-help-expand-controls button:hover {
    text-decoration: underline;
}

.bb-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 28px;
}

.bb-acc-item {
    border-bottom: 1px solid #dcdcdc;
}

.bb-acc-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14.5px;
    color: #1e1e1e;
    cursor: pointer;
    text-align: left;
}

.bb-acc-btn:hover {
    background: #f2f2f2;
    text-decoration: underline;
}

.bb-acc-icon {
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.bb-acc-content {
    display: none;
    background: #f5f5f5;
    padding: 18px 20px;
    font-size: 14px;
    line-height: 1.55;
    color: #1e1e1e;
    margin-bottom: 8px;
}

.bb-acc-item.open .bb-acc-content {
    display: block;
}

.bb-help-footer {
    padding: 14px 28px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    background: #ffffff;
    flex-shrink: 0;
}

/* Line Reader Overlay Tool (PDF Page 11) */
.bb-line-reader {
    position: fixed;
    top: 180px;
    left: 60px;
    width: 520px;
    background: rgba(35, 35, 35, 0.88);
    border-radius: 8px;
    padding: 18px 18px 22px;
    z-index: 380;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.bb-lr-drag-handle {
    text-align: center;
    cursor: move;
    padding-bottom: 8px;
    font-size: 16px;
    letter-spacing: 3px;
    color: #ccc;
}

.bb-lr-window {
    background: rgba(255, 255, 255, 0.92);
    height: 36px;
    border-radius: 4px;
    mix-blend-mode: destination-out;
    border: 2px solid #f6c614;
}

/* Floating Desmos Calculator & Math Reference Window */
.bb-floating-window {
    position: fixed;
    top: 90px;
    right: 40px;
    width: 520px;
    height: 460px;
    background: #ffffff;
    border: 2px solid #1d2b4f;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    z-index: 420;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bb-floating-header {
    background: var(--bb-navy);
    color: #ffffff;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    font-size: 14px;
    font-weight: 700;
}

.bb-hidden {
    display: none !important;
}
