/* ===== Design tokens ===== */
:root {
    --ct-font: 'Poppins', system-ui, sans-serif;

    /* Content area background (warm neutral + subtle gray tile pattern) */
    --ct-bg-surface: #f1ece4;
    --ct-pattern-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%23d4d4d4' fill-opacity='0.4'%3E%3Cpath d='M12 0h18v6h6v6h6v18h-6v6h-6v6H12v-6H6v-6H0V12h6V6h6V0zm12 6h-6v6h-6v6H6v6h6v6h6v6h6v-6h6v-6h6v-6h-6v-6h-6V6zm-6 12h6v6h-6v-6zm24 24h6v6h-6v-6z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
    --ct-bg-chat: #e5ddd5;
    --ct-bubble-sent: #dcf8c6;
    --ct-bubble-recv: #ffffff;
    --ct-header-bg: #ededed;
    --ct-input-bg: #f0f0f0;

    /* Brand accents (buttons/actions) */
    --ct-accent: #8a2be2;
    --ct-accent-dark: #7c1ed9;
    --ct-accent-soft: #d19cff;

    /* Neutrals */
    --ct-text: #1f2937;
    --ct-text-muted: #6b7280;
    --ct-border: #e5e7eb;
    --ct-danger: #ff3b30;
    --ct-success: #06e744;
    --ct-warning: #f59e0b;

    /* Layout */
    --ct-sidebar-w: 320px;
    --ct-radius: 10px;
    --ct-radius-lg: 16px;
    --ct-gap: 12px;
    --ct-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    --ct-z-modal: 9999;
}

[x-cloak] { display: none !important; }

/* The Test page is standalone (Layout = null), so the test UI owns the whole document. */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: var(--ct-bg-chat);
    font-family: var(--ct-font);   /* applies Poppins everywhere (chat + exam + modals) */
    color: var(--ct-text);
}
*, *::before, *::after { box-sizing: border-box; }

/* Session background tiles — see test-v2-patterns.css (+ extra); JS sets data-ct-pattern="0"…"6". */

/* ===== Shared shell: top bar (always visible) + body (mode-switched) ===== */
.ct-root { display: flex; flex-direction: column; height: 100dvh; }
.ct-body { flex: 1 1 auto; min-height: 0; position: relative; }
.ct-view { height: 100%; }

.ct-topbar {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 14px;
    height: 56px; padding: 0 18px;
    background: #fff; border-bottom: 1px solid var(--ct-border);
    font-family: var(--ct-font);
}
.ct-topbar__menu { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--ct-border); border-radius: 8px; background: #fff; color: var(--ct-accent); font-size: 18px; cursor: pointer; }
/* contain (not a circular crop): the CareerGraph mark is a square icon with transparent
   padding; a 50% radius + cover would clip its edges. Works for custom org logos too. */
.ct-topbar__logo { width: 34px; height: 34px; object-fit: contain; }
.ct-topbar__brand { font-weight: 600; color: var(--ct-text); }
.ct-topbar__qcounter { font-weight: 600; color: var(--ct-text); }
.ct-topbar__spacer { flex: 1; }
.ct-topbar__questions { flex-shrink: 0; white-space: nowrap; }
.ct-topbar__timer {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    min-width: 6.75em;
    flex-shrink: 0;
    text-align: center;
    color: var(--ct-text-muted);
    font-weight: 600;
    font-size: 14px;
}
.ct-topbar #google_translate_element { display: flex; align-items: center; }

/* menu is mobile-only; timer/brand drop on mobile to make room for the translate widget */
@media (min-width: 769px) { .ct-topbar__menu { display: none !important; } }
@media (max-width: 768px) {
    .ct-topbar { gap: 10px; padding: 0 12px; }
    .ct-topbar__brand { display: none; }
    .ct-topbar__timer { display: none !important; }
    .ct-topbar__logo { width: 28px; height: 28px; }
}

/* ===== App shell (grid: sidebar + main) ===== */
/* Single column during onboarding (sidebar is empty until the test starts);
   two columns once the test is in progress (status === 1).
   The explicit 1fr row makes .ct-main fill the full viewport height (so its inner
   transcript `1fr` can expand) instead of collapsing to content height. */
