/* Tamaye Tutoring SAT Math Mock Exam: the Bluebook-style exam interface. */

.runner, .bb-frame { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--white); font-family: var(--font-bb); color: #1E1E1E; }
.screen.bb-screen { position: fixed; inset: 0; }

/* Header */
.bb-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 24px; min-height: 76px; background: var(--white); position: relative; z-index: 30; }
.bb-head.simple { min-height: 64px; }
.bb-head-left { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.bb-sec-title { font-weight: 700; font-size: 18px; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bb-dir-btn { background: none; border: 0; padding: 2px 0; font-weight: 500; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: #111; font-family: var(--font-bb); }
.bb-dir-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .15s; }
.bb-dir-btn.open svg { transform: rotate(180deg); }
.bb-head-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.bb-timer { font-size: 23px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; min-height: 30px; color: #111; display: flex; align-items: center; }
.bb-timer .clock-ico svg { width: 26px; height: 26px; fill: none; stroke: #111; stroke-width: 1.8; stroke-linecap: round; display: block; }
.bb-timer-btns { display: flex; gap: 6px; }
.bb-pill { border: 1px solid #555; background: var(--white); border-radius: 999px; padding: 1px 12px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--font-bb); display: inline-flex; align-items: center; gap: 3px; }
.bb-pill svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.bb-pill:hover:not(:disabled) { background: var(--bb-gray); }
.bb-pill:disabled { opacity: .45; cursor: not-allowed; }
.bb-5min { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1E1E1E; color: var(--white); border-radius: 8px; padding: 10px 8px 10px 16px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }
.bb-5min .icon-btn { color: var(--white); width: 28px; height: 28px; }
.bb-5min::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #1E1E1E; }
.bb-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bb-tool { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: #111; font-family: var(--font-bb); min-width: 64px; }
.bb-tool svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bb-tool:hover:not(:disabled) { background: var(--bb-gray); }
.bb-tool.on { background: var(--bb-blue-soft); color: var(--bb-blue-dark); }
.bb-tool.on span { text-decoration: underline; text-underline-offset: 3px; }
.bb-more-wrap { position: relative; }
.bb-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--white); border: 1px solid #D6D8DD; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; min-width: 210px; z-index: 50; }
.bb-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; font-family: var(--font-bb); font-size: 15px; }
.bb-menu button:hover { background: var(--bb-gray); }
.save-badge { font-size: 12px; color: var(--bad); font-weight: 600; max-width: 200px; text-align: right; line-height: 1.3; }

/* The dashed rule under the header and above the footer */
.bb-dash { height: 3px; flex: none; background: repeating-linear-gradient(90deg, #1E2A44 0 16px, transparent 16px 22px, #4F6BD8 22px 38px, transparent 38px 44px, #F2B705 44px 54px, transparent 54px 60px); }

/* Directions dropdown */
.bb-dir-pop { position: absolute; top: 80px; left: 18px; z-index: 55; width: min(760px, calc(100vw - 36px)); max-height: calc(100vh - 180px); overflow: auto; background: var(--white); border: 1px solid #C9CCD2; border-radius: 10px; box-shadow: 0 18px 44px rgba(0,0,0,.22); }
.bb-dir-inner { padding: 24px 28px 20px; }
.bb-dir-inner .right { text-align: right; margin-top: 16px; position: sticky; bottom: 0; }
.dir-text { font-family: var(--font-q); font-size: 16px; line-height: 1.6; }
.dir-text p { margin: 0 0 10px; }
.dir-text ul { margin: 0 0 12px; padding-left: 22px; }
.dir-text li { margin: 4px 0; }

.bb-preview-bar { background: var(--fix-bg); color: var(--fix); padding: 8px 24px; font-size: 14px; font-family: var(--font-ui); }
.bb-preview-bar .link-btn { color: var(--fix); margin-left: 10px; }

.bb-body { flex: 1; display: flex; min-height: 0; position: relative; }
.bb-main { flex: 1; overflow: auto; min-width: 0; outline: none; }

/* Footer */
.bb-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 24px; min-height: 66px; background: var(--white); }
.bb-foot-left { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-qnav-btn { background: #1E1E1E; color: var(--white); border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: var(--font-bb); }
.bb-qnav-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.bb-foot-right { display: flex; justify-content: flex-end; gap: 10px; }
.bb-btn { background: var(--bb-blue); color: var(--white); border: 0; border-radius: 999px; padding: 10px 28px; font-weight: 700; font-size: 16px; cursor: pointer; font-family: var(--font-bb); }
.bb-btn:hover:not(:disabled) { background: var(--bb-blue-dark); }
.bb-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Question menu popover */
.bb-pop { position: fixed; bottom: 82px; left: 50%; transform: translateX(-50%); width: min(600px, calc(100vw - 32px)); background: var(--white); border: 1px solid #C9CCD2; border-radius: 14px; box-shadow: 0 16px 44px rgba(0,0,0,.22); padding: 18px 22px 22px; z-index: 50; font-family: var(--font-bb); }
.bb-pop::after { content: ""; position: absolute; bottom: -9px; left: 50%; margin-left: -9px; width: 16px; height: 16px; background: var(--white); border-right: 1px solid #C9CCD2; border-bottom: 1px solid #C9CCD2; transform: rotate(45deg); }
.bb-pop-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #E3E5E9; padding-bottom: 10px; margin-bottom: 14px; font-size: 17px; }
.bb-pop-foot { text-align: center; margin-top: 20px; }
.bb-pop-foot .btn-outline { font-weight: 700; padding: 9px 22px; }
.q-legend { display: flex; gap: 22px; justify-content: center; font-size: 14px; color: #333; margin-bottom: 16px; flex-wrap: wrap; }
.q-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-box { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }
.lg-box.dashed { border: 1.5px dashed #555; }
.lg-pin svg, .lg-flag svg { width: 17px; height: 17px; display: block; }
.lg-pin svg { fill: none; stroke: #111; stroke-width: 2; }
.lg-flag svg { fill: var(--bb-flag); stroke: none; }
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 18px 12px; padding-top: 6px; }
.q-cell { position: relative; height: 42px; border-radius: 6px; border: 1.5px dashed #555; background: var(--white); color: var(--bb-blue); font-weight: 700; font-size: 16px; cursor: pointer; font-family: var(--font-bb); }
.q-cell.done { border: 1.5px solid var(--bb-blue); background: var(--bb-blue); color: var(--white); }
.q-cell:hover { box-shadow: 0 0 0 3px var(--bb-blue-soft); }
.q-cell .pin { position: absolute; top: -19px; left: 50%; margin-left: -9px; }
.q-cell .pin svg { width: 18px; height: 18px; fill: var(--white); stroke: #111; stroke-width: 2; display: block; }
.q-cell .mini-flag { position: absolute; top: -8px; right: -7px; }
.q-cell .mini-flag svg { width: 15px; height: 15px; fill: var(--bb-flag); stroke: var(--white); stroke-width: 1.2; display: block; }

/* Check Your Work */
.bb-check { max-width: 820px; margin: 0 auto; padding: 44px 28px 60px; text-align: center; }
.bb-check h1 { font-size: 30px; margin: 0 0 12px; }
.bb-check > p { margin: 6px auto; color: #333; max-width: 640px; font-size: 16px; }
.bb-check-card { margin-top: 26px; border: 1px solid #D6D8DD; border-radius: 12px; padding: 18px 24px 26px; box-shadow: 0 4px 18px rgba(0,0,0,.06); text-align: left; }
.bb-check-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid #E3E5E9; padding-bottom: 12px; margin-bottom: 20px; font-size: 17px; }
.bb-check-head .q-legend { margin: 0; }

/* Questions */
.bb-q { min-height: 100%; }
.bb-q.single .bb-pane { max-width: 780px; margin: 0 auto; padding: 24px 32px 56px; }
.bb-q.split { display: flex; min-height: 100%; }
.bb-left { flex: 1 1 50%; overflow: auto; padding: 24px 30px 40px; }
.bb-right { flex: 1 1 50%; overflow: auto; padding: 24px 30px 56px; }
.bb-q.split-left .bb-right, .bb-q.split-right .bb-left { flex: 0 0 0; padding: 0; overflow: hidden; }
.bb-divider { width: 8px; flex: none; background: #E3E5E9; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.div-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #9AA0AA; background: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; position: relative; z-index: 2; }
.div-btn svg { width: 16px; height: 16px; fill: none; stroke: #111; stroke-width: 2.4; }
.div-btn:hover { background: var(--bb-gray); }
.split-left .div-btn[data-split="left"] svg, .split-right .div-btn[data-split="right"] svg { transform: rotate(180deg); }

.bb-qbar { display: flex; align-items: center; gap: 12px; background: var(--bb-gray); border-bottom: 2px dashed #9AA0AA; padding: 0 10px 0 0; min-height: 42px; margin-bottom: 20px; }
.bb-qnum { background: #1E1E1E; color: var(--white); font-weight: 700; min-width: 36px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 17px; }
.bb-flag { background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 15px; font-weight: 500; padding: 6px 4px; color: #111; font-family: var(--font-bb); }
.bb-flag svg { width: 19px; height: 19px; fill: none; stroke: #111; stroke-width: 1.7; }
.bb-flag.on { font-weight: 700; }
.bb-flag.on svg { fill: var(--bb-flag); stroke: var(--bb-flag); }
.bb-abc { margin-left: auto; background: var(--white); border: 1.5px solid #111; border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: var(--font-bb); }
.bb-abc span { text-decoration: line-through; text-decoration-thickness: 2px; }
.bb-abc.on { background: var(--bb-blue); border-color: var(--bb-blue); color: var(--white); }

.bb-qbody { font-family: var(--font-q); font-size: 17px; line-height: 1.65; color: #111; }
.bb-qbody p { margin: 0 0 12px; }
.bb-stem { margin-bottom: 22px; }
.bb-stem .katex, .rv-stem .katex { font-size: 1.1em; }
.math-display { margin: 12px 0; overflow-x: auto; overflow-y: hidden; }
.q-figure { margin: 4px 0 18px; text-align: center; }
.q-figure img, .q-figure svg { max-width: 100%; height: auto; }
.plane { width: 320px; color: #111; }
.plane .pl-grid { stroke: #C9CCD2; stroke-width: .8; }
.plane .pl-axis { stroke: #111; stroke-width: 1.4; }
.plane .pl-line { stroke: #111; stroke-width: 2.2; }
.plane .pl-pt { fill: #111; }
.plane text { font-family: var(--font-q); font-size: 11px; fill: #111; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.plane .pl-name { font-style: italic; font-size: 13px; }
.q-table-wrap { overflow-x: auto; margin: 6px 0 16px; }
.q-table { border-collapse: collapse; margin: 0 auto; font-size: 16px; }
.q-table th, .q-table td { border: 1px solid #6B6F78; padding: 6px 16px; text-align: center; }
.q-table thead th { background: #F3F4F6; font-weight: 700; }
.q-table tbody th { font-weight: 700; text-align: left; background: #FAFAFB; }

/* Answer choices */
.bb-choices { display: flex; flex-direction: column; gap: 13px; }
.bb-choice-row { display: flex; align-items: center; gap: 10px; }
.bb-choice { flex: 1; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--white); border: 1.5px solid #3A3A3A; border-radius: 10px; padding: 10px 14px; min-height: 54px; cursor: pointer; font-family: var(--font-q); font-size: 17px; color: #111; position: relative; }
.bb-choice:hover:not(:disabled) { border-color: var(--bb-blue); }
.bb-letter { flex: none; width: 29px; height: 29px; border-radius: 50%; border: 1.5px solid #111; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-bb); font-weight: 700; font-size: 14px; }
.bb-choice-text .katex { font-size: 1.1em; }
.bb-choice-row.selected .bb-choice { border: 3px solid var(--bb-blue); padding: 8.5px 12.5px; }
.bb-choice-row.selected .bb-letter { background: var(--bb-blue); border-color: var(--bb-blue); color: var(--white); }
.bb-choice-row.crossed .bb-choice { color: #8A8F98; border-color: #B9BDC6; }
.bb-choice-row.crossed .bb-choice::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: #333; }
.bb-choice-row.crossed .bb-letter { border-color: #8A8F98; }
.bb-x { flex: none; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; position: relative; padding: 0; }
.bb-x span { width: 27px; height: 27px; border: 1.5px solid #111; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-family: var(--font-bb); }
.bb-x::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; background: #111; }
.bb-undo { flex: none; background: none; border: 0; text-decoration: underline; font-family: var(--font-bb); font-weight: 700; cursor: pointer; font-size: 15px; width: 52px; }

/* Student-produced response */
.spr-dir { font-family: var(--font-q); font-size: 15.5px; line-height: 1.55; }
.spr-dir h2 { font-family: var(--font-bb); font-size: 17px; margin: 0 0 12px; }
.spr-rules { padding-left: 20px; margin: 0 0 14px; }
.spr-rules li { margin: 7px 0; }
.spr-ex-cap { font-family: var(--font-bb); font-weight: 700; margin: 0 0 6px; }
.spr-ex { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spr-ex th, .spr-ex td { border: 1px solid #9AA0AA; padding: 6px 8px; text-align: center; vertical-align: middle; }
.spr-ex th { background: var(--bb-gray); font-family: var(--font-bb); font-size: 13px; }
.bb-spr { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.bb-spr-input { width: 180px; font-family: var(--font-q); font-size: 22px; padding: 8px 12px; border: 1.5px solid #3A3A3A; border-radius: 8px; border-bottom-width: 4px; }
.bb-spr-input:focus { outline: none; border-color: var(--bb-blue); }
.bb-suffix { font-family: var(--font-q); font-size: 22px; }
.bb-spr-preview { font-family: var(--font-bb); font-size: 15px; font-weight: 500; color: #333; }
.bb-spr-preview .katex { font-size: 1.25em; }

.pv-reveal { margin-top: 26px; border: 1px dashed var(--fix); border-radius: 8px; padding: 10px 14px; background: #FFFBEF; font-family: var(--font-ui); font-size: 15px; }
.pv-reveal summary { cursor: pointer; font-weight: 600; color: var(--fix); }
.pv-reveal .expl { font-family: var(--font-q); }

/* Floating tool windows (calculator, reference) */
.bb-win { position: absolute; z-index: 25; background: var(--white); border: 1px solid #A9AEB8; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; min-width: 300px; min-height: 44px; }
.bb-win-head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; background: #1E1E1E; color: var(--white); cursor: grab; user-select: none; flex: none; font-size: 15px; }
.bb-win-head:active { cursor: grabbing; }
.win-grip svg { width: 18px; height: 18px; fill: #BFC3CB; display: block; }
.win-btns { margin-left: auto; display: flex; }
.bb-win-head .icon-btn { color: var(--white); }
.bb-win-head .icon-btn:hover { background: rgba(255,255,255,.14); }
.seg { display: inline-flex; background: #3A3A3A; border-radius: 999px; padding: 2px; margin-left: 4px; }
.seg button { border: 0; background: none; color: #E5E7EB; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font-bb); }
.seg button.on { background: var(--white); color: #111; }
.bb-win-body { flex: 1; min-height: 0; position: relative; }
.calc-host { position: absolute; inset: 0; }
.calc-msg { position: absolute; inset: 0; padding: 22px; color: var(--muted); font-size: 14px; background: var(--white); }
.win-resize { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize; z-index: 5; background: linear-gradient(135deg, transparent 50%, #9AA0AA 50%, #9AA0AA 58%, transparent 58%, transparent 70%, #9AA0AA 70%, #9AA0AA 78%, transparent 78%); }
.ref-win.collapsed { height: auto !important; min-height: 0; }
.ref-win.collapsed .bb-win-body, .ref-win.collapsed .win-resize { display: none; }
.ref-body { overflow: auto; padding: 16px 18px 24px; }
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.ref-fig { text-align: center; font-size: 13px; }
.ref-fig svg { width: 100%; max-width: 120px; height: auto; fill: none; stroke: #111; stroke-width: 1.4; }
.ref-fig svg text { fill: #111; stroke: none; font-family: var(--font-q); font-style: italic; font-size: 11px; }
.ref-fig svg .dash { stroke-dasharray: 4 3; }
.ref-fig svg .thin { stroke-width: 1; }
.ref-fig svg .dot { fill: #111; }
.ref-fig svg .dash-fill { stroke-dasharray: 4 3; fill: none; }
.ref-f { margin-top: 2px; min-height: 20px; }
.ref-facts { margin: 16px 0 0; padding-left: 18px; font-family: var(--font-q); font-size: 15px; }
.ref-facts li { margin: 6px 0; }

/* Line reader */
.bb-lr { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.lr-mask { position: absolute; left: 0; right: 0; background: rgba(20,22,28,.55); }
.lr-top { top: 0; }
.lr-bottom { bottom: 0; }
.lr-band { position: absolute; left: 0; right: 0; border-top: 2px solid #1E1E1E; border-bottom: 2px solid #1E1E1E; outline: none; }
.lr-band:focus-visible { box-shadow: inset 0 0 0 3px #7C9CF5; }
.lr-grip { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 44px; background: #1E1E1E; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: grab; pointer-events: auto; }
.lr-grip svg { width: 18px; height: 18px; fill: var(--white); }
.lr-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: #1E1E1E; color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto; padding: 0; }
.lr-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.lr-size { position: absolute; left: 50%; bottom: -7px; margin-left: -24px; width: 48px; height: 12px; border-radius: 6px; background: #1E1E1E; cursor: ns-resize; pointer-events: auto; }

/* Full-page Bluebook steps (instructions, loading, finished) */
.bb-frame-main { flex: 1; overflow: auto; }
.bb-page { max-width: 720px; margin: 0 auto; padding: 48px 28px 60px; font-size: 17px; line-height: 1.6; }
.bb-page h1 { font-size: 30px; margin: 0 0 16px; }
.bb-page ul { padding-left: 22px; }
.bb-page li { margin: 8px 0; }
.bb-muted { color: #5B6170; font-size: 15px; }
.bb-note { background: var(--bb-blue-soft); border-left: 4px solid var(--bb-blue); padding: 12px 16px; border-radius: 6px; font-size: 15.5px; }
.intro-icon svg { width: 56px; height: 56px; fill: none; stroke: var(--bb-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro-body { margin-bottom: 8px; }
.intro-ack { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 14px 16px; border: 1.5px solid #C9CCD2; border-radius: 10px; font-weight: 600; cursor: pointer; }
.intro-ack input { width: 20px; height: 20px; }
.intro-steps { display: flex; gap: 8px; margin-top: 30px; }
.intro-steps span { width: 34px; height: 5px; border-radius: 3px; background: #D6D8DD; }
.intro-steps span.on { background: var(--bb-blue); }
.bb-time-table { border-collapse: collapse; margin: 4px 0 8px; font-size: 17px; }
.bb-time-table th { text-align: left; padding: 6px 28px 6px 0; }
.bb-time-table td { padding: 6px 0; font-variant-numeric: tabular-nums; }
.tool-list { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.tool-list li { display: flex; gap: 14px; align-items: flex-start; margin: 0 !important; }
.ti { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--bb-gray); display: inline-flex; align-items: center; justify-content: center; }
.ti svg { width: 26px; height: 26px; fill: none; stroke: #111; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ti.flag svg { fill: var(--bb-flag); stroke: var(--bb-flag); }
.ti.abc span { font-weight: 700; font-size: 13px; text-decoration: line-through; text-decoration-thickness: 2px; border: 1.5px solid #111; border-radius: 5px; padding: 1px 5px; }
.ti.q { background: #1E1E1E; color: var(--white); font-weight: 700; }
.bb-wait { max-width: 560px; margin: 0 auto; padding: 90px 28px; text-align: center; }
.bb-wait svg { width: 64px; height: 64px; fill: none; stroke: var(--bb-blue); stroke-width: 2.2; stroke-linecap: round; animation: tilt 2.4s ease-in-out infinite; }
@keyframes tilt { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(180deg); } }
.bb-wait h1 { font-size: 26px; margin: 18px 0 8px; }
.bb-page.done { text-align: center; padding-top: 80px; }
.done-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--bb-blue); margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.done-mark svg { width: 46px; height: 46px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Breaks */
.brk { position: fixed; inset: 0; z-index: 70; background: #20232B; color: var(--white); font-family: var(--font-bb); overflow: auto; display: flex; align-items: center; justify-content: center; padding: 30px; }
.brk-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; max-width: 980px; width: 100%; align-items: center; }
.brk-left { text-align: center; }
.brk-title { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #AEB6C8; margin: 0 0 18px; font-weight: 700; }
.brk-label { font-size: 18px; margin: 0 0 10px; font-weight: 500; }
.brk-time { display: inline-block; font-size: 64px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; background: var(--white); color: #111; border-radius: 14px; padding: 8px 36px; min-width: 260px; }
.brk-resume { display: block; margin: 28px auto 0; background: #F2B705; color: #111; border: 0; border-radius: 999px; padding: 13px 34px; font-size: 17px; font-weight: 700; cursor: pointer; font-family: var(--font-bb); }
.brk-resume:disabled { background: #5B6170; color: #C9CCD2; cursor: not-allowed; }
.brk-small { color: #AEB6C8; font-size: 14px; margin-top: 12px; }
.brk-right { border-left: 1px solid #3E4350; padding-left: 48px; font-size: 16px; line-height: 1.6; }
.brk-right h2 { font-size: 24px; margin: 0 0 10px; }
.brk-right h3 { font-size: 16px; margin: 22px 0 6px; color: #F2B705; }
.brk-right ol { padding-left: 22px; margin: 0; }
.brk-right li { margin: 5px 0; }

/* Full screen gate */
.fs-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; padding: 24px; font-family: var(--font-bb); }
.fs-card { max-width: 520px; text-align: center; }
.fs-card > svg { width: 56px; height: 56px; fill: none; stroke: var(--bb-blue); stroke-width: 2; stroke-linecap: round; }
.fs-card h2 { font-size: 26px; margin: 12px 0 10px; }
.fs-card p { color: #3B4352; font-size: 16px; margin: 0 0 22px; }

/* Smaller screens */
@media (max-width: 900px) {
  .bb-head { padding: 8px 12px; }
  .bb-tool { min-width: 0; padding: 6px; }
  .bb-tool span { display: none; }
  .bb-q.split { flex-direction: column; }
  .bb-divider { width: auto; height: 8px; flex-direction: row; }
  .div-btn { display: none; }
  .bb-left { order: 2; }
  .bb-right, .bb-left { flex: none; overflow: visible; padding: 18px 16px 24px; }
  .bb-q.single .bb-pane { padding: 18px 16px 40px; }
  .bb-foot { padding: 10px 12px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .bb-foot-left { display: none; }
  .bb-btn { padding: 9px 18px; }
  .brk-in { grid-template-columns: 1fr; gap: 28px; }
  .brk-right { border-left: 0; padding-left: 0; border-top: 1px solid #3E4350; padding-top: 24px; }
}
@media (max-width: 640px) {
  .bb-sec-title { font-size: 14px; }
  .bb-dir-btn { font-size: 13px; }
  .bb-timer { font-size: 19px; min-height: 24px; }
  .bb-qnav-btn { padding: 8px 10px; font-size: 13px; }
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
  .brk-time { font-size: 48px; min-width: 0; }
  .bb-page { padding: 30px 18px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-wait svg { animation: none; }
}
