/* Dual selector (shadow plan Step 1.2): the item type scale must apply
   inside per-item shadow roots (:host, via the adopted copy) as well as
   on the page (body). */
:host,
body {
    font-size: 14pt;
}

/* <p> intentionally falls through to the browser default
   (display:block, inline content flow). An earlier
   `display:flex; flex-wrap:wrap;` rule broke prose whitespace:
   flex containers discard whitespace text nodes at flex-item
   boundaries, so the spaces around inline <strong>/<em>
   formatting disappeared in the runtime renderer while Quill
   (its own scope) was unaffected. If a specific layout needs
   flex paragraphs, opt in with a class. */

dialog {
    font-size: 14pt;
}
/* Base styles for all math content */
math {
    font-family: "Latin Modern Math", Cambria Math, serif; /* Good mathematical font choices */
    font-size: 1.1em; /* Slightly larger than body text for readability */
    line-height: 1.5; /* Can help with vertical spacing, especially for fractions */
    color: var(--foreground); /* follows the active color theme */
    display: inline-block; /* Default for inline math, ensures consistent rendering */
    vertical-align: middle; /* Align inline math vertically with text */
    /* For block-level math, you'd use: */
    /* display: block; margin: 1em auto; text-align: center; */
}

    /* Ensure responsiveness for all math elements */
    /* This is particularly important for long equations on small screens */
    math[display="block"] {
        max-width: 100%;
        overflow-x: auto; /* Adds horizontal scrollbar if content overflows */
        padding-bottom: 0.5em; /* Prevent scrollbar from overlapping content */
    }

math .p-qti-error {
    font-size: 1.5em;
    color: red;
}

    math .p-qti-infocus {
        border: 2px solid red; 
    }

    math.p-qti-editbox {
        border: 2px solid #d1d5db; /* gray-300 - subtle border */
        border-radius: 0.75rem; /* rounded-xl - more rounded corners */
        min-width: 30em;
        padding-top: 3px;
        padding-bottom: 3px;
    }

/* The equation editor's visible input surface (EquationEditorTextbox wraps
   the live <math> in this plain div). Sizing lives HERE because Safari's
   MathML layout ignores CSS min-width on <math> itself — on mac the box
   shrank to hug the equation. The frame also gives the caret clickable
   runway past the end of the content. Static renders that detach the bare
   <math> (assertion chips) keep the math.p-qti-editbox styling above;
   inside a frame the math goes borderless so the box isn't doubled. */
.p-qti-eq-frame {
    display: inline-block;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    min-width: 30em;
    padding: 3px 6px;
    box-sizing: border-box;
    cursor: text;
}

