:root {
  color-scheme: light;
  --page: #fbf7ed; --panel: #fffdf8; --ink: #302744; --muted: #746a80;
  --purple: #7652b5; --purple-dark: #59378f; --lavender: #eee5fa; --line: #e5dbec;
  --gold: #ffd77d; --peach: #ffebc7; --mint: #dff1e8; --green: #26714d;
  --red: #a74355; --red-soft: #ffebeb; --shadow: 0 7px 24px #48355d08;
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none; color: var(--ink); background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #357eac; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; }
h3 { font-size: 1.15rem; line-height: 1.4; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 10; padding: 12px; background: white; }
.luxi-icon { width: 24px; height: 24px; flex: 0 0 24px; vertical-align: middle; }
.app-shell { max-width: 1100px; margin: 28px auto; background: #fffaf2; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: clip; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 20px 38px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 800; letter-spacing: .04em; color: var(--purple-dark); }
.brand-subtitle { display: block; font-size: 11px; font-weight: 500; letter-spacing: .07em; color: var(--muted); }
.student-nav { display: flex; gap: 14px; }
.student-nav a { display: grid; justify-items: center; gap: 5px; padding: 10px 13px; min-width: 89px; font-size: 13px; border-radius: 16px; }
.student-nav .luxi-icon { width: 29px; height: 29px; }
.student-nav a:hover, .student-nav a[aria-current=page] { color: var(--purple-dark); background: var(--lavender); }
.main-content { padding: 32px 38px 42px; min-height: 55vh; }
.app-footer { padding: 18px 38px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-context { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 14px; color: var(--muted); }
.page-context > .action-with-audio { flex-shrink: 0; }
.page-context > span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.level-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); padding: 10px 14px; background: var(--panel); border-radius: 30px; font-size: 14px; min-height: 44px; }
.level-chip .luxi-icon { width: 18px; height: 18px; flex-basis: 18px; }
.button, button[type=submit]:not([class]) { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 18px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 600; line-height: 1.3; text-align: center; }
.button:hover:not(:disabled), a.level-chip:hover, summary.level-chip:hover { background: var(--lavender); border-color: #c2addf; }
.button.primary, .button--primary, button[type=submit]:not([class]) { background: var(--purple); border-color: var(--purple); color: white; box-shadow: 0 3px 0 var(--purple-dark); }
.button.primary:hover:not(:disabled), .button--primary:hover:not(:disabled) { background: var(--purple-dark); color: white; }
.button.back-button { padding: 10px 14px; min-width: 112px; flex: 0 0 auto; border-radius: 14px; white-space: nowrap; }
.picture-button { display: grid; justify-items: center; gap: 7px; min-width: 136px; padding: 13px 16px; }
.picture-button .luxi-icon { width: 30px; height: 30px; }
.text-link { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--purple-dark); }
.section { margin-top: 28px; }
.stack { display: grid; gap: 18px; }
.panel, .activity-card { background: var(--panel); padding: 26px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.offering-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.offering-card { background: var(--panel); padding: 22px; border: 1px solid var(--line); border-radius: 22px; display: grid; gap: 24px; box-shadow: var(--shadow); }
.offering-card:hover { border-color: var(--purple); }
.card-title { display: flex; align-items: center; gap: 15px; min-width: 0; }
.card-title strong { font-size: 19px; }
.card-title > .luxi-icon:last-child { margin-left: auto; width: 18px; flex-basis: 18px; }
.card-title p { font-size: 14px; margin-top: 5px; }
.subject-picture, .activity-picture { display: inline-grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 19px 23px 18px 23px; color: var(--subject-color, var(--purple)); background: var(--lavender); background: color-mix(in srgb, var(--subject-color, var(--purple)) 14%, var(--panel)); }
.subject-picture .luxi-icon, .activity-picture .luxi-icon { width: 37px; height: 37px; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.activity-card { display: flex; flex-direction: column; gap: 24px; }
.activity-card .progress-meter { margin-top: auto; }
.card-actions, .form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card-actions { justify-content: flex-end; }
.button_to { margin: 0; }
.progress-meter { min-width: 0; }
.progress-numbers { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.progress-track { height: 10px; border-radius: 10px; background: var(--lavender); overflow: hidden; margin-top: 8px; }
.progress-fill { display: block; height: 100%; background: var(--purple); border-radius: inherit; }
.empty-progress { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; min-height: 39px; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 42px 20px; gap: 15px; }
.empty-state > .luxi-mascot { margin-bottom: 8px; }
.exercise-library { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.library-task { display: flex; align-items: center; gap: 13px; width: 100%; height: 100%; min-height: 90px; text-align: left; padding: 18px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); background: var(--panel); }
.library-task:hover { border-color: var(--purple); }
.library-title { flex: 1; overflow-wrap: anywhere; }
.library-status { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--lavender); }
.status-solved .library-status { background: var(--mint); color: var(--green); }
.status-help .library-status { background: var(--peach); color: #945800; }
.profile-heading { display: flex; gap: 22px; align-items: center; margin-bottom: 28px; }
.profile-settings { max-width: 650px; }
.profile-settings form { display: grid; justify-items: start; gap: 14px; margin-top: 18px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
label { font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]), select, textarea { min-height: 48px; max-width: 100%; width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--purple); width: 20px; height: 20px; }
textarea { min-height: 110px; resize: vertical; }
input:disabled { opacity: 1; background: var(--page); }
fieldset { min-width: 0; margin: 0; }
.panel h1 + *, .panel h2 + *, .panel form + * { margin-top: 18px; }
.panel form.stack { margin-top: 20px; }
.flash, .alert, .notice { padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--lavender); }
.alert { background: var(--red-soft); color: #812f41; border-color: #e8c3c8; }
.notice { background: var(--mint); color: var(--green); }
.task-panel { border: 1px solid var(--line); background: var(--panel); }
.task-prompt { text-align: center; white-space: pre-line; }
/* Line breaks in the task text and the explanation are shown (07.10): "Trin 1 ... Trin 2", n/y tables and step-by-step working written under each other. pre-line keeps line breaks and still collapses other spaces. */
.task-explanation > p { white-space: pre-line; }
.letter-target { text-align: center; font-weight: 700; line-height: 1.2; }
.answer-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 0; border: 0; }
.letter-choices { max-width: 460px; margin: 0 auto; }
.choice { position: relative; min-width: 0; border: 2px solid var(--line); border-radius: 17px; background: var(--page); overflow-wrap: normal; word-break: normal; hyphens: none; display: flex; align-items: stretch; }
.choice > input { position: absolute; left: 10px; top: 9px; opacity: 0; }
.choice > label { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 23px 22px 33px; min-height: 102px; text-align: center; cursor: pointer; font-weight: 500; }
/* Feedback gets its own space, including pixels/letters inside answer pictures. */
.choice > label:has(.choice-mark) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.answer-choices.answers-tiny .choice > label:has(.choice-mark),
.choice:has(.guided-choice-image) > label:has(.choice-mark) { grid-template-columns: minmax(0, 1fr); }
.choice:has(input:checked) { background: var(--lavender); border-color: var(--purple); }
.choice:has(input:focus-visible) { outline: 3px solid #357eac; outline-offset: 4px; }
.choice > input:disabled + label { cursor: default; }
.letter-choices .choice > label { font-size: 32px; }
.choice.correct, .choice.correct:has(input:checked), .answer-input.correct { background: var(--mint); border-color: var(--green); color: #125737; box-shadow: 0 0 0 3px #d4efdf80; }
.choice.incorrect { background: var(--red-soft); border-color: var(--red); }
/* Last column on text rows; a separate top row on tiny cards and pictures. */
.choice-mark { display: flex; align-self: start; justify-self: end; grid-row: 1; grid-column: -2 / -1; }
.choice-mark .luxi-icon { width: 20px; height: 20px; }
.reading-passage { background: var(--page); border-left: 4px solid var(--purple); border-radius: 14px; }
.math-expression { display: flex; justify-content: center; align-items: center; gap: 12px; font-family: Georgia, serif; font-size: clamp(26px,4vw,38px); overflow-wrap: anywhere; }
.answer-field { max-width: 600px; margin: 0 auto; }
.answer-input { font-size: 22px; }
.math-keypad { display: flex; flex-wrap: wrap; gap: 9px; max-width: 600px; margin: 14px auto 0; }
.symbol-key { min-width: 50px; font-size: 20px; font-weight: 500; }
.task-feedback { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--line); }
.task-feedback h2 { font-size: 18px; line-height: 1.3; }
.task-feedback .spoken-button .luxi-icon { width: 17px; height: 17px; }
.task-actions { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); gap: 14px; justify-content: end; }
.task-primary-slot, .task-secondary-slot { min-width: 0; height: 80px; }
.task-actions form { margin: 0; height: 100%; }
.task-action { width: 100%; height: 80px; min-width: 0; padding: 10px 14px; }
.explanation-button { background: var(--peach); border-color: #e8c994; color: #78490b; }
.task-explanation { display: grid; margin-top: 8px; border-radius: 16px; background: var(--mint); color: #214f39; }
/* Picture with the explanation (note on 447daf3f 29.09): scaled to fit, never cropped. */
.task-explanation-image { display: block; width: 100%; height: auto; max-width: 30rem; max-height: 46vh; margin: 0 auto; object-fit: contain; border-radius: 12px; background: #fff; }
.matching-letters { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 40px; font-weight: 700; }
.save-status { min-height: 22px; font-size: 12px; color: var(--muted); margin-top: 13px; }
.round-complete { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 42px 26px; }
.round-complete > .luxi-mascot { transform: scale(1.5); margin: 18px 0 26px; }
.round-complete .progress-meter { width: min(100%,420px); margin: 10px 0; }
.spoken-button { font: inherit; line-height: inherit; color: inherit; text-align: inherit; border: 0; background: transparent; padding: 3px 0; border-radius: 4px; cursor: pointer; }
.spoken-button .speech-tail > .luxi-icon { width: 16px; height: 16px; margin-left: 7px; color: var(--muted); }
.spoken-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-speech .spoken-button { font-size: 0; width: 44px; height: 44px; padding: 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon-speech .spoken-button .luxi-icon { width: 21px; height: 21px; flex-basis: 21px; margin: 0; }
.choice-speech { position: absolute; bottom: 0; right: 2px; }
/* Picture answers with their own read-aloud (user decision 01.10.2026: the day or month is heard by its picture):
   a clear speaker of its own, beside the picture's label, so hearing never selects an answer. */
.answer-choices.guided-choices .choice:has(.guided-choice-image) > label { padding-bottom: 62px; }
.guided-choices .choice:has(.guided-choice-image) .choice-speech { bottom: 6px; right: 6px; }
.guided-choices .choice:has(.guided-choice-image) .choice-speech .spoken-button { width: 52px; height: 52px; border: 2px solid var(--purple); border-radius: 50%; background: var(--panel); }
.guided-choices .choice:has(.guided-choice-image) .choice-speech .spoken-button .luxi-icon { width: 26px; height: 26px; flex-basis: 26px; }
.audio-status { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; border-radius: 14px; color: white; background: var(--ink); box-shadow: var(--shadow); z-index: 5; pointer-events: none; }
.audio-status:empty { display: none; }
.audio-status:not(:empty) { padding: 12px 18px; }
.luxi-mascot { position: relative; display: inline-block; width: 70px; height: 67px; flex: 0 0 70px; isolation: isolate; }
.mascot-badge { position: absolute; right: 0; bottom: 3px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink); z-index: 3; }
.mascot-badge .luxi-icon { width: 18px; height: 18px; }
.mood-good .mascot-badge, .mood-done .mascot-badge { background: var(--mint); color: var(--green); }
.mood-answer .mascot-badge { box-shadow: 0 0 0 4px var(--peach); }
@media (max-width: 900px) {
  .app-shell { margin: 0; border-radius: 0; min-height: 100vh; min-height: 100dvh; border-left: 0; border-right: 0; }
  .offering-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .app-header { padding: 16px 20px; flex-wrap: wrap; gap: 15px; }
  .main-content { padding: 24px 20px 32px; }
  .app-footer { padding: 14px 20px; flex-wrap: wrap; }
  .brand { font-size: 25px; }
  .brand .luxi-mascot { display: none; }
  .student-nav { gap: 4px; }
  .student-nav a { min-width: 70px; padding: 8px; font-size: 12px; }
  .student-nav .luxi-icon { width: 26px; height: 26px; }
  .offering-grid, .exercise-library { grid-template-columns: 1fr; }
  .answer-choices:not(.letter-choices) { grid-template-columns: 1fr; }
  .answer-choices:not(.letter-choices) .choice > label { min-height: 74px; padding: 15px 48px 15px 18px; }
  .answer-choices:not(.letter-choices) .choice-speech { bottom: 15px; }
  .panel, .activity-card { padding: 22px; }
}
@media (max-width: 430px) {
  .main-content { padding: 22px 14px; }
  .app-header { padding: 14px; }
  .brand { font-size: 24px; }
  .brand-subtitle { display: none; }
  .student-nav { width: 100%; justify-content: space-between; }
  .student-nav a { min-width: 82px; }
  .page-heading { gap: 14px; }
  .task-feedback { gap: 5px; }
  .task-feedback h2 { font-size: 16px; }
  .task-actions { gap: 9px; }
  .task-primary-slot, .task-secondary-slot, .task-action { height: 96px; }
  .task-action { display: grid; grid-template-rows: 26px 1fr; gap: 3px; justify-items: center; padding: 10px 7px; font-size: 14px; }
  .task-action .luxi-icon { width: 26px; height: 26px; }
  .letter-choices { gap: 10px; }
  .letter-choices .choice > label { min-height: 100px; padding: 20px 12px 33px; }
  .card-actions > *, .card-actions .button { flex: 1; min-width: 0; }
  .card-actions form .button { width: 100%; }
  .card-actions { gap: 9px; }
  .picture-button { font-size: 14px; }
  .activity-picture { width: 54px; height: 58px; flex-basis: 54px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .offering-card, .library-task { transition: background-color .15s, border-color .15s; }
}
@media (forced-colors: active) {
  .progress-track { border: 1px solid CanvasText; }
  .progress-fill { background: Highlight; }
  .choice:has(input:checked) { outline: 3px solid Highlight; }
}

/* Listening controls are siblings of navigation/action controls. */
.audio-control { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 9px; color: var(--purple-dark); border: 1px solid var(--line); border-radius: 50%; background: var(--panel); }
.audio-control .luxi-icon { width: 20px; height: 20px; }
.audio-control:hover { background: var(--lavender); }
.audio-control.is-playing, .icon-speech .spoken-button.is-playing { background: var(--theme-primary, var(--purple)); border-color: var(--theme-primary, var(--purple)); color: #fff; border-radius: 50%; }
.audio-control.is-playing .luxi-icon, .icon-speech .spoken-button.is-playing .luxi-icon { color: currentColor; }
.spoken-button.is-playing { color: var(--theme-primary, var(--purple-dark)); }
.spoken-button.is-playing .speech-tail > .luxi-icon { color: var(--theme-primary, var(--purple)); }
.stimulus-panel-listen.is-playing { border-color: var(--theme-primary, var(--purple)); }
.stimulus-panel-listen.is-playing .stimulus-panel-speaker { background: var(--theme-primary, var(--purple)); border-color: var(--theme-primary, var(--purple)); color: #fff; }
.button.stimulus-play.is-playing { background: var(--theme-primary, var(--purple)); color: #fff; }
.turbo-progress-bar { height: 3px; background: var(--theme-accent, var(--purple)); }
form[aria-busy="true"] :is(.button, .account-entry__submit, .profile-picker__row, .ov-subject):disabled,
.button[aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: no-preference) {
  .audio-control.is-playing, .icon-speech .spoken-button.is-playing { animation: audio-playing-ring 1.3s ease-out infinite; }
  form[aria-busy="true"] :is(.button, .account-entry__submit, .profile-picker__row, .ov-subject):disabled,
  .button[aria-busy="true"] { animation: submit-busy-pulse 1.1s ease-in-out infinite; }
}
@keyframes audio-playing-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme-primary, var(--purple)) 45%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
@keyframes submit-busy-pulse {
  0%, 100% { opacity: .65; }
  50% { opacity: .88; }
}
.action-with-audio { display: flex; align-items: center; gap: 9px; }
/* The question's own big speaker (bruger 22.11.2026) by its last word, where the small icon was; the negative margins
   keep the line from growing by the whole button. */
.task-prompt .prompt-listen { vertical-align: middle; margin: -4px 0 -4px 10px; }
.card-actions .action-with-audio { display: grid; justify-items: center; }
.task-action-listening { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); justify-content: end; gap: 14px; margin-top: 8px; }
.task-action-listening > div { display: flex; justify-content: center; min-height: 44px; }
.draft-recovery { margin-top: 20px; }
.draft-recovery dl { display: grid; gap: 8px; margin: 18px 0; }
.draft-recovery dt { color: var(--muted); font-size: 14px; }
.draft-recovery dd { margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 430px) {
  .task-action-listening { gap: 9px; }
}

.task-image { display: block; object-fit: contain; border-radius: 14px; }

/* Guided media: original proportions, including on a 375px screen. */
.guided-choice-image { display: block; width: 100%; max-width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.answer-choices.guided-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-choices.guided-choices.layout-rows { grid-template-columns: minmax(0, 1fr); }
.answer-choices.guided-choices .choice { min-width: 0; }
.answer-choices.guided-choices .choice > label { height: 100%; min-height: 100px; padding: 14px 12px 52px; overflow-wrap: normal; }
.guided-answer { width: min(100%, 320px); margin: 12px auto; }
.guided-intro { margin: 16px 0; padding: 16px; border: 2px solid var(--theme-primary, var(--purple)); border-radius: 16px; min-width: 0; }
/* Answer-form guide beside the concept guide (06.10.2026): two compact "?" side by side. */
.guided-intro summary { cursor: pointer; font-weight: 750; padding: 8px; }
.guided-intro-badge { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 10px; border-radius: 50%; background: var(--theme-primary, var(--purple)); color: #fff; font-size: 1.3rem; font-weight: 800; line-height: 1; vertical-align: middle; }
/* Guides (godkendt guide-format 05.10.2026): sheet over the task, picture series, dots, offer after 2 wrong answers. */
.guided-intro-offered .guided-intro-badge { position: relative; }
.guided-intro-offered .guided-intro-badge::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid var(--theme-primary, var(--purple)); }
@media (prefers-reduced-motion: no-preference) { .guided-intro-offered .guided-intro-badge::after { animation: guide-ring 1.4s ease-out infinite; } }
@keyframes guide-ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
:is(.guide-sheet-mode, .task-screen .guide-docked)[open] > .guide-scrim { position: fixed; inset: 0; z-index: 60; background: rgb(13 31 30 / 40%); }
:is(.guide-sheet-mode, .task-screen .guide-docked)[open] > .guide-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: min(92vh, 760px); max-height: min(92dvh, 760px); overflow-y: auto; overscroll-behavior: contain; margin: 0 auto; max-width: 560px;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom)); background: var(--panel); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 28px rgb(10 42 40 / 20%); }
html:has(:is(.guide-sheet-mode, .task-screen .guide-docked)[open]) { overflow: hidden; }
@media (min-width: 1100px) and (orientation: landscape) {
  html:has(.task-screen :is(.guide-sheet-mode, .guide-docked)[open]) { overflow: auto; }
}
:is(.guide-sheet-mode, .task-screen .guide-docked) .intro-heading { flex-wrap: nowrap; }
.guide-close { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); }
:is(.guide-sheet-mode, .task-screen .guide-docked) .intro-heading h2 { display: flex; align-items: center; margin: 0; font-size: 1.25rem; }
:is(.guide-sheet-mode, .task-screen .guide-docked) .intro-step { margin: 12px 0; }
.guide-frames { width: 100%; background: #fffefa; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 8px 0 12px; }
.guide-frames .intro-image { width: 100%; max-height: none; }
.guide-frame[hidden] { display: none; }
.guide-framedots { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; }
.guide-framedots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.guide-framedots i.on { background: var(--theme-primary, var(--purple)); }
.guide-replay { position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel); color: var(--theme-primary, var(--purple)); padding: 0; }
/* Picture series paged by hand (user 06.10): tap at the edge, swipe or arrow keys; still visible with reduced motion. */
.guide-pager { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.guide-pager:focus-visible { outline: 3px solid var(--theme-primary, var(--purple)); outline-offset: 2px; }
.guide-pager .guide-frame { -webkit-user-drag: none; pointer-events: none; }
.guide-edge { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--theme-primary, var(--purple)); padding: 0; }
.guide-edge:disabled { opacity: .3; }
.guide-edge-prev { left: 6px; }
.guide-edge-next { right: 6px; }
/* Arrows, dots and replay in a row under the picture (UI review 20.11.2026, M10): on top of it they covered numbers
   and text in the picture on a phone. A tap at the picture's edge and a swipe still page. */
.guide-pager { display: grid; grid-template-columns: 46px minmax(0, 1fr) 40px 46px; align-items: center; gap: 4px 8px; padding-bottom: 6px; }
.guide-pager .guide-frame { grid-column: 1 / -1; grid-row: 1; justify-self: center; min-width: 0; }
.guide-pager :is(.guide-edge, .guide-replay, .guide-framedots) { position: static; transform: none; grid-row: 2; }
.guide-pager .guide-edge-prev { grid-column: 1; justify-self: end; }
.guide-pager .guide-framedots { grid-column: 2; justify-content: center; }
.guide-pager .guide-replay { grid-column: 3; }
.guide-pager .guide-edge-next { grid-column: 4; justify-self: start; }
.intro-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.intro-dots button { width: 32px; height: 32px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; min-height: 0; }
.intro-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: width .2s; }
.intro-dots .on i { width: 24px; border-radius: 6px; background: var(--theme-primary, var(--purple)); }
.intro-dots .done i { outline: 1.5px solid var(--theme-primary, var(--purple)); }
.guide-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--theme-primary, var(--purple)); border-radius: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--theme-primary, var(--purple)) 10%, var(--panel)); }
.guide-offer > span { flex: 1 1 12em; }
.intro-heading, .intro-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.intro-step[hidden], .intro-choice-check[hidden] { display: none; }
.intro-step { margin: 18px 0; overflow-wrap: anywhere; }
.intro-picture { position: relative; width: fit-content; max-width: 100%; margin: 16px auto; }
.intro-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 360px; object-fit: contain; }
.intro-highlight { position: absolute; border: 3px solid var(--theme-primary, var(--purple)); border-radius: 12px; pointer-events: none; box-sizing: border-box; }
.guided-reading { text-align: left; font-size: clamp(1.15rem, 4vw, 1.6rem); line-height: 1.8; overflow-wrap: anywhere; }
.intro-reading-line { display: flex; align-items: center; gap: 8px; }
.intro-reading-line > span:not(.reading-marker) { min-width: 0; }
.reading-marker { display: inline-block; width: 14px; height: 14px; flex: 0 0 14px; margin: 0 8px; border-radius: 50%; background: var(--theme-primary, var(--purple)); vertical-align: middle; }
.reading-marker.tappable { width: 44px; height: 44px; flex-basis: 44px; padding: 0; border: 14px solid var(--panel); outline: 2px solid var(--theme-primary, var(--purple)); cursor: pointer; }
.reading-marker.chosen { outline-width: 4px; }
.intro-word { font-size: 1.7rem; text-align: center; }
/* A guide line with sound is one big listen button (03.10.2026). */
.intro-caption, .intro-word { margin: 14px 0; text-align: center; }
.intro-caption { font-size: 1.15rem; }
.button.intro-listen { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 64px; padding: 10px 22px; border: 2px solid var(--theme-primary, var(--purple)); background: var(--theme-soft, var(--lavender)); color: var(--theme-strong, var(--purple-dark)); font-size: 1.2rem; font-weight: 750; white-space: normal; text-align: left; box-shadow: 0 3px 0 var(--theme-primary, var(--purple)); }
.button.intro-listen .luxi-icon { flex: 0 0 34px; width: 34px; height: 34px; }
.intro-word .button.intro-listen { font-size: 2rem; padding-inline: 28px; }
.intro-actions .button { display: inline-flex; align-items: center; gap: 8px; }
.intro-actions .button[hidden] { display: none; }
.intro-actions .luxi-icon { width: 22px; height: 22px; }
.intro-claps { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.intro-beat { display: grid; text-align: center; padding: 8px; border: 2px solid transparent; border-radius: 8px; }
.intro-beat.lit { border-color: var(--theme-primary, var(--purple)); background: var(--panel); }
.intro-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intro-choices > div { min-width: 0; }
.intro-choice.button { width: 100%; display: flex; flex-direction: column; padding: 8px; min-height: 70px; }
.intro-choice.guided { outline: 3px solid var(--theme-primary, var(--purple)); }
.intro-choice-beats { white-space: normal; overflow-wrap: anywhere; }
.intro-practice-status { min-height: 1.5em; }

/* Keep a whole short word centered and readable without overflowing on mobile. */
.guided-flashcard { container-type: inline-size; text-align: center; }
.guided-flashcard .letter-target { font-size: min(110px, calc(90cqw / (var(--stimulus-length) + 1))); }

/* Constructed responses: the same reachable controls for tap, drag and keyboard. */
.constructed-response { width: 100%; max-width: 720px; margin-inline: auto; }
.response-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
.response-fields legend { font-weight: 700; margin-bottom: 10px; }
.response-slots, .response-pieces, .response-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.response-cell { display: grid; justify-items: center; }
.response-slot { min-width: 54px; min-height: 64px; font-size: 1.7rem; }
/* word_sequence separator (<, >, =) between chosen tiles: visual only, read aloud as words. */
.response-slots:has(.response-separator) { gap: 10px 6px; }
.response-pair { display: inline-flex; align-items: center; gap: 6px; }
.response-separator { font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--purple); }
/* Phones: four 4-digit tiles and three signs stay on one line. */
@media (max-width: 480px) { .response-slots:has(.response-separator), .response-pair { gap: 8px 4px; } .response-slots:has(.response-separator) .response-slot { min-width: 48px; padding-inline: 8px; } }
.response-slot[aria-pressed="true"] { border-color: var(--purple); outline: 2px solid var(--purple); outline-offset: 2px; }
.response-clear { min-height: 44px; padding: 8px; }
.response-piece { min-width: 52px; min-height: 56px; font-size: 1.45rem; }
.response-piece[draggable="true"] { cursor: grab; }
.response-piece:disabled { opacity: .4; }
.response-tools .button { min-height: 48px; }
.response-ink { display: grid; gap: 12px; }
.response-ink p { font-size: .9rem; color: var(--muted); }
.response-ink canvas { display: block; width: 100%; max-width: 480px; height: auto; margin-inline: auto; border: 2px solid var(--line); border-radius: 16px; background: #fffdf8; touch-action: none; }
@media (max-width: 480px) {
  .response-slots, .response-pieces, .response-tools { gap: 8px; }
  .response-slot { min-width: 48px; padding-inline: 12px; }
  .response-piece { min-width: 48px; padding-inline: 12px; }
}

.response-tools .button[aria-expanded="true"] { outline: 3px solid var(--purple); outline-offset: 2px; }
.response-tools .button[title] { min-width: 58px; min-height: 54px; }
.response-ink-choice { min-width: 64px; min-height: 64px; font-size: 2rem; }
.response-tools [hidden] { display: none !important; }

.response-ink[hidden] { display: none; }

/* Account, consent and settings forms */
.field-hint { font-size: 14px; color: var(--muted); }
.check-field { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.check-field input[type=checkbox] { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
.check-field .field-hint { display: block; margin-top: 4px; font-weight: 400; }
.inline-link { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 3px; }
.button--danger { background: var(--red-soft); border-color: #e8c3c8; color: #812f41; }
.button--danger:hover:not(:disabled) { background: #ffdfe2; border-color: var(--red); }
.account-settings { max-width: 720px; }
/* One width per kind of page outside the pupil's (UI review 20.11.2026, M16): the short forms (login, glemt
   adgangskode, opret konto, the parent lock) as wide as login, the parent area's form pages 720 px, all centred.
   They had four widths, some to the left of a wide empty page. */
.auth-panel { width: 100%; max-width: 460px; margin-inline: auto; }
.parent-form-page { width: 100%; max-width: 720px; margin-inline: auto; }
.parent-unlock__forgot { margin: 0; }
/* Show password (password_reveal.js). */
.password-reveal { position: relative; display: block; }
.password-reveal > input { width: 100%; padding-right: 4.6rem; }
.password-reveal__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-width: 3.6rem; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.password-reveal__toggle:hover { background: var(--lavender); }
.password-reveal__toggle[aria-pressed="true"] { border-color: var(--purple); }
.unlocked-devices { list-style: none; margin: 0; padding: 0; }
.unlocked-device { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.legal-page { max-width: 760px; min-width: 0; }
.legal-page table { width: 100%; border-collapse: collapse; }
.legal-page th, .legal-page td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal-table { max-width: 100%; overflow-x: auto; }
.legal-table table { min-width: 520px; }
@media (max-width: 600px) {
  /* A phone shows each row as its own block; the wide table was cut off after the second column. */
  .legal-table table { min-width: 0; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-table td { display: block; padding: 2px 0; border: 0; }
  .legal-table td:first-child { font-weight: 700; }
  .legal-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
.app-footer nav { display: flex; gap: 16px; }
.app-footer nav a { text-decoration: underline; text-underline-offset: 3px; }
/* The speaker stays with the last word of the text. */
.speech-tail { white-space: nowrap; }
/* Text answers in guided cards: readable, and a letter or short number is large (M5).
   Without a speaker the card needs no room for it at the bottom. */
.answer-choices.guided-choices .choice > label:not(:has(img)) { font-size: clamp(1.1rem, 3.2vw, 1.35rem); font-weight: 650; }
.answer-choices.guided-choices .choice:not(:has(.choice-speech)) > label { padding-bottom: 14px; }
.choice-text-short { font-size: clamp(2rem, 8vw, 2.6rem); font-weight: 700; line-height: 1.1; }
/* One question, one size: when any answer is a longer word, short ones (e.g. "red") use the normal answer size too. */
.answer-choices:has(.choice-text-long) .choice-text-short { font-size: inherit; font-weight: inherit; line-height: inherit; }
/* Room under the last answer, so it can always be scrolled clear of the fixed Godkend bar. */
.answer-choices { margin-bottom: 24px; scroll-margin-bottom: 140px; }
.answer-choices .choice { scroll-margin-bottom: 140px; }

/* Pictures in the task with their own read-aloud (stimulus kind "panels", user decision 01.10.2026): each picture is
   one button that only plays its word, with a clear speaker badge; the text answers follow below. */
.stimulus-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.stimulus-panels.layout-rows { grid-template-columns: minmax(0, 1fr); }
.stimulus-panel { min-width: 0; }
.stimulus-panel-listen { position: relative; display: block; width: 100%; min-height: 44px; padding: 6px 6px 62px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); cursor: pointer; }
.stimulus-panel-listen:hover, .stimulus-panel-listen:focus-visible { border-color: var(--purple); }
.stimulus-panel-image { display: block; width: 100%; height: auto; max-height: 240px; object-fit: contain; margin: 0 auto; }
.stimulus-panels.layout-rows .stimulus-panel-image { max-height: 130px; }
.stimulus-panel-speaker { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: inline-grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--purple); border-radius: 50%; background: var(--lavender); color: var(--purple-dark); }
.stimulus-panel-speaker .luxi-icon { width: 26px; height: 26px; }

/* The pupil's way round (UI review 20.11.2026, M5-M7, M11, B3). */
/* Looking at another grade's cards than one's own: said plainly, with one tap back. */
.browse-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; padding: 10px 14px; border: 2px solid #c58024; border-radius: 16px; background: #fff1d9; color: #70460e; }
.browse-notice form { margin: 0; }
.browse-notice__text { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.browse-notice__text .luxi-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.browse-notice__back { min-height: 44px; }
/* A subject without tasks: dimmed, last, and not a link. */
.offering-card--empty { opacity: .6; box-shadow: none; }
.offering-card--empty:hover { border-color: var(--line); }
.offering-card--empty .card-title > .luxi-icon { display: none; }
/* The subject page: the test entry by the subject's name, one »Fortsæt« card, then the topics with the finished ones last and quieter. */
.subject-page-heading { justify-content: flex-start; }
.subject-page-heading .assessment-entry { margin-left: auto; min-height: 44px; }
.subject-continue__title { margin: 0 0 12px; font-size: 20px; }
.subject-continue .activity-card { border: 2px solid var(--theme-primary); box-shadow: 0 0 0 4px var(--theme-action); }
.subject-continue + .subject-topics { margin-top: 32px; }
.subject-topics .activity-card-completed { box-shadow: none; }
.subject-topics .activity-card-completed .activity-preview { opacity: .6; }
/* The task list for the youngest: numbered tiles coloured by status instead of lines of text. */
.exercise-library--tiles { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.exercise-library--tiles .library-task { position: relative; justify-content: center; min-height: 64px; height: 64px; padding: 0; border-width: 2px; border-radius: 16px; }
.exercise-library--tiles .library-number { font-size: 1.35rem; font-weight: 800; }
.exercise-library--tiles .library-mark { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; }
.exercise-library--tiles .library-mark .luxi-icon { width: 15px; height: 15px; stroke-width: 3; }
.exercise-library--tiles .status-solved { background: var(--mint); border-color: var(--green); color: #125737; }
.exercise-library--tiles .status-help { background: var(--peach); border-color: #c58024; color: #70460e; }
.exercise-library--tiles .status-help .library-mark { background: #c58024; }
.exercise-library--tiles .status-tried { border-color: #c58024; }
.exercise-library--tiles .status-tried .library-mark { background: #8b5918; }
@media (max-width: 760px) { .exercise-library.exercise-library--tiles { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); } }
/* After a round: the continue button says where it leads. */
.round-next { margin: 8px 0 0; text-align: center; color: var(--muted); }
.round-next strong { color: var(--ink); }

/* Swipe down on a sheet from below (sheet_swipe_controller.js, G1 F2 29.11.2026): the grip's touch zone is at
   least 24 px high and 120 px wide, an invisible ::after around the 5 px bar (from the sheet's top edge to just
   into the head row's padding, beside its buttons); the 22 px handles of the formula card and Kladde grow 1 px
   each way. Nothing moves on screen. */
[data-sheet-swipe-target="grip"] { position: relative; }
[data-sheet-swipe-target="grip"]::after { content: ""; position: absolute; inset: -8px -40px -11px; }
:is(.fs-grab, .scratchpad-handle)[data-sheet-swipe-target="grip"]::after { inset: -1px -40px; }