.ct-app {
    font-family: var(--ct-font);
    color: var(--ct-text);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ct-app--testing {
    grid-template-columns: var(--ct-sidebar-w) 1fr;
}

/* Sidebar is hidden by default (onboarding has no sidebar content). It only appears
   once the test is in progress (.ct-app--testing) or the mobile drawer is opened.
   CSS-driven so visibility never depends on per-element x-show timing. */
.ct-sidebar {
    display: none;
    background: #fff;
    border-right: 1px solid var(--ct-border);
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

/* Sidebar is present only during the test: a left column on desktop, an
   off-canvas drawer on mobile. Onboarding never shows it. */
.ct-app--testing .ct-sidebar {
    display: flex;
}

/* Hamburger is a MOBILE-ONLY control, and only while a test is running
   (there's nothing to toggle on desktop or during onboarding). */
.ct-hamburger {
    display: none;
}

/* Shared tiled background for onboarding chat + exam content areas. */
.ct-pattern-bg {
    background-color: var(--ct-bg-surface);
    background-image: var(--ct-pattern-image);
    background-repeat: repeat;
    position: relative;
    isolation: isolate;
}
.ct-pattern-bg > * {
    position: relative;
    z-index: 1;
}

.ct-main {
    display: grid;
    grid-template-rows: 1fr auto;   /* transcript (scrolls) + dock; header now lives in the shared top bar */
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

/* ===== Header ===== */
.ct-header {
    display: flex;
    align-items: center;
    gap: var(--ct-gap);
    height: 60px;
    padding: 0 16px;
    background: var(--ct-header-bg);
    border-bottom: 1px solid var(--ct-border);
}
.ct-header__logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ct-header__spacer { flex: 1; }

.ct-btn {
    border: none;
    background: var(--ct-accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--ct-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ct-btn:hover { background: var(--ct-accent-dark); }
.ct-btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.ct-btn--ghost { background: #fff; color: var(--ct-accent); border: 1px solid var(--ct-border); }
.ct-btn--muted { background: #888; }
/* Ghost/muted need their own hover — otherwise the generic .ct-btn:hover turns the
   background dark purple while ghost text stays purple (unreadable). */
.ct-btn--ghost:hover { background: rgba(138, 43, 226, 0.08); border-color: var(--ct-accent); color: var(--ct-accent); }
.ct-btn--muted:hover { background: #6b7280; }
.ct-btn--board {
    background: var(--ct-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(138, 43, 226, .35);
}
.ct-btn--board:hover { background: var(--ct-accent-dark); }

/* ===== Transcript ===== */
.ct-transcript {
    overflow-y: auto;
    min-height: 0;           /* allow the 1fr grid row to scroll instead of overflowing */
    width: 100%;
}
.ct-transcript__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: min-content;
}
@media (min-width: 769px) {
    .ct-transcript__inner {
        padding-bottom: clamp(120px, 24vh, 280px);
    }
}
.ct-msg { display: flex; max-width: 100%; }
.ct-msg--bot { justify-content: flex-start; }
.ct-msg--user { justify-content: flex-end; }
.ct-msg__bubble {
    max-width: 75%;
    padding: 12px 14px;
    border-radius: var(--ct-radius);
    background: var(--ct-bubble-recv);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    line-height: 1.45;
    word-wrap: break-word;
}
.ct-msg--user .ct-msg__bubble { background: var(--ct-bubble-sent); }
.ct-msg__bubble--wide { max-width: 90%; }

/* Chip multi-select (in a chat bubble) */
.ct-chip {
    border: 1px solid var(--ct-border);
    background: #fff;
    color: var(--ct-text);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ct-chip:hover { border-color: var(--ct-accent-soft); }
.ct-chip--on {
    background: var(--ct-accent);
    border-color: var(--ct-accent);
    color: #fff;
}

/* Objective answer cards (single-select, in the chat) */
.ct-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: 1px solid #c4cad3;          /* stronger, more visible separation */
    background: #fff;
    color: var(--ct-text);
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.ct-option:hover { border-color: var(--ct-accent-soft); }
/* Numbered badge anchoring each option */
.ct-option__num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef0f3;
    border: 1px solid #c4cad3;
    color: var(--ct-text-muted);
    font-size: 13px;
    font-weight: 600;
}
.ct-option__label { flex: 1 1 auto; }
.ct-option--on {
    border-color: var(--ct-accent);
    background: rgba(138, 43, 226, 0.08);
    box-shadow: inset 0 0 0 1px var(--ct-accent);
    font-weight: 500;
}
.ct-option--on .ct-option__num {
    background: var(--ct-accent);
    border-color: var(--ct-accent);
    color: #fff;
}
.ct-option:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Compact single-select pills in onboarding chat */
.ct-selectoptions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: min(240px, 42vh);
    overflow-y: auto;
}
.ct-selectopt {
    border: 1px solid #c4cad3;
    background: #fff;
    color: var(--ct-text);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.3;
    font-family: inherit;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.ct-selectopt:hover {
    border-color: var(--ct-accent-soft);
    background: rgba(138, 43, 226, 0.06);
}
.ct-selectopt:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* ===== Input dock ===== */
.ct-dock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ct-input-bg);
    border-top: 1px solid var(--ct-border);
    width: 100%;
}
.ct-dock input,
.ct-dock select,
.ct-dock textarea {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 16px; /* prevents iOS zoom */
    font-family: inherit;
    outline: none;
}

.ct-dock__phone {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.ct-combobox {
    position: relative;
    flex: 0 0 40%;
    min-width: 0;
}
.ct-combobox__trigger {
    width: 100%;
    text-align: left;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 10px 16px;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 16px;
    font-family: inherit;
    outline: none;
}
.ct-combobox__menu {
    position: fixed;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    z-index: 100;
}
.ct-combobox__menu li button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    border: none;
    background: none;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.ct-combobox__menu li button:hover {
    background: rgba(138, 43, 226, 0.08);
}
.ct-dock__phone input[type='tel'] {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 16px;
    font-family: inherit;
    outline: none;
}

/* ===== Sidebar: timer / progress / nav grid ===== */
.ct-timer { font-size: 2.2em; text-align: center; padding: 16px; color: var(--ct-text); }
.ct-progress { display: flex; gap: 4px; padding: 8px 16px; }
.ct-progress__seg { flex: 1; height: 8px; border-radius: 4px; background: #ccc; transition: background .3s; }
.ct-progress__seg--done { background: var(--ct-accent); }

.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px; padding: 16px; }
.ct-grid__box {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(0, 0, 0, .36);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.ct-grid__box--submitted { background: green; }
.ct-grid__box--skipped { background: orange; }
.ct-grid__box--current { background: var(--ct-accent); }

.ct-counts { display: flex; justify-content: space-evenly; padding: 8px 16px; }
.ct-count { padding: 5px 10px; border-radius: 5px; color: #fff; }
.ct-count--submitted { background: green; }
.ct-count--skipped { background: orange; }

.ct-social { display: flex; gap: 16px; padding: 16px; margin-top: auto; }
.ct-social img { width: 24px; height: 24px; }

/* ===== Floating WhatsApp button ===== */
/* Fixed bottom-right, lifted above the input dock so it never covers the Send button.
   z-index sits above transcript content but below the modal overlay (9999). Only visible
   in the chat phase (x-show in markup), so it never clashes with the exam's sticky
   actions / Questions pill or fires the tab-switch monitor mid-test. */
.ct-wa-fab {
    position: fixed;
    right: 20px;
    bottom: 88px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    z-index: 45;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.ct-wa-fab:hover {
    background: #1ebe5d;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    transform: translateY(-2px);
}
.ct-wa-fab svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 768px) {
    .ct-wa-fab { right: 16px; bottom: 84px; width: 52px; height: 52px; }
    .ct-wa-fab svg { width: 28px; height: 28px; }
}

/* ===== Modals ===== */
.ct-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--ct-z-modal);
}
.ct-modal {
    background: #fff;
    border-radius: var(--ct-radius-lg);
    padding: 32px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: var(--ct-shadow);
}
.ct-modal__icon { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; }
.ct-modal__icon--success { background: #10b981; }
.ct-modal__icon--error { background: #ef4444; }
.ct-modal__icon--warning { background: var(--ct-warning); }
.ct-modal__icon--info { background: #3b82f6; }

.ct-loader-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: var(--ct-z-modal); color: #fff; flex-direction: column; gap: 16px; }
.ct-spinner { width: 60px; height: 60px; border: 8px solid #f3f3f3; border-top: 8px solid var(--ct-accent); border-radius: 50%; animation: ct-spin 1s linear infinite; }
.ct-bubble-loading { display: flex; align-items: center; gap: 10px; }
.ct-bubble-loading__spinner {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border: 2px solid var(--ct-border);
    border-top-color: var(--ct-accent);
    border-radius: 50%;
    animation: ct-spin 0.8s linear infinite;
}
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ===== Anti-select ===== */
.ct-app, .ct-app * {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}
.ct-dock input, .ct-dock textarea { -webkit-user-select: text; user-select: text; }

/* ===== Responsive: sidebar becomes overlay drawer ===== */
@media (max-width: 768px) {
    .ct-app { grid-template-columns: 1fr; }
    .ct-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 85%;
        max-width: var(--ct-sidebar-w);
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 1000;
        box-shadow: var(--ct-shadow);
    }
    .ct-app--testing.ct-app--drawer-open .ct-sidebar { transform: translateX(0); }
    /* show the hamburger only on mobile while a test is running */
    .ct-app--testing .ct-hamburger { display: inline-flex; }
}

/* ============================================================
   Exam (focused test) view — used while status === InProgress
   Reuses .ct-option, .ct-grid, .ct-grid__box, .ct-btn.
   ============================================================ */
.ct-exam {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-height: 0;
    color: var(--ct-text);
    font-family: var(--ct-font);
}
.ct-exam__top {
    display: flex; align-items: center; gap: 14px;
    height: 56px; padding: 0 18px;
    background: #fff; border-bottom: 1px solid var(--ct-border);
}
.ct-exam__menu {
    display: none; width: 34px; height: 34px;
    border: 1px solid var(--ct-border); border-radius: 8px;
    background: #fff; color: var(--ct-accent); font-size: 18px; cursor: pointer;
}
.ct-exam__logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ct-exam__brand { font-weight: 600; }
.ct-exam__qcounter { display: none; font-weight: 600; }
.ct-exam__spacer { flex: 1; }
.ct-exam__timer { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--ct-text-muted); font-weight: 600; font-size: 14px; min-width: 6.75em; text-align: center; }

.ct-exam__progress { height: 6px; background: var(--ct-border); }
.ct-exam__fill { height: 100%; background: var(--ct-accent); transition: width .3s ease; }

.ct-section-progress {
    display: flex;
    gap: 4px;
    height: 8px;
    padding: 0 18px;
    background: transparent;
}
.ct-section-progress__seg {
    flex: 1;
    height: 100%;
    background: var(--ct-border);
    border-radius: 4px;
    overflow: hidden;
}
.ct-section-progress__fill {
    height: 100%;
    background: var(--ct-accent);
    transition: width .3s ease;
}

.ct-exam__body { display: grid; grid-template-columns: 260px 1fr; min-height: 0; }
.ct-exam__rail {
    background: #fff; border-right: 1px solid var(--ct-border);
    padding: 20px 18px; display: flex; flex-direction: column; gap: 18px;
    min-height: 0; overflow: auto;
}
.ct-exam__counter { font-size: 13px; color: var(--ct-text-muted); }
.ct-exam__counter b { display: block; font-size: 18px; color: var(--ct-text); font-weight: 600; margin-top: 2px; }
.ct-exam__section { font-size: 13px; color: var(--ct-text-muted); }
.ct-exam__legend { font-size: 12px; color: var(--ct-text-muted); display: flex; flex-direction: column; gap: 6px; }
.ct-exam__legend span { display: flex; align-items: center; gap: 8px; }
.ct-legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ct-exam__timerblock { margin-top: auto; text-align: center; font-size: 28px; color: var(--ct-text); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ct-exam__timerblock small { display: block; font-size: 12px; color: var(--ct-text-muted); }

.ct-exam__main { min-height: 0; overflow: auto; display: flex; justify-content: center; padding: 28px 28px 32px; }
.ct-exam__panel { width: 100%; max-width: 720px; }
.ct-exam__qhead { font-size: 13px; color: var(--ct-text-muted); margin-bottom: 8px; }
.ct-exam__qtext { font-size: 22px; font-weight: 600; line-height: 1.4; margin-bottom: 22px; }
.ct-opts { display: flex; flex-direction: column; gap: 10px; }
.ct-exam__textarea {
    width: 100%; border: 1px solid #c4cad3; border-radius: 12px;
    padding: 14px 16px; font-size: 15px; font-family: inherit; resize: vertical; outline: none;
}
.ct-exam__file {
    display: flex; flex-direction: column; gap: 8px;
    border: 1px dashed #c4cad3; border-radius: 12px; padding: 18px 16px; background: #fff; cursor: pointer;
}
.ct-exam__filehint { font-size: 12px; color: var(--ct-text-muted); }
.ct-exam__footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px calc(20px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--ct-border);
}

/* pill is mobile-only; the grid sheet works on both (x-show toggles it) */
.ct-exam__pill { display: none; }

/* Jump-grid overlay: centered popover on desktop, bottom sheet on mobile. */
.ct-exam__sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 60; }
.ct-exam__sheetinner {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(440px, 92vw); background: #fff; border-radius: 16px;
    padding: 18px; max-height: 80vh; overflow: auto; box-shadow: var(--ct-shadow);
}
.ct-exam__sheethead { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 14px; }
.ct-exam__sheetclose { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--ct-text-muted); }

@media (max-width: 768px) {
    .ct-exam__main { padding: 18px 16px 24px; }
    .ct-exam__qtext { font-size: 19px; }
    .ct-exam__footer { padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
    .ct-exam__footer .ct-btn { flex: 1; }
    .ct-topbar__questions { display: none !important; }
    .ct-exam__pill {
        display: inline-flex; align-items: center; gap: 6px; position: fixed; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        background: var(--ct-accent); color: #fff; border: none; border-radius: 999px;
        padding: 9px 15px; font-size: 13px; font-weight: 600;
        box-shadow: 0 4px 12px rgba(138, 43, 226, .4); z-index: 40; cursor: pointer;
    }
    /* bottom sheet on mobile */
    .ct-exam__sheetinner {
        left: 0; right: 0; bottom: 0; top: auto; transform: none;
        width: auto; max-width: none; border-radius: 16px 16px 0 0; max-height: 70vh;
    }
    .ct-exam__sheethead { margin-bottom: 14px; }
}