.p-qti-eq-frame > math.p-qti-editbox {
    border: none;
    border-radius: 0;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Styling for specific MathML elements */
mi { /* Identifiers (variables, function names) */
    font-style: italic; /* Default for variables, can override if needed */
}

mn { /* Numbers */
    font-weight: normal; /* Numbers usually don't need bolding */
}

mo { /* Operators (+, -, =, etc.) */
    font-weight: bold;
}

mtext { /* Text within math (e.g., units, comments) */
    font-family: sans-serif; /* Use a readable sans-serif font for text */
    font-style: normal;
    color: #6c757d; /* Lighter color for annotations */
}

mo.p-qti-cursor {
    border: none;
    width: .2em;
    color: red;
    font-weight:lighter;
    z-index: 10;
}
mo.p-qti-cursor:focus {
    outline:none;
    font-weight: bold;
}

math msup.p-qti-cursor-highlight {
    color: red;
    font-weight: bold;
    border-color: red;
    border-style: dashed;
}

math .p-qti-selected,
table.p-qti-selected,
tr.p-qti-selected,
td.p-qti-selected,
div.p-qti-output-table .p-qti-selected {
    background-color: yellow;
}

math .p-qti-template {
    font-family: Courier, monospace;
    font-weight: bold;
    color: gray;
    border: 2px dashed lightgrey;
    padding: 3px 3px 3px 3px;
}

math .p-qti-cursor-highlight {
    color: red;
    font-weight: bold;
    outline: red;
}
math .p-qti-cursor-highlight:focus {
    outline: red;
}

math .p-qti-cursor-highlight-block {
    color: var(--foreground);
    font-weight: normal;
    outline: none;
}

img {
    max-width: 100%;
}
.p-qti-onscreen-keypad {
    width: fit-content;
    margin-top: 1em;
}
.p-qti-onscreen-keypad-key {
}

.p-qti-variable-name {
    font-family:Arial, Helvetica, sans-serif;
    font-style:oblique;
}

.p-qti-clickable {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: var(--foreground);
    /* Visual breathing room from neighbouring text. The renderer's
       inline span sits flush against adjacent characters when the
       source has no whitespace between, which leaves the underline
       butting into the previous/next glyph. margin-inline adds the
       gap outside the underlined region. */
    margin-inline: 0.2em;
}

.p-qti-tool-button.p-qti-disable {
    background-color: lightgray;
}

.p-qti-nonbutton:disabled,
.p-qti-nonbutton {
    border:none;
    background-color: inherit;
}

.p-qti-blank-key {
    background-color: lightgray;
}
.p-qti-close-button {
    background-image: url('/images/x-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    float: right;
}

.p-qti-columns {
    display: grid;
}

.p-qti-soft-break {
    display: block;
}

.p-qti-red-x {
    background-image: url('/images/red-x-circle.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em .1em .1em;
}

.p-qti-add {
    background-image: url('/images/plus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em .1em .1em;
}

.p-qti-subtract {
    background-image: url('/images/minus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em .1em .1em;
}
/* Render multiply / divide as inline text glyphs so the buttons match
   the other operator keys (+, -, =, …) which are typeset characters.
   The legacy SVG-background pattern rendered a fixed-size icon inside
   buttons whose own size came from the keypad's inline font-size, so
   the icons looked off-scale and visually inconsistent with text keys.
   Authors typically set label: ' ' on these keys, so the visible glyph
   comes from this ::before content; data-value on the button still
   carries '*' / '/' for the keystroke dispatch. */
.p-qti-multiply-button::before {
    content: '\00d7';  /* × multiplication sign */
}

.p-qti-divide-button::before {
    content: '\00f7';  /* ÷ division sign */
}

.p-qti-enter-button {
    background-image: url('/images/corner-down-left.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}


.p-qti-green-check {
    background-image: url('/images/green-check-circle.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em .1em .1em;
}

.p-qti-add-expression-button {
    background-image: url('/images/addExpression.svg');
    background-repeat: no-repeat;
    background-size: auto;
    height: 2em;
    width: 3em;
    margin: .1em .1em .1em .1em;
    border: none;
}
.p-qti-add-expression-button:disabled {
    background-color: grey;
    opacity: .5;

}

.p-qti-text-and-speak-button button, .p-qti-speak-button {
    background-image: url('/images/volume-2.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    background-color: white;
}

.p-qti-sign-button {
    background-image: url('/images/american-sign-language-interpreting.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    background-color: white;
}
.p-qti-braille-embossed-button {
    background-image: url('/images/printer.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    background-color: white;
}
.p-qti-calculator-button {
    background-image: url('/images/grid.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

.p-qti-notepad-button {
    background-image: url('/images/file-text.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

.p-qti-tool-button {
    background-color: white;
    height: 30px;
    width: 40px;
    margin: .1em .1em .1em .1em;
    border: none;
}
.p-qti-selecttool-button {
    background-image: url('/images/mouse-pointer.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}

.p-qti-trash-button {
    background-image: url('/images/trash-2.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}


.p-qti-delete-button {
    background-image: url('/images/delete.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}

.p-qti-rectangletool-button {
    background-image: url('/images/rectangletool.jpg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}
.p-qti-arrowtool-button {
    background-image: url('/images/arrowtool.jpg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
    border: none;
}

    .p-qti-selecttool-button.p-qti-selected,
    .p-qti-tool-button.p-qti-selected {
        -webkit-box-shadow: inset 0px 0px 5px #c1c1c1;
        -moz-box-shadow: inset 0px 0px 5px #c1c1c1;
        box-shadow: inset 0px 0px 5px #c1c1c1;
        outline: none;
    }

.p-qti-active {
    border: 2px solid black;
}

div.p-qti-numeric-keypad {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    width:fit-content;
    height: fit-content;
}

div.p-qti-number-display {
    min-height: 2.5rem;
    width: 100%;
    text-align: center;
    font-size: 2rem;
}

div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-add,
div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-subtract,
div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-enter-button,
div.p-qti-numeric-keypad button.p-qti-numeric-keypad-key {
    width: 4rem;
    height: 4rem;
    border: 3px groove lightgrey;
    padding: 0px 0px 0px 0px;
    margin: auto;
    font-size: 2rem;
}

div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-add:focus,
div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-subtract:focus,
div.p-qti-object-repeater > div.p-qti-controls > button.p-qti-enter-button:focus,
div.p-qti-numeric-keypad button.p-qti-numeric-keypad-key:focus {
    border-color: goldenrod;
    border-width: 5px;
}

div.p-qti-object-repeater div.p-qti-display {
    position: relative;
    margin-top: 4em;
}

    .p-qti-context-menu-row {
        position: fixed;
        z-index: 100;
        display: inline-flex;
        flex-direction: row;
        margin: 0 0 0 0;
        padding: 0 0 0 0;
    }
.p-qti-context-menu-row li {
    list-style-type: none;
}

.p-qti-dialog {
    border: 1px solid var(--foreground);
    background-color: var(--background);
}
.p-qti-dialog-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}


.p-qti-resize-handle {
    background: repeating-linear-gradient( 135deg, rgba(255,255,255,0) 0px, rgba(255,255,255,0) 4px, rgba(0,0,0,1) 6px );
    position: absolute;
    height: 15px;
    width: 15px;
    right: 0px;
    bottom: 0;
    /* Cursor on the BASE class, not just :hover — hover-only rules can
       show the underlying text I-beam while the pointer settles on the
       corner (seen on macOS). touch-action:none keeps a touch drag from
       scrolling instead of resizing. */
    cursor: nwse-resize;
    touch-action: none;
}

    .p-qti-resize-handle:focus, .p-qti-resize-handle:hover {
        cursor: nwse-resize;
    }

/* While a resize drag is live (ResizeHandle stamps this on <html>): the
   pointer easily outruns the 15px corner mid-drag, and without these the
   cursor flips to the text I-beam over surrounding content and the drag
   starts selecting text. */
html.p-qti-resizing,
html.p-qti-resizing * {
    cursor: nwse-resize !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.p-qti-widget-title {
    width: 100%;
    min-height: 2em;
    background-color: lightgray;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: .5em;
}

.p-qti-widget-title .p-qti-close-button {
    float: none;
    flex: 0 0 auto;
    margin-left: auto;
}
.p-qti-dialog-title {
    width: 100%;
    height: 2em;
    background-color: lightgray;
    display: block;
}
.p-qti-moveable {
    position: absolute;
    width: 30%;
    height: auto;
    z-index: 100;
    border: 2px solid grey;
    background-color: aliceblue;
}

.p-qti-dragging-span {
    background-image: url('/images/move.svg');
    background-repeat: no-repeat;
    background-size: contain;
    display: flex;
    height: 2em;
    margin: 0px 0px 2px 2px;
    flex: 10;
}

.p-qti-moveable-display {
    position: relative;
    width: 100%;
    height: 80%;
    padding: .5em;
    box-sizing: border-box;
}

.p-qti-fill-parent {
    height: 100%;
    width: 100%;
}

.p-qti-moveable-display .p-qti-fill-parent video {
    height: 100%;
}

.p-qti-text-and-speak-button {
    display: grid;
    grid-template-columns: 10fr 1fr;
}

/* Loading overlay. Renders the same TestQuill spinner the rest of the app
   uses (WAF.WaitForEvent / TestQuillSpinnerSmall.png) on a rotating
   pseudo-element, matching the WAF waf-spin animation (1.2s linear). The
   image is served from the engine's host /images/ path — the same
   convention as the other /images/ assets in this file — so QTIScripts
   stays self-contained and does not reference /WAFScripts/ or Scripts/. */
.p-qti-waiter {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: 99;
    background-color: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-qti-waiter::before {
    content: "";
    width: 100px;
    height: 100px;
    background-image: url(/images/TestQuillSpinnerSmall.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: p-qti-waiter-spin 1.2s linear infinite;
}

@keyframes p-qti-waiter-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
/* general presentation */
header.p-qti-stimulus-header {

}

div.p-qti-stimulus {
    height: calc(100vh - 40px);
    overflow:auto;
}

div.p-qti-item-container {
    height: calc(100vh - 40px);
    overflow: auto;
}

/* Split-pane container. The stimulus + item panes used float-based
 * qti-layout-col5/col7 whose widths + margin summed to ~100.01% and were
 * influenced by their content, so the stimulus pane overran the item
 * pane on first render (and only an unrelated reflow — e.g. activating
 * the hottext — corrected it). Make the row a flex container (the
 * split-vertical / stacked layout-mode rules below already assume flex
 * via flex-direction: column). */
.qti-layout-row.p-qti-stim-split {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

    /* Size the panes purely by a 5:7 grow ratio with a ZERO flex-basis
     * and min-width:0, so each pane is always a fixed fraction of the
     * row regardless of its content. This is what stops the stimulus
     * text from widening its pane into the item pane. */
    .qti-layout-row.p-qti-stim-split > .p-qti-stimulus,
    .qti-layout-row.p-qti-stim-split > .p-qti-item-container {
        float: none;
        margin: 0;
        min-width: 0;
        flex: 1 1 0;
        box-sizing: border-box;
    }

    .qti-layout-row.p-qti-stim-split > .p-qti-stimulus {
        flex-grow: 5;
    }

    .qti-layout-row.p-qti-stim-split > .p-qti-item-container {
        flex-grow: 7;
    }

    /* Stimulus content wraps at word boundaries; a word is only broken
     * mid-character when it alone is too long for the pane (otherwise it
     * would overflow). min-width:0 + flex-basis:0 above already keep the
     * pane content-independent, so break-word never widens it.
     * overflow-wrap is inherited, so setting it on the pane covers
     * descendants without an aggressive universal selector. */
    .qti-layout-row.p-qti-stim-split > .p-qti-stimulus {
        overflow-wrap: break-word;
    }

    .qti-layout-row.p-qti-stim-split > .p-qti-stimulus img,
    .qti-layout-row.p-qti-stim-split > .p-qti-stimulus table {
        max-width: 100%;
    }

/* Per-part Score button a container PCI places above each former item
   (frame hosts — PassageSet._placePartScoreButtons): a FULL-WIDTH bar in
   a contrasting dark teal-blue, so each part's scoring affordance reads
   as a section divider. White on #14506e is >= 7:1 (WCAG AAA). Mirrors
   the public demo's page-side .public-part-score-btn (ExamineeStyles.css)
   — keep the two in sync. */
.p-qti-part-score-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5em 1em;
    margin: 0.75em 0 0.5em;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    color: #fff;
    background: #14506e;
    border: 1px solid #0e3a51;
    border-radius: 4px;
    cursor: pointer;
}

.p-qti-part-score-btn:hover {
    background: #0e3a51;
}

.p-qti-part-score-btn:focus-visible {
    outline: 3px solid #0b4ea2;
    outline-offset: 2px;
}

/* ============================================================
 * Item-group presentation modes (StimulusPlan §Phase 7).
 *
 * SectionClass on PresentItemGroup carries layout + presentation
 * classes that the renderer applies to _presentationDiv. CSS rules
 * here handle the four authored layouts and three stimulus
 * presentation modes (stacked / tabs / highlight). Defaults match
 * today's behaviour — split-horizontal stacked.
 * ============================================================ */

.stimulus-layout-split-horizontal {
    /* Default — already provided by .qti-layout-row + .qti-layout-col5/7. */
}

.stimulus-layout-split-vertical {
    flex-direction: column;
}

    .stimulus-layout-split-vertical .qti-layout-col5,
    .stimulus-layout-split-vertical .qti-layout-col7 {
        width: 100% !important;
        max-width: 100%;
    }

.stimulus-layout-stacked {
    flex-direction: column;
}

    .stimulus-layout-stacked .p-qti-stimulus,
    .stimulus-layout-stacked .p-qti-item-container {
        height: auto;
        max-height: 50vh;
        width: 100%;
    }

.stimulus-layout-inline .p-qti-stimulus {
    /* Inline mode — stimulus rendered within the item body via
     * the SBAC-override path; the standalone stimulus pane is
     * suppressed. */
    display: none;
}

/* ============================================================
 * Stacked bilingual rendering (language variants, plan §10 / S6).
 * ONE composed artifact: each translated block keeps its element and
 * carries two child spans — the source reading and the translation
 * (lang-marked for assistive tech). The delivery layout class
 * (bilingual-source-top / bilingual-translation-top /
 * bilingual-side-by-side) picks the arrangement — pure CSS, never a
 * re-composition. DOM (reading) order is always source-first, so
 * screen readers hear one consistent order in every layout.
 * ============================================================ */

.tq-bilingual-pair > .tq-bilingual-source,
.tq-bilingual-pair > .tq-bilingual-translation {
    display: block;
}

.tq-bilingual-pair > .tq-bilingual-translation {
    margin-top: 0.25em;
}

.bilingual-translation-top .tq-bilingual-pair {
    display: flex;
    flex-direction: column-reverse;
}

    .bilingual-translation-top .tq-bilingual-pair > .tq-bilingual-translation {
        margin-top: 0;
        margin-bottom: 0.25em;
    }

.bilingual-side-by-side .tq-bilingual-pair {
    display: flex;
    flex-direction: row;
    gap: 1em;
}

    .bilingual-side-by-side .tq-bilingual-pair > .tq-bilingual-source,
    .bilingual-side-by-side .tq-bilingual-pair > .tq-bilingual-translation {
        flex: 1 1 0;
        min-width: 0;
        margin-top: 0;
    }

/* The translation side of a block whose response control lives in the
 * source reading shows a numbered marker at the translator's token —
 * 7:1 contrast on white per WCAG AAA. */
.tq-bilingual-token-marker {
    border: 1px solid #3c3c3c;
    border-radius: 999px;
    padding: 0 0.4em;
    font-size: 0.85em;
    color: #1a1a1a;
    background: #f2f2f2;
    white-space: nowrap;
}

/* Per-stimulus section wrappers inside the stimulus pane. */
section.p-qti-stimulus-entry {
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
}

    section.p-qti-stimulus-entry:last-child {
        border-bottom: none;
    }

/* Stacked is the default and needs no extra rules — sections
 * already stack via block layout. */

/* Tabs mode — tab strip lives at the top of _stimDiv with one
 * button per stimulus; only the active tabpanel is visible. */
.p-qti-stimulus-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #c7c7c7;
    margin-bottom: 6px;
}

.p-qti-stimulus-tab {
    background: #f3f3f3;
    border: 1px solid #c7c7c7;
    border-bottom: none;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 4px 4px 0 0;
}

    .p-qti-stimulus-tab[aria-selected="true"] {
        background: var(--background);
        font-weight: bold;
    }

/* Highlight mode — every stimulus stacked, but the ones the
 * focused item references get a visual emphasis class added/removed
 * by PresentationManager._prepareItemDiv's focusin handler. */
.p-qti-stimulus-highlight-mode section.p-qti-stimulus-entry {
    opacity: 0.55;
    transition: opacity 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .p-qti-stimulus-highlight-mode section.p-qti-stimulus-entry.p-qti-stimulus-active {
        opacity: 1;
        box-shadow: -3px 0 0 0 #2c7be5;
        background: #f8fbff;
    }

/*interactions*/

.p-qti-slider-interaction {
    display: grid;
    place-items: center;
    width: 100%;
    position: relative;
}

.p-qti-slider-interaction.p-qti-slider-vertical input[type=range] {
    appearance: slider-vertical;
    -webkit-appearance: slider-vertical;
    height: 250px;
    width: auto;
}

 div.p-qti-slider-interaction > div,
.p-qti-slider-interaction:first-child {
    width: 100%;
    position: relative;
    margin-top: 35px;
}

    div.p-qti-slider-interaction.p-qti-slider-vertical > div,
    .p-qti-slider-interaction.p-qti-slider-vertical:first-child {
       
        margin-top: 0px;
    }


    .p-qti-slider-interaction input[type=range] {
        -webkit-appearance: none; /* Override default CSS styles */
        appearance: none;
        width: 80%;
        height: 50px; /* Specified height */
        outline: none; /* Remove outline */
        opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
        -webkit-transition: .2s; /* 0.2 seconds transition on hover */
        transition: opacity .2s;
        margin-top: 0px;
        margin-bottom: 0px;
        padding: 0px 0px 0px 0px;
        padding-bottom: 0px;
        background: linear-gradient(.5turn,darkslategrey, white, darkslategrey);
    }
        .p-qti-slider-interaction input[type=range]::-webkit-slider-runnable-track {
            height: 100%;
            margin-top: 0px;
            margin-bottom: 0px;
        }
        .p-qti-slider-interaction input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; /* Override default CSS styles */
            appearance: none;
            height: 100%;
            width: 15px;
            background-color: transparent;
            border-radius: 50%;
            border-left: 4px solid black;
            border-right: 3px solid darkslategrey;
            border-style: solid;
        }

        .p-qti-slider-interaction input[type=range]::-moz-range-thumb{
            appearance: none;
            height: 100%;
            width: 15px;
            background-color: transparent;
            border-radius: 50%;
            border: 1px solid #f50;
            border-style:double;
        }
        .p-qti-slider-interaction input[type=range]::-moz-range-track{
            background-color: yellow;
            height: 100%;
            margin-top: 0px;
            margin-bottom: 0px;
        }

        .p-qti-slider-interaction label {
            font-size: 25px;
            width: 10%;
            vertical-align: central;
        }
        .p-qti-slider-interaction.p-qti-slider-vertical .p-qti-slider-output {
            margin-top: 0px;
        }
        .p-qti-slider-interaction .p-qti-slider-output {
            border: none;
/*            height: 50px;
            width:  6em;
            border-radius: 50%;
*/            font-size: large;
            font-weight: bold;
/*            background-color: lightgray;
            text-align: center;
*/            position: absolute;
              width: min-content;
            margin-top: 5px;
        }
        .p-qti-slider-interaction .p-qti-slider-ticks {
            height: 80%;
            display:inline-flex;
            justify-content:space-evenly;
            position: absolute;
        }

.p-qti-graphic-interaction {
    margin:2em 2em 2em 2em;
}

.p-qti-graphic-interaction>svg {
    outline:groove;
}

/* Background image fills the SVG canvas width while preserving its
 * intrinsic aspect ratio. Mirrors the authoring-side rule
 * (TestQuill.css: div.tq-graphic-canvas-editor > div.tq-svg-holder > svg > image)
 * so the image renders at the same size in the iframe runtime as it does
 * in the template editor. Without this, the SVG image relied on its
 * width/height attributes (which match the saved canvas dims), making
 * the rendered size brittle to attribute drift; the CSS rule decouples
 * visible size from saved attributes the same way authoring already does. */
.p-qti-graphic-interaction > svg > image.p-qti-background-image {
    width: 100%;
    height: auto;
}

.p-qti-graphic-interaction line.p-qti-added {
    color: red;
}

    .p-qti-graphic-interaction line.p-qti-added.p-qti-selected:focus,
    .p-qti-graphic-interaction line.p-qti-added.p-qti-selected {
        outline: none;
        marker-start: url('#dot1');
        marker-end: url('#dot1');
        stroke: black;
        stroke-width: 1;
    }

.p-qti-graphic-interaction marker.dot1 > circle:hover {
    cursor: nesw-resize;
}


.p-qti-graphic-interaction line.p-qti-arrow,
.p-qti-graphic-interaction line.p-qti-added.p-qti-arrow {
    marker-end: url('#arrow1');
}
    .p-qti-graphic-interaction line.p-qti-added.p-qti-arrow.p-qti-selected {
        outline: none;
        marker-start: url('#dot1');
        marker-end: url('#redarrow1');
    }


.p-qti-graphic-interaction svg line.p-qti-added.p-qti-arrow:focus {
    stroke-width: 1;
}
.p-qti-graphic-interaction svg line.p-qti-added.p-qti-arrow.p-qti-selected:focus {
    stroke-width: 1;
}


.p-qti-graphic-interaction svg line.p-qti-added:focus {
    outline: none;
    stroke-width: 5;
}
.p-qti-graphic-interaction polyline.p-qti-added.p-qti-selected {
    outline: none;
    marker-end: url('#dot1');
    marker-start: url('#dot1');
    marker-mid: url('#dot1');
}

/* A drawn circle has no vertices, so SVG marker-* (used by line/polyline above)
   can't apply. Highlight it the same way a selected hotspot is shown — a strong
   high-contrast stroke plus a halo — so it reads over any fill or pattern and
   meets the AAA visible-focus bar. */
.p-qti-graphic-interaction circle.p-qti-added.p-qti-selected:focus,
.p-qti-graphic-interaction circle.p-qti-added.p-qti-selected {
    outline: none;
    stroke: #0066cc;
    stroke-width: 3;
    filter: drop-shadow(0 0 4px #0066cc);
}


.p-qti-graphic-interaction svg .p-qti-hotspot {
    fill: transparent;
    stroke: black;
}


.p-qti-graphic-interaction svg .p-qti-hotspot.p-qti-drop-ready {
    stroke: red;
    stroke-width: 3;
}

.p-qti-graphic-interaction svg .p-qti-hotspot.p-qti-hotspot-selected {
    fill: rgba(0, 102, 204, 0.25);
    stroke: #0066cc;
    stroke-width: 3;
}

.p-qti-graphic-interaction svg .p-qti-hotspot:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.p-qti-graphic-interaction svg image.p-qti-added.p-qti-selected {
    outline: 3px solid red;
}

.p-qti-graphic-interaction svg.p-qti-dot-cursor {
    cursor:url(#dot1);
}


@keyframes circleThrob {
    from {
        r: 5;
    }

    to {
        r: 15;
    }
}



.p-qti-graphic-interaction svg circle.p-qti-encircle {
    fill: red;
    stroke: red;
    stroke-width: 3px;
    animation-duration: .33s;
    animation-iteration-count: infinite;
    animation-name: circleThrob;
}

.p-qti-graphic-interaction qti-gap-img {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

.p-qti-graphic-interaction qti-gap-img img {
    margin: 0.5em;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: grab;
    transition: all 0.2s;
}

.p-qti-graphic-interaction qti-gap-img img:hover {
    border-color: #0066cc;
    transform: scale(1.05);
}

.p-qti-graphic-interaction qti-gap-img img:active {
    cursor: grabbing;
}

.p-qti-graphic-interaction .p-qti-drag-pallette,
.p-qti-graphic-interaction .p-qti-drag-palette {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    margin-top: 1em;
    padding: 0.5em;
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #f9f9f9;
}

/* Drag palette images */
.p-qti-graphic-interaction .p-qti-drag-pallette img,
.p-qti-graphic-interaction .p-qti-drag-palette img {
    margin: 0.5em;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: grab;
    transition: all 0.2s;
}

.p-qti-graphic-interaction .p-qti-drag-pallette img:hover,
.p-qti-graphic-interaction .p-qti-drag-palette img:hover {
    border-color: #0066cc;
    transform: scale(1.05);
}

.p-qti-graphic-interaction .p-qti-drag-pallette img:active,
.p-qti-graphic-interaction .p-qti-drag-palette img:active {
    cursor: grabbing;
}

/* Image-palette placement (graphic gap match data-palette-position). Applied
   ONLY when an explicit p-qti-palette-<pos> class is present (set by
   GraphicResponseUtilities.positionDragPalette), so items with no attribute keep
   their historical block layout (palette below the canvas). The tool palette
   (Select/Delete) stays a full-width bar on top in every mode. */
.p-qti-graphic-interaction.p-qti-palette-above,
.p-qti-graphic-interaction.p-qti-palette-below {
    display: flex;
    flex-direction: column;
}

.p-qti-graphic-interaction.p-qti-palette-left,
.p-qti-graphic-interaction.p-qti-palette-right {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1em;
}

    .p-qti-graphic-interaction.p-qti-palette-left > .p-qti-tool-palette,
    .p-qti-graphic-interaction.p-qti-palette-right > .p-qti-tool-palette {
        flex: 0 0 100%;               /* keep the Select/Delete bar on its own top row */
    }

    .p-qti-graphic-interaction.p-qti-palette-left > svg,
    .p-qti-graphic-interaction.p-qti-palette-right > svg {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .p-qti-graphic-interaction.p-qti-palette-left > .p-qti-drag-pallette,
    .p-qti-graphic-interaction.p-qti-palette-right > .p-qti-drag-pallette {
        flex-direction: column;       /* a side palette stacks its images vertically */
        margin-top: 0;
    }

.p-qti-graphic-interaction.p-qti-palette-above > .p-qti-drag-pallette {
    margin-top: 0;
    margin-bottom: 1em;
}

/* Palette element ORIENTATION (graphic gap match data-palette-orientation),
   independent of the above/below/left/right placement. Absent / 'auto' applies
   no class, so the position-implied default stands (a side palette stacks, an
   above/below palette flows in a row — the historical look). These rules come
   AFTER the position rules so, on equal specificity, an explicit orientation
   wins — e.g. a LEFT palette can be forced to flow horizontally. */
.p-qti-graphic-interaction.p-qti-palette-orient-horizontal > .p-qti-drag-pallette,
.p-qti-graphic-interaction.p-qti-palette-orient-horizontal > .p-qti-drag-palette {
    flex-direction: row;
    flex-wrap: wrap;
}

.p-qti-graphic-interaction.p-qti-palette-orient-vertical > .p-qti-drag-pallette,
.p-qti-graphic-interaction.p-qti-palette-orient-vertical > .p-qti-drag-palette {
    flex-direction: column;
    flex-wrap: nowrap;
}

.p-qti-graphic-interaction .p-qti-prompt-container span.tq-image {
    display: inline-block;
    overflow: hidden;
}

.p-qti-graphic-interaction .p-qti-prompt-container span.tq-image img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.p-qti-extended-text-interaction {
    /* Block host: AUTO width fills the container minus the side
       margins. The old `width: 100%` + 1em side margins made the
       host 2em wider than every container, which kept the authoring
       stand-in iframe permanently scrollbarred (horizontal overflow
       → h-scrollbar → v-scrollbar) and spilled the editor's border
       past its container in delivery. */
    margin: 1em;
}

.p-inline-entry {
    display: inline-block;
}


ol.p-qti-no-linefeed > li > label > span > span > div:nth-child(1) {
    display: inline;
    padding: 0px;
    margin: 0px;
    border: 0px;
}

.p-qti-universal-number-line-interaction .p-grab-region {
    cursor: grab;
    fill: transparent;
    pointer-events: all;
}
.p-qti-universal-number-line-interaction svg {
    width: 98%;
    padding: 5px 5px 5px 5px;
}
.p-qti-universal-number-line-interaction svg:focus {
    outline: none;
}

.p-qti-universal-number-line-interaction svg line.p-dragging-thumb-line {
    stroke: red;
}

.p-qti-rapid-decompose,
.p-qti-rapid-choice,
.p-qti-rapid-compare {
    /* Containing block for the absolutely-positioned .p-qti-shield, which
       is appended here (RapidResponse.js). Without it the shield sizes to
       the nearest positioned ancestor and covers far more than the
       interaction. */
    position: relative;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    align-content: center;
}
.p-qti-rapid-quantity {
    /* Containing block for the .p-qti-shield overlay — see above. */
    position: relative;
    display: grid;
    justify-content: center;
}

.p-qti-shield {
    background-color: aqua;
    position: absolute;
    z-index: 5;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

div.p-qti-rapid-decompose div.p-qti-quantity-stimulus,
div.p-qti-rapid-quantity div.p-qti-quantity-stimulus {
    display: grid;
    width: fit-content;
    height: fit-content;
}

div.p-qti-rapid-decompose div.p-qti-quantity-stimulus {
    text-align: center;
}

div.p-qti-rapid-compare div.p-qti-quantity-stimulus{
    display: flex;
    justify-content: center;
}
div.p-qti-rapid-quantity div.p-qti-quantity-stimulus > svg {
    margin: 10px;
}
div.p-qti-rapid-choice div.p-qti-response,
div.p-qti-rapid-quantity div.p-qti-response {
    display: grid;
    width: auto;
    height: fit-content;
}

div.p-qti-rapid-choice div.p-qti-quantity-stimulus > div {
    font-weight: bold;
    border: outset;
    text-align: center;
    height: fit-content;
    align-self: center;
}

 
div.p-qti-rapid-compare div.p-qti-quantity-stimulus > div,
div.p-qti-rapid-quantity div.p-qti-response > div {
    background-color: lightgray;
    font-weight: bold;
    border: outset;
    text-align: center;
    height: fit-content;
}
div.p-qti-rapid-choice div.p-qti-response > div,
div.p-qti-rapid-compare div.p-qti-quantity-stimulus > div {
    margin: 40px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Simulation table empty row styling */
.p-qti-output-table tr.p-qti-output-table-row-empty {
    background-color: transparent;
    border: none;
}

.p-qti-output-table tr.p-qti-output-table-row-empty td {
    background-color: transparent;
    border: none;
    min-height: 1.5em;
    height: 1.5em;
}

/* ========== WCAG 2.1 AA Accessibility Enhancements ========== */

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* High contrast focus indicators for widgets */
.p-qti-range-widget:focus,
.p-qti-numeric-widget:focus,
.p-qti-select-widget:focus,
.p-qti-checkbox-widget:focus,
.p-qti-radio-widget-group input[type="radio"]:focus {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

/* Widget spacing for proper layout */
.p-qti-widget-wrapper {
    margin-bottom: 1rem;
}

/* Checkbox and radio spacing with minimum touch target size */
.p-qti-checkbox-wrapper,
.p-qti-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

/* Delete button minimum touch target size */
.p-qti-delete-row-button {
    min-width: 44px;
    min-height: 44px;
}

/* Fieldset styling for radio groups */
.p-qti-radio-fieldset {
    border: 1px solid #ccc;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.p-qti-radio-fieldset legend {
    padding: 0 0.5rem;
    font-weight: bold;
}

/* Radio orientation: vertical (default) */
.p-qti-radio-widget-group.p-qti-radio-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Radio orientation: horizontal with wrapping */
.p-qti-radio-widget-group.p-qti-radio-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* Button-style radio (hide input circles) */
.p-qti-radio-widget-group.p-qti-radio-hide-input input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.p-qti-radio-widget-group.p-qti-radio-hide-input .p-qti-radio-option {
    margin: 0;
}

.p-qti-radio-widget-group.p-qti-radio-hide-input label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #ccc;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-qti-radio-widget-group.p-qti-radio-hide-input label:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* Selected (depressed) state for button-style radio */
.p-qti-radio-widget-group.p-qti-radio-hide-input input[type="radio"]:checked + label {
    background-color: #2563eb;
    border-color: #1d4ed8;
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Focus state for button-style radio */
.p-qti-radio-widget-group.p-qti-radio-hide-input input[type="radio"]:focus + label {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

/* Button-style checkbox (hide input squares) */
.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #ccc;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input label:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* Checked state - shows as pressed/selected button */
.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input input[type="checkbox"]:checked + label {
    background-color: #2563eb;
    border-color: #1d4ed8;
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Focus state for accessibility */
.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input input[type="checkbox"]:focus + label {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

/* Checkbox images - consistent sizing */
.p-qti-checkbox-wrapper.p-qti-checkbox-hide-input label img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ========== Additional WCAG 2.1 AA Compliance Utilities ========== */

/* Screen reader only class (alias for .visually-hidden) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* General focus indicators for all interactive elements (WCAG 2.1 AA: 3:1 contrast) */
*:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(0, 95, 204, 0.2);
}

/* The item card (role="article") is focused programmatically on load
   (ContentFactory targetDiv.focus()) so screen-reader/keyboard context lands
   on the new item. Its container, .p-qti-item-container, is overflow:auto, so
   the global OUTSET ring above is clipped to just the card's bottom edge —
   the stray partial blue line. Draw the ring INSET on the card instead so all
   four sides stay inside the clip box and render as a full ring. */
.p-qti-item-container > [role="article"]:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: -3px;
    box-shadow: none;
}

/* Touch targets for buttons within StandardInteractions only (WCAG 2.5.5: min 44x44px) */
[class*="p-qti-"] button,
[class*="p-qti-"] input[type="button"],
[class*="p-qti-"] input[type="submit"],
[class*="p-qti-"] input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
/*    padding: 8px 16px;
*/}

[class*="p-qti-"] input[type="checkbox"],
[class*="p-qti-"] input[type="radio"] {
    width: 24px;
    height: 24px;
    margin: 10px; /* Creates 44x44 target with label */
}

/* Invalid state styling for form fields */
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: #d32f2f;
    background-color: #ffebee;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    *:focus-visible {
        outline-width: 4px;
        outline-offset: 3px;
    }
}

/* Reduced motion support */
/*@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
*/
/* ========== Interaction-Specific WCAG Styles ========== */

/* TextEntry wrapper and label styling */
.p-qti-text-entry-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.p-qti-text-entry-wrapper label {
    font-weight: 500;
}

.p-qti-text-entry-wrapper input {
    font-size: 1rem;
    padding: 0.5rem 0.5rem 0 0.5rem;
    margin-bottom: 0;
}

/* InlineChoice wrapper and label styling */
.p-qti-inline-choice-wrapper {
    display: inline-block;
    vertical-align: baseline;
}

.p-qti-inline-choice-wrapper .p-qti-custom-select {
    font-size: 1rem;
    margin-bottom: 0;
    width: auto;
}

.p-qti-inline-choice-wrapper .p-qti-custom-select-value img,
.p-qti-inline-choice-wrapper .p-qti-custom-select-option img {
    max-height: none;
    max-width: 100%;
    height: auto;
}

/* ExtendedText wrapper and character counter */
.p-qti-extended-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.p-qti-extended-text-wrapper label {
    font-weight: 500;
}

.p-qti-extended-text-editor {
    font-size: 1rem;
    padding: 0.5rem;
    font-family: inherit;
    border: 1px solid #999;
    border-radius: 3px;
    background: var(--background);
    outline: none;
    overflow-y: auto;
}

.p-qti-extended-text-editor:focus {
    outline: 2px solid #005fcc;
    outline-offset: 1px;
}

.p-qti-extended-text-editor[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #888;
    pointer-events: none;
}

/* format="plain" / "preformatted" render as a native textarea. */
.p-qti-extended-text-editor.p-qti-extended-text-plain {
    width: 100%;
    resize: vertical;
}

.p-qti-extended-text-editor.p-qti-extended-text-preformatted {
    font-family: monospace;
    white-space: pre-wrap;
}

.p-qti-squire-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: var(--well-bg);
}

.p-qti-squire-toolbar-button {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    /* Buttons do NOT inherit text color — without this the B/I/U glyphs
       stay UA-default black on the themed toolbar (illegible under
       default-reverse and every other dark theme). */
    color: var(--foreground);
}

.p-qti-squire-toolbar-button:hover,
.p-qti-squire-toolbar-button:focus {
    border-color: #999;
    background: var(--background);
    outline: none;
}

/* Pressed state through the theme tokens (was hardcoded #cde, which under
   a dark theme became a light chip with theme-white glyphs — invisible).
   Default theme keeps a light-gray chip with dark glyphs, dark themes get
   the inverse; the foreground border marks the toggle in every theme. */
.p-qti-squire-toolbar-button[aria-pressed="true"] {
    background: var(--secondary);
    color: var(--secondary-complement);
    border-color: var(--foreground);
}

.p-qti-character-counter {
    font-size: 0.875rem;
    color: var(--foreground);
    text-align: right;
}

/* Choice fieldset styling */
.p-qti-choice-fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.p-qti-choice-fieldset legend {
    padding: 0 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* CHILD combinators on purpose: these rules style the CHOICES list (the
   fieldset's direct <ol> and its <li>s), never lists the author put
   INSIDE an option's content. As descendant selectors they flattened
   authored bullets/numbers — list-style:none killed <ol> numbering and
   display:flex on the <li> suppresses the marker box, so authored
   bullets vanished in delivery and the authoring/scoring previews. */
.p-qti-choice-fieldset > ol {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.p-qti-choice-fieldset > ol > li {
    padding: 0.5rem 0;
    /* Flex row so the generated choice label (li::before — "A)", "1.", …) sits
       inline before the flex <label>; without this the block-level label wraps
       and the number lands on its own line above the choice. */
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.p-qti-choice-fieldset > ol > li > label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.p-qti-choice-fieldset input[type="radio"],
.p-qti-choice-fieldset input[type="checkbox"] {
    cursor: pointer;
}

/* Slider wrapper styling */
.p-qti-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.p-qti-slider-wrapper label {
    font-weight: 500;
}

.p-qti-slider-output {
    font-weight: 600;
    font-size: 1.1rem;
    color: #005fcc;
    padding: 0.25rem 0.5rem;
    background-color: #e3f2fd;
    border-radius: 4px;
    display: inline-block;
    min-width: 3em;
    text-align: center;
}

/* Match interaction wrapper and grid */
.p-qti-match-wrapper {
    margin-bottom: 1rem;
}

.p-qti-match-wrapper table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1rem;
}

.p-qti-match-wrapper caption {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: left;
    padding: 0.5rem 0;
    caption-side: top;
}

.p-qti-match-wrapper th,
.p-qti-match-wrapper td {
    border: 1px solid #ccc;
    padding: 0.75rem;
    text-align: center;
}

.p-qti-match-wrapper th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.p-qti-match-wrapper td.p-qti-active {
    outline: 3px solid #005fcc;
    outline-offset: -3px;
    background-color: #e3f2fd;
}

.p-qti-match-wrapper td input[type="checkbox"] {
    margin: 0;
}

/* Hide table visually but keep accessible to screen readers */
.p-qti-hidden-visually {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Checkbox wrapper for hide table option */
.p-qti-hide-table-wrapper {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.p-qti-hide-table-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.p-qti-hide-table-label {
    cursor: pointer;
    user-select: none;
}

/* Rendered HTML labels in widgets */
.p-qti-widget-wrapper label,
.p-qti-radio-fieldset legend,
.p-qti-checkbox-wrapper label {
    display: block;
}

/* Author-inserted content tables (TQTable). Delivery styling mirrors the
   authoring look in Scripts/css/TestQuill.css so a bordered, header-emphasized
   table renders the same for students as it did for the author. */
table.tq-content-table {
    border-collapse: collapse;
    margin: 0.6em 0;
}

table.tq-content-table > tbody > tr > th,
table.tq-content-table > tbody > tr > td {
    border: 1px solid #98a2b3;
    padding: 6px 10px;
    vertical-align: top;
    text-align: left;
}

table.tq-content-table > tbody > tr > th {
    background: #eef2f6;
    font-weight: 600;
}

/* Cell lines + in-cell lists (authoring's cell-line model) — the delivery
   match to the editor rules in Scripts/css/TestQuill.css. qti-cell-line is
   a custom element (needs display:block); list lines group under
   qti-cell-list (role="list" / role="listitem" carry the semantics; the
   markers and numbering are CSS). */
qti-cell-line,
qti-col-line {
    display: block;
}

qti-cell-list {
    display: block;
    padding-left: 1.6em;
    counter-reset: tq-cell-ol;
}

qti-cell-list > qti-cell-line,
qti-cell-list > qti-col-line {
    display: list-item;
}

qti-cell-list[data-list-kind="bullet"] > qti-cell-line,
qti-cell-list[data-list-kind="bullet"] > qti-col-line {
    list-style-type: disc;
}

qti-cell-list[data-list-kind="ordered"] > qti-cell-line,
qti-cell-list[data-list-kind="ordered"] > qti-col-line {
    list-style-type: none;
    counter-increment: tq-cell-ol;
}

qti-cell-list[data-list-kind="ordered"] > qti-cell-line::before,
qti-cell-list[data-list-kind="ordered"] > qti-col-line::before {
    content: counter(tq-cell-ol) ". ";
}

/* Author-applied footnote block style (styles dropdown -> div.qti-footnote).
   Small, muted text set off by a top rule — the delivery match to the editor
   rule in Scripts/css/TestQuill.css. */
.qti-footnote {
    font-size: 0.85em;
    color: #475467;
    border-top: 1px solid #d0d5dd;
    margin-top: 0.75em;
    padding-top: 0.4em;
}

/* Click-to-view box — NATIVE <details>/<summary>, pure HTML + CSS by owner
   constraint (2026-07-22): NO delivery JavaScript. The browser provides the
   toggle; this CSS provides the button face and the modal LOOK when open.
   Closing = clicking the button again, or its ✕ (a summary pseudo-element,
   so it is part of the native toggle). The backdrop is a pseudo-element of
   the <details> itself — clicks on it do NOT hit the summary and therefore
   do NOT close the box (owner decision preserved). No Esc-close and no
   focus trap: both would require script. Native <details> announces
   expanded/collapsed to assistive tech on its own.
   Contrast: #101828 on #f0f4f8 > 14:1. */
details.p-qti-click-to-view {
    display: block;
    margin: 0.5em 0;
}

details.p-qti-click-to-view > summary.p-qti-ctv-label {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #475467;
    border-radius: 6px;
    background: #f0f4f8;
    color: #101828;
    cursor: pointer;
    /* Reads as a button, not a disclosure widget — hide the marker. */
    list-style: none;
}

details.p-qti-click-to-view > summary.p-qti-ctv-label::-webkit-details-marker {
    display: none;
}

details.p-qti-click-to-view > summary.p-qti-ctv-label:hover,
details.p-qti-click-to-view > summary.p-qti-ctv-label:focus {
    background: #e4e9f0;
}

details.p-qti-click-to-view > summary.p-qti-ctv-label:focus-visible {
    outline: 2px solid #1565c0;
    outline-offset: 2px;
}

/* Authored label lines arrive as <div> blocks; render them inline in the
   button face (images ride inline too). */
details.p-qti-click-to-view > summary.p-qti-ctv-label div {
    display: inline;
}

details.p-qti-click-to-view > summary.p-qti-ctv-label img {
    max-height: 3em;
    vertical-align: middle;
}

/* OPEN: dimmed backdrop drawn by the details element itself. Clicks here
   target the details (not the summary) — they don't toggle. */
details.p-qti-click-to-view[open]::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 800;
    background: rgba(16, 24, 40, 0.5);
}

/* The content becomes a top-anchored, centered, modal-looking panel. Top-
   anchored (not vertically centered) so the panel's top edge is a KNOWN
   viewport position the ✕ below can align to without script. */
details.p-qti-click-to-view[open] > .p-qti-ctv-content {
    position: fixed;
    top: 8vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 810;
    width: min(900px, 92vw);
    max-height: 84vh;
    overflow: auto;
    background: #ffffff;
    color: #101828;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    padding: 20px 48px 20px 24px;
}

/* The summary stays above the backdrop — clicking the original button
   again closes the box… */
details.p-qti-click-to-view[open] > summary.p-qti-ctv-label {
    position: relative;
    z-index: 820;
}

/* …and a ✕ pinned to the panel's top-right corner closes it too: it is a
   pseudo-element OF THE SUMMARY, so clicking it is the native toggle.
   Position derives from the panel geometry above (top 8vh; half-width
   min(450px, 46vw)). */
details.p-qti-click-to-view[open] > summary.p-qti-ctv-label::after {
    content: '✕';
    position: fixed;
    top: calc(8vh + 8px);
    left: calc(50% + min(450px, 46vw) - 40px);
    z-index: 820;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #101828;
    font-size: 15px;
    line-height: 1;
}

/* Rendered HTML labels in tables */
.p-qti-output-table th {
    vertical-align: top;
}

    /* Image sizing in labels */
    .p-qti-widget-wrapper label img,
    .p-qti-radio-fieldset legend img,
    .p-qti-checkbox-wrapper label img,
    .p-qti-output-table th img {
        max-width: 100%;
        height: auto;
        vertical-align: middle;
    }

/* Radio button images - consistent sizing based on tallest image */
.p-qti-radio-widget-group.p-qti-radio-hide-input label img {
    width: var(--radio-image-size, auto);
    height: var(--radio-image-size, auto);
    max-width: var(--radio-image-size, 100%);
    max-height: var(--radio-image-size, 100%);
    object-fit: contain;
    display: block;
}

/* ========== HOTTEXT INTERACTION ========== */

.p-qti-hottext-container {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.p-qti-hottext-passage {
    line-height: 1.8;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.p-qti-hottext-passage p,
.p-qti-hottext-passage div {
    max-width: 100%;
    overflow-wrap: break-word;
}

.p-qti-hottext-prompt {
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* A bare <qti-hottext> region — passage markup BEFORE the reader activates the
 * highlighter (or any preview where the runtime has not yet added
 * .p-qti-hottext-region) — has no padding, so two regions that kept their
 * trailing punctuation render butted together ("thereof;or abridging"). The
 * activated region's horizontal padding is what visually separates them; apply
 * the same padding to the bare element so the inter-region gap is present at all
 * times, not only after the highlighter is clicked. */
qti-hottext {
    padding: 1px 2px;
}

.p-qti-hottext-region {
    cursor: default;
    border-bottom: 1px dashed transparent;
    border-radius: 2px;
    padding: 1px 2px;
    transition: border-color 0.15s, background-color 0.15s;
    overflow-wrap: break-word;
}

/* Two forms: self-contained mode puts p-qti-hottext-active on the
 * passage ANCESTOR (descendant selector); passage-associated mode puts
 * both classes on the SAME <qti-hottext> region (compound selector). */
.p-qti-hottext-active .p-qti-hottext-region,
.p-qti-hottext-region.p-qti-hottext-active {
    cursor: pointer;
}

/* Selectable regions stay visually plain until hovered or keyboard-
 * focused (discover-by-interaction), then reveal a dashed underline, a
 * subtle background, and the same solid outline border keyboard focus
 * shows — so the mouse hover and keyboard navigation look identical.
 * Keyboard focus uses :focus-visible (not :focus) so a mouse click that
 * focuses the region doesn't keep the outline lit after the pointer
 * leaves — the reveal follows the pointer and clears on hover-out.
 * The base rule keeps a transparent dashed border so revealing it
 * doesn't shift the layout. */
.p-qti-hottext-active .p-qti-hottext-region:hover,
.p-qti-hottext-active .p-qti-hottext-region:focus-visible,
.p-qti-hottext-region.p-qti-hottext-active:hover,
.p-qti-hottext-region.p-qti-hottext-active:focus-visible {
    background-color: #e8f4fd;
    border-bottom-color: #0078D4;
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

.p-qti-hottext-region:focus-visible {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

.p-qti-hottext-region.p-qti-hottext-selected {
    background-color: #cce5ff;
    border-bottom: 2px solid #004085;
}

@media (forced-colors: active) {
    .p-qti-hottext-region.p-qti-hottext-selected {
        outline: 2px solid Highlight;
    }
}

/* Highlighter icon (passage-associated mode) */
.p-qti-hottext-activator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #0078D4;
    border-radius: 6px;
    background: #f0f8ff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.15s, box-shadow 0.15s;
}

.p-qti-hottext-activator:hover {
    background: #d6eaff;
}

.p-qti-hottext-activator.p-qti-hottext-icon-active {
    background: #0078D4;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

.p-qti-hottext-activator:focus-visible {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

/* Selected regions echoed inside the item while the interaction is not
 * focused (its passage highlights are hidden). */
.p-qti-hottext-in-item {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.5rem;
}

.p-qti-hottext-chosen {
    background-color: #cce5ff;
    border-bottom: 2px solid #004085;
    border-radius: 2px;
    padding: 1px 4px;
    overflow-wrap: break-word;
}

/* ========== CUSTOM SELECT WIDGET (Rich-Text Support) ========== */

.p-qti-custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.p-qti-custom-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem;
    font-size: 1rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.p-qti-custom-select-button:hover {
    border-color: #999;
}

.p-qti-custom-select-button:focus {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

.p-qti-custom-select-button[aria-expanded="true"] {
    border-color: #0078D4;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.p-qti-custom-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-qti-custom-select-value img {
    max-height: 1.5rem;
    vertical-align: middle;
}

.p-qti-custom-select-arrow {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #666;
    transition: transform 0.2s;
}

.p-qti-custom-select-button[aria-expanded="true"] .p-qti-custom-select-arrow {
    transform: rotate(180deg);
}

.p-qti-custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Match the button's control font (the rest of the widget uses 1rem); without
       this the list inherits the larger 14pt body font, so options looked bigger
       than the selected value shown in the closed button. */
    font-size: 1rem;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: white;
    border: 1px solid #0078D4;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.p-qti-custom-select-option {
    min-height: 44px;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.p-qti-custom-select-option:hover,
.p-qti-custom-select-option.p-qti-focused {
    background-color: #f0f0f0;
}

.p-qti-custom-select-option[aria-selected="true"] {
    background-color: #e3f2fd;
    font-weight: bold;
}

.p-qti-custom-select-option[aria-selected="true"]::before {
    content: '? ';
    margin-right: 0.5rem;
    color: #0078D4;
}

.p-qti-custom-select-option img {
    max-height: 2rem;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Disabled state */
.p-qti-custom-select-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* BabySim Prompt Container (Player) */
.p-qti-prompt-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.p-qti-prompt-container img {
    max-width: 100%;
    height: auto;
}

.p-qti-prompt-container p {
    margin: 0 0 0.5rem 0;
}

.p-qti-prompt-container p:last-child {
    margin-bottom: 0;
}

/* ========== GO BUTTON STYLING ========== */

.p-qti-go-button {
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.p-qti-go-button:hover {
    background-color: #16a34a;
}

.p-qti-go-button:focus {
    outline: 3px solid #0078D4;
    outline-offset: 2px;
}

.p-qti-go-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* ========== HORIZONTAL WIDGET LAYOUT ========== */

/* Horizontal widget layout */
.p-qti-widget-container.p-qti-widgets-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.p-qti-widget-container.p-qti-widgets-horizontal .p-qti-widget-wrapper {
    margin-bottom: 0;
    flex: 0 1 auto;
}

/* Go button on its own line in horizontal layout */
.p-qti-widget-container.p-qti-widgets-horizontal .p-qti-go-button {
    flex-basis: 100%;
    width: auto;
    align-self: flex-start;
}

/* ========== LINE READER ========== */

.p-qti-line-reader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.p-qti-line-reader-shade-top,
.p-qti-line-reader-shade-bottom {
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.p-qti-line-reader-band {
    height: 2em;
    cursor: grab;
    pointer-events: auto;
    border: 2px solid;
    background-color: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
}

.p-qti-line-reader-band:focus {
    outline: 3px solid #0078D4;
    outline-offset: -2px;
}

.p-qti-line-reader-band .p-qti-close-button {
    pointer-events: auto;
}

.p-qti-line-reader-button {
    background-image: url('/images/align-left.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

/* ========== NOTEPAD ========== */

.p-qti-notepad-textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    resize: none;
    border: none;
    padding: 8px;
    font-size: 14px;
    font-family: sans-serif;
    box-sizing: border-box;
}

.p-qti-notepad-textarea:focus {
    outline: 3px solid #0078D4;
    outline-offset: -3px;
}

.p-qti-notepad-status {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 12px;
    color: #555;
    pointer-events: none;
}

/* ========== CALCULATOR ========== */

.p-qti-calc-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 4px;
    padding: 4px;
}

.p-qti-calc-equations {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-qti-calc-eq-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
}

.p-qti-calc-color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.p-qti-calc-eq-editor {
    flex: 1;
    min-width: 0;
}

.p-qti-calc-result {
    font-family: monospace;
    font-size: 14px;
    color: #333;
    padding: 0 4px;
    white-space: nowrap;
}

.p-qti-calc-graph {
    flex: 1;
    min-height: 200px;
    border-top: 1px solid #ccc;
}

.p-qti-calc-graph-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.p-qti-calc-controls {
    display: flex;
    gap: 4px;
    padding: 2px 0;
}

.p-qti-calc-key {
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f8f8f8;
}

.p-qti-calc-key:hover {
    background-color: #e0e0e0;
}

.p-qti-calc-key:focus {
    outline: 3px solid #0078D4;
    outline-offset: 1px;
}

.p-qti-calc-key-equals {
    background-color: #4285f4;
    color: white;
    border-color: #3367d6;
}

.p-qti-calc-key-equals:hover {
    background-color: #3367d6;
}

.p-qti-calc-range {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 2px 0;
    flex-wrap: wrap;
}

.p-qti-calc-range label {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #333;
}

.p-qti-calc-range-input {
    width: 60px;
    padding: 2px 4px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.p-qti-calc-range-input:focus {
    outline: 3px solid #0078D4;
    outline-offset: 0;
}

/* ========== TOOL BUTTONS (RULER, PROTRACTOR, DICTIONARY, THESAURUS) ========== */

.p-qti-ruler-button {
    background-image: url('/images/minus.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

.p-qti-protractor-button {
    background-image: url('/images/activity.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

.p-qti-dictionary-button {
    background-image: url('/images/book-open.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

.p-qti-thesaurus-button {
    background-image: url('/images/book.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-color: white;
    height: 2em;
    width: 2em;
    margin: .1em .1em .1em .1em;
}

/* ========== TOOL CANVAS (RULER & PROTRACTOR) ========== */

.p-qti-tool-wrapper {
    position: fixed;
    z-index: 9000;
    cursor: grab;
}

.p-qti-tool-canvas {
    display: block;
    pointer-events: none;
}

.p-qti-tool-close {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 2;
    pointer-events: auto;
}

.p-qti-rotate-handle {
    position: absolute;
    bottom: -22px;
    right: -22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: grab;
    z-index: 1;
    pointer-events: auto;
}

.p-qti-rotate-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #4285f4;
    border: 2px solid white;
}

.p-qti-rotate-handle:hover::after {
    background-color: #3367d6;
}

.p-qti-rotate-handle:focus {
    outline: 3px solid #0078D4;
    outline-offset: 1px;
}

.p-qti-ruler-container,
.p-qti-protractor-container {
    transform-origin: center center;
    cursor: grab;
}

/* ========== DICTIONARY & THESAURUS ========== */

.p-qti-dictionary-container,
.p-qti-thesaurus-container {
    padding: 16px;
    font-size: 14px;
    color: #555;
}

/* ========== SCORING-AUTHOR ENTITY HIGHLIGHT ========== */

/* .tq-highlight is the standard scoring-author hover-highlight class
   (ItemShield -> highlightEntity). Framed interactions add it to elements
   INSIDE the frame document, where the authoring page's TestQuill.css
   cannot reach — so the engine sheet must carry the rule. Inert during
   delivery: nothing adds the class outside the scoring-author surface.
   KEEP IN SYNC with the .tq-highlight declarations in Scripts/css/
   TestQuill.css (and the DefineItemScoringView inline scoring sheet). */
.tq-highlight {
    background-color: var(--color-primary-tint, #F3EEFF);
    cursor: pointer;
}

button.tq-highlight,
input.tq-highlight,
textarea.tq-highlight,
.p-qti-custom-select-button.tq-highlight {
    background-color: var(--color-primary-tint, #F3EEFF);
}
