.discrete-response button:not(.pad-key) { min-height: 48px; min-width: 48px; touch-action: manipulation; }
.discrete-grid { display: grid; max-width: 24rem; }
.discrete-grid button { aspect-ratio: 1; min-height: 44px; min-width: 44px; border: 1px solid currentColor; border-radius: 0; background: var(--panel); color: var(--ink); font-size: 1.5rem; }
.discrete-response button[aria-pressed="true"] { background: var(--theme-primary); color: #fff; }
.discrete-columns { display: flex; flex-wrap: wrap; align-items: end; gap: 1.25rem; }
.discrete-column { border: 0; padding: 0; max-width: 10rem; }
.discrete-column legend { font-weight: 700; }
.discrete-bar { display: flex; flex-direction: column-reverse; align-items: center; border-bottom: 2px solid currentColor; }
.discrete-bar span { width: 28px; height: 28px; flex-shrink: 0; background: var(--theme-primary); border: 1px solid var(--panel); }
.discrete-counter { display: flex; align-items: center; gap: .25rem; margin-block: .5rem; }
.discrete-counter output { min-width: 2rem; text-align: center; font-size: 1.5rem; font-weight: 700; }
.discrete-counter output[data-touched="false"] { color: var(--muted); font-weight: 600; }
/* Grade 2+ text modes (typed with the shared answer pad). block_order uses the shared order list. */
.discrete-text { display: grid; gap: .5rem; max-width: 36rem; }
.discrete-text label { font-weight: 700; }
/* The input selector outranks the global form-field rule (application.css), so size and border apply to bounded_text too. */
.discrete-text-field, .discrete-text input.discrete-text-field[type=text][inputmode] { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; font-size: 1.35rem; line-height: 1.4; }
textarea.discrete-text-field { resize: vertical; min-height: 7rem; }
.discrete-text-field:focus-visible, .discrete-text input.discrete-text-field[type=text][inputmode]:focus-visible { outline: 3px solid #357eac; outline-offset: 2px; }
.discrete-text-field[aria-invalid="true"], .discrete-text input.discrete-text-field[type=text][inputmode][aria-invalid="true"] { border-color: var(--red, #b3261e); box-shadow: 0 0 0 2px var(--red, #b3261e); }
.discrete-text .button { justify-self: start; }
.discrete-text + .answer-pad { margin-top: 12px; }
/* Grade 4+ number pairs: a fraction (tæller over nævner) or a point (x; y), typed with the number pad. */
.discrete-numbers { display: grid; justify-items: center; gap: .6rem; }
.discrete-numbers .response-hint { margin: 0; text-align: center; color: var(--muted); }
/* The long selector outranks the global form-field rule (application.css) so border and size apply. */
.discrete-numbers input.discrete-number-field[type=text][data-field][inputmode] { width: 100%; min-width: 0; min-height: 58px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); font: inherit; font-size: 1.7rem; font-weight: 700; text-align: center; letter-spacing: .04em; }
.discrete-numbers input.discrete-number-field[type=text][data-field][inputmode][data-active="true"]:not(:disabled) { border-color: var(--theme-primary, var(--purple)); box-shadow: 0 0 0 2px var(--theme-primary, var(--purple)); }
.discrete-numbers input.discrete-number-field[type=text][data-field][inputmode][aria-invalid="true"] { border-color: var(--red, #b3261e); box-shadow: 0 0 0 2px var(--red, #b3261e); background: var(--red-soft, #ffebeb); }
.discrete-numbers input.discrete-number-field[type=text][data-field][inputmode]:focus-visible { outline: 3px solid #357eac; outline-offset: 2px; }
.fraction-fields { display: grid; grid-template-columns: auto 8rem; align-items: center; column-gap: .75rem; row-gap: .4rem; }
.fraction-fields label { justify-self: end; font-weight: 700; }
.fraction-bar { grid-column: 2; height: 5px; border-radius: 3px; background: var(--ink); }
.point-fields { display: flex; align-items: flex-end; justify-content: center; gap: .35rem; max-width: 100%; }
.point-field { display: grid; justify-items: center; gap: .2rem; width: 7rem; min-width: 0; }
.point-field label { font-weight: 700; font-style: italic; font-size: 1.2rem; }
.point-sign { padding-bottom: .55rem; font-size: 2rem; font-weight: 700; line-height: 1; }
.discrete-number-status { min-height: 1.4em; margin: .4rem 0 0; text-align: center; font-weight: 700; color: var(--red, #b3261e); }
.discrete-number-status + .answer-pad { margin-top: 8px; }
/* Mark modes (28.09): markér på gitter/billede and markér i tekst. Tap only, never drag.
   Marked = fill + thick edge + ✓, never colour alone. */
.mark-response { --mark: #f6c945; --mark-edge: #7a4b00; display: grid; gap: .75rem; min-width: 0; }
.mark-text { margin: 0; max-width: 38rem; font-size: 1.35rem; line-height: 2.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.mark-token { padding: 4px 3px; border-radius: 6px; cursor: pointer; text-decoration: underline dotted 2px; text-underline-offset: 6px; touch-action: manipulation; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mark-token:focus-visible { outline: 3px solid #357eac; outline-offset: 1px; }
.mark-token[aria-pressed="true"] { background: var(--mark); color: #1b1300; font-weight: 700; text-decoration: underline solid 3px var(--mark-edge); box-shadow: inset 0 -3px 0 var(--mark-edge); }
.mark-token[aria-pressed="true"]::after { content: "✓"; margin-left: 2px; font-size: .8em; }
.mark-token[aria-disabled="true"] { cursor: default; }
.mark-grid { display: grid; max-width: 28rem; }
.mark-grid-label { display: grid; place-items: center; min-width: 1.6rem; font-weight: 700; color: var(--muted); }
.discrete-response button.mark-cell { aspect-ratio: 1; min-height: 44px; min-width: 0; padding: 0; border: 1px solid #8a9a9e; border-radius: 0; background: var(--panel); color: #1b1300; font-size: 1.5rem; font-weight: 800; }
.discrete-response .mark-cell[aria-pressed="true"] { background: var(--mark); box-shadow: inset 0 0 0 4px var(--mark-edge); color: #1b1300; }
.discrete-response .mark-cell[aria-pressed="true"]::after { content: "✓"; }
.discrete-response .mark-cell.shaded { background: repeating-linear-gradient(45deg, #2f6f86 0 6px, #4b8ea5 6px 12px); opacity: 1; }
.discrete-response .mark-cell:focus-visible { outline: 3px solid #357eac; outline-offset: -3px; }
.mark-cell.axis-right { border-right: 4px solid #c62828 !important; }
.mark-cell.axis-left { border-left: 4px solid #c62828 !important; }
.mark-cell.axis-bottom { border-bottom: 4px solid #c62828 !important; }
.mark-cell.axis-top { border-top: 4px solid #c62828 !important; }
.mark-image-wrap { max-width: 40rem; min-width: 0; }
.mark-image { display: block; width: 100%; height: auto; border: 2px solid var(--line); border-radius: 12px; background: #fff; touch-action: manipulation; }
.mark-zone { cursor: pointer; outline: none; }
/* Picture zones are invisible until chosen (user decision 29.09: dashed edges hid the picture).
   The near-transparent fill keeps the whole zone tappable; only a marked or keyboard-focused zone is drawn. */
.mark-zone-shape { fill: rgba(255, 255, 255, .01); stroke: none; vector-effect: non-scaling-stroke; }
.mark-zone:focus-visible .mark-zone-shape { stroke: #357eac; stroke-width: 5px; }
.mark-zone[aria-pressed="true"] .mark-zone-shape { fill: rgba(246, 201, 69, .4); stroke: var(--mark-edge); stroke-width: 5px; }
.mark-zone[aria-pressed="false"] .mark-badge { display: none; }
.mark-badge circle { fill: var(--mark); stroke: var(--mark-edge); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.mark-badge text { fill: #1b1300; font-weight: 800; }
.mark-zone[aria-disabled="true"] { cursor: default; }
.mark-list summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.mark-list-buttons { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; }
.discrete-response .mark-list-button { min-height: 44px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; }
.discrete-response .mark-list-button[aria-pressed="true"] { background: var(--mark); border-color: var(--mark-edge); color: #1b1300; font-weight: 700; }
.discrete-response .mark-list-button[aria-pressed="true"]::before { content: "✓ "; }
.mark-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* exact_edit A/B test (exact_edit_editor.js): the text is drawn as tappable
   characters with LUXI's own caret (A) or selection (B); C builds a new text
   below the given one. No native field, so a key press never hides the caret. */
.exact-edit { max-width: 40rem; }
.exact-edit .ee-hint { margin: 0; font-weight: 700; }
.exact-edit .ee-label { margin: .25rem 0 0; font-weight: 700; }
.ee-field { min-height: 4.5rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); font-size: 1.7rem; line-height: 1.9; overflow-wrap: anywhere; }
.ee-field[aria-invalid="true"] { border-color: var(--red, #b3261e); box-shadow: 0 0 0 2px var(--red, #b3261e); }
.ee-word { display: inline-block; white-space: nowrap; }
.ee-field button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 4px 0; min-height: 48px; border-radius: 6px; cursor: pointer; touch-action: manipulation; vertical-align: baseline; -webkit-tap-highlight-color: transparent; }
.ee-field button:disabled { cursor: default; }
/* The drawn letters keep text width (as in the workshop): the general 48px button
   minimum above would spread every word ("m   i   l   a") and push long words out
   of a phone's width (UI audit 29.09). They stay 48px tall. */
.discrete-response .ee-field button:not(.pad-key) { min-width: 0; }
.ee-field .ee-char, .discrete-response .ee-field .ee-char { min-width: .55em; }
.ee-field .ee-space, .discrete-response .ee-field .ee-space { min-width: .7em; }
.ee-field .ee-newline { color: var(--muted); font-size: .7em; }
.ee-field .ee-end, .discrete-response .ee-field .ee-end { min-width: 2.5em; }
.exact-edit[data-variant="B"] .ee-field .ee-char:not(:disabled):not(.ee-space) { text-decoration: underline dotted 2px; text-underline-offset: 8px; text-decoration-color: var(--line); }
.ee-field .ee-selected { background: var(--mark, #f6c945); color: #1b1300; font-weight: 700; box-shadow: inset 0 -4px 0 var(--mark-edge, #7a4b00); border-radius: 4px; }
.ee-caret { display: inline-block; width: 3px; height: 1.15em; margin: 0 -1.5px; vertical-align: -0.15em; background: var(--theme-primary, var(--purple, #6a3fb5)); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) { .ee-caret { animation: kladde-caret 1.1s steps(1) infinite; } }
.ee-moves { display: flex; flex-wrap: wrap; gap: .5rem; }
.ee-moves .ee-move { min-width: 64px; min-height: 56px; font-size: 1.5rem; }
.ee-source { display: flex; flex-wrap: wrap; gap: .5rem; padding: 10px 12px; border-radius: 14px; background: var(--lavender, #f1ecfb); }
.ee-word-tile { min-height: 52px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; font-size: 1.5rem; touch-action: manipulation; cursor: pointer; }
.ee-word-tile:disabled { opacity: .6; cursor: default; }
.ee-built { min-height: 4.5rem; }
.ee-switcher { margin: .5rem 0 0; font-size: .9rem; color: var(--muted); }
.ee-switcher a[aria-current="true"] { font-weight: 700; }
/* B-støtte (variant BS): small gap places after every word and a popup of
   choices under a tapped letter, sign or gap. Subtle, the same at every gap. */
.exact-edit { position: relative; }
.ee-field .ee-gap-place, .discrete-response .ee-field .ee-gap-place { min-width: 22px; padding: 4px 3px; }
.ee-field .ee-gap-place::before { content: ""; display: inline-block; width: 10px; height: .8em; border: 2px dashed var(--line); border-radius: 4px; vertical-align: -0.05em; }
.ee-field .ee-gap-place.ee-open::before { border-color: var(--theme-primary, var(--purple, #6a3fb5)); }
.ee-field .ee-char.ee-open { outline: 2px solid var(--theme-primary, var(--purple, #6a3fb5)); }
.ee-field .ee-gap-place.ee-open::before { border-style: solid; background: var(--mark, #f6c945); }
.exact-edit[data-variant="BS"] .ee-field .ee-char:not(:disabled):not(.ee-space) { text-decoration: underline dotted 2px; text-underline-offset: 8px; text-decoration-color: var(--line); }
/* flex-wrap + max-width: five gap choices (. , - ? ingenting) are wider than a phone's text box; they wrap instead of running off the screen (UI audit 29.09). */
.ee-popup { position: absolute; z-index: 5; display: flex; flex-wrap: wrap; max-width: 100%; box-sizing: border-box; gap: .5rem; padding: 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.ee-choice { min-width: 60px; min-height: 60px; padding: 4px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; font-size: 1.8rem; font-weight: 700; touch-action: manipulation; cursor: pointer; }
.ee-choice[aria-current="true"] { border-style: dashed; }
.ee-choice.ee-choice-word { font-size: 1rem; font-weight: 600; }
