html, body {
    height: 100%;
}

h1:focus {
    outline: none;
}

/* Introductions and running text keep a readable measure (docs/lab-design-standards.md, section 3). */
.intro {
    max-width: 760px;
}


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #222;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Reconnect overlay. Blazor toggles the components-reconnect-* classes on #components-reconnect-modal. */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    font-family: Roboto, "Segoe UI", sans-serif;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

.reconnect-card {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    max-width: 26rem;
    margin: 1rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.reconnect-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin: 0.75rem 0 0.5rem;
}

.reconnect-text, .reconnect-failed-text {
    line-height: 1.55;
    margin: 0 0 1rem;
    color: var(--mud-palette-text-secondary);
}

.reconnect-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid var(--mud-palette-lines-default);
    border-top-color: var(--mud-palette-primary);
    border-radius: 50%;
    animation: reconnect-spin 0.9s linear infinite;
}

@keyframes reconnect-spin {
    to { transform: rotate(360deg); }
}

.reconnect-button {
    display: none;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    border: 0;
    border-radius: 6px;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.reconnect-failed-text { display: none; }

#components-reconnect-modal.components-reconnect-failed .reconnect-text,
#components-reconnect-modal.components-reconnect-rejected .reconnect-text,
#components-reconnect-modal.components-reconnect-failed .reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .reconnect-spinner {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-failed-text,
#components-reconnect-modal.components-reconnect-rejected .reconnect-failed-text,
#components-reconnect-modal.components-reconnect-failed .reconnect-button,
#components-reconnect-modal.components-reconnect-rejected .reconnect-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Accessibility helpers. */
.sr-only {
    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 {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 3000;
    padding: 8px 14px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.15s;
}

.skip-link:focus {
    top: 8px;
}

:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

#main-content:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print: drop the chrome, widen the content, open collapsed panels. */
@media print {
    .mud-appbar, .mud-drawer, .mud-overlay, .no-print, #components-reconnect-modal,
    .mud-snackbar, .mud-popover, .skip-link, #blazor-error-ui {
        display: none !important;
    }

    .mud-main-content {
        padding-left: 0 !important;
        padding-top: 0 !important;
        margin-left: 0 !important;
    }

    .mud-container {
        max-width: none !important;
        padding: 0 !important;
    }

    .mud-paper {
        box-shadow: none !important;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .mud-expand-panel .mud-collapse-container {
        height: auto !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    html, body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Small screens: keep everything reachable on a phone without horizontal scrolling. */
.mud-table-container, .mud-simple-table {
    overflow-x: auto;
}

@media (max-width: 600px) {
    .appbar-github, .appbar-icon {
        display: none;
    }

    /* The lab's name is long: on a phone it wraps to two lines inside the bar rather than pushing the buttons off. */
    .appbar-title {
        font-size: 0.95rem;
        line-height: 1.15;
        min-width: 0;
        white-space: normal;
    }

    #main-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .reconnect-card {
        padding: 1.25rem 1rem;
    }
}

/* Radio options stacked one per line, for answers that are full sentences. */
/* MudBlazor lays the group out as a row with a more specific rule, hence !important. */
.radio-stack .mud-radio-group, .mud-radio-group.radio-stack {
    flex-direction: column !important;
    align-items: flex-start !important;
}

/* The footer that ties the lab to the CloudWorrior blog. */
.lab-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.25rem 1rem 1.75rem;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
}

.lab-footer a {
    color: var(--mud-palette-text-primary);
    text-decoration: underline;
}

/* Language menu: a flag beside each language's name. */
.language-option {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.language-option .flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* The language button: the current language's flag before its code. */
.language-menu .mud-button-label::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 14px;
    margin-right: 8px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.language-menu.flag-en .mud-button-label::before { background-image: url("images/flags/en.svg"); }
.language-menu.flag-nl .mud-button-label::before { background-image: url("images/flags/nl.svg"); }
.language-menu.flag-pl .mud-button-label::before { background-image: url("images/flags/pl.svg"); }
.language-menu.flag-de .mud-button-label::before { background-image: url("images/flags/de.svg"); }

/* ---- Animations (the shared player in js/animation-player.js, copied from the Git Lab) ---- */

.anim-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.anim-speed {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.anim-speed > span {
    margin-right: 4px;
    color: var(--mud-palette-text-secondary);
}

.anim-speed-button {
    min-width: 44px !important;
}

.anim-speed-button[aria-pressed="true"] {
    background: var(--mud-palette-primary-hover);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* The drawing scales with its viewBox to the column (and redraws narrower on a phone); nothing is drawn outside its
   canvas. Every rule below reaches only the chart (.anim-chart svg), never the player's buttons and their icons: an
   unscoped "svg" rule made the Git Lab's Play icon 600 px tall on 16 October 2026. */
.anim-chart {
    width: 100%;
    overflow: hidden;
}

.anim-chart svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: inherit;
}

.anim-readout {
    margin: 0.5rem 0 0;
    font-variant-numeric: tabular-nums;
    min-height: 3em;
}

.slider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    max-width: 640px;
}

.slider input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    accent-color: var(--mud-palette-primary);
}

.slider output {
    min-width: 4.5em;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ---- Cloud Data Architecture Lab ---- */

/* Links inside running text are underlined (WCAG: not by colour alone). */
.text-link {
    color: var(--mud-palette-primary);
    text-decoration: underline;
}

/* The home page's map sits where the other labs put their picture. */
.home-visual {
    margin: 0 0 1.25rem;
    max-width: 960px;
}

.home-visual figcaption {
    margin-top: 0.5rem;
}

/* The Course and Tools overviews: one line per chapter or tool, its number, title, note and status. */
.outline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 860px;
}

.outline-item {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

[data-tool].outline-item {
    grid-template-columns: 1fr auto;
}

.outline-number {
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

.outline-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.outline-note {
    display: block;
    font-size: 0.8rem;
}

.home-area {
    height: 100%;
}

/* Page titles shrink on a phone. */
@media (max-width: 600px) {
    .mud-typography-h3 {
        font-size: 2rem;
    }
}

@media print {
    .slider {
        display: none;
    }
}

/* Course chapters (CDA-15; the Bond Pricing Lab's lesson styles, in this lab's tokens). */
.lesson-paper { max-width: 960px; }
.lesson { max-width: 860px; }
.lesson p, .lesson li { line-height: 1.65; margin-bottom: 0.75rem; }
.lesson ul { padding-left: 1.25rem; }
.lesson-heading { margin: 1.75rem 0 0.75rem; }
.lesson .callout {
    border-left: 4px solid var(--mud-palette-primary);
    background: var(--mud-palette-background);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}
.lesson .callout-label, .note-box .note-title { display: block; margin-bottom: 0.25rem; }
.note-box {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: var(--mud-palette-background);
}
/* CDA-58: the D12 blocks of the pipeline-pattern pages (by hand, why this step, people often think, you can now). */
.lesson-subheading { margin: 1.25rem 0 0.5rem; }
.hand-example { border: 1px solid var(--mud-palette-primary); border-radius: 6px; padding: 0.75rem 1rem; margin: 1rem 0; background: var(--mud-palette-background); }
.hand-example .lesson { margin: 0; }
.hand-steps { padding-left: 1.5rem; }
.hand-steps li { margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.hand-answer { margin-top: 0.25rem; }
.hand-answer summary { cursor: pointer; color: var(--mud-palette-primary); font-weight: 500; }
.hand-answer summary:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.hand-answer[open] summary { margin-bottom: 0.25rem; }
.why-steps dl, .myths dl { margin: 0; }
.why-steps dt, .myths dt { font-weight: 600; margin-top: 0.5rem; }
.why-steps dd, .myths dd { margin: 0.15rem 0 0 0; line-height: 1.6; }
.why-steps dd > span:first-child, .myths dd > span:first-child { font-style: italic; }
@media print { .hand-answer:not([open]) > :not(summary) { display: inline; } }
.chapter-visual { margin: 0 0 1.5rem; max-width: 960px; }
.chapter-visual .visual-title { margin-bottom: 0.5rem; }
.chapter-visual .visual-description { margin-top: 0.5rem; max-width: 860px; }
.lesson .table-scroll { overflow-x: auto; margin: 0.75rem 0; }
.lesson-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.lesson-table th, .lesson-table td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--mud-palette-lines-default); line-height: 1.5; }
.lesson-table caption { text-align: left; font-weight: 500; padding: 0.4rem 0; }
.try-it { display: flex; gap: 0.75rem; align-items: flex-start; margin: 1rem 0; padding: 0.75rem 1rem; border: 1px dashed var(--mud-palette-primary); border-radius: 6px; }
.try-it-label { display: block; margin-bottom: 0.2rem; }
.see-chapter { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.chapter-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; max-width: 960px; }
.exercise { border-top: 1px solid var(--mud-palette-lines-default); padding: 1rem 0 1.25rem; }
.exercise:first-child { border-top: none; padding-top: 0; }
.exercise-goal, .exercise .brief { max-width: 860px; }
.exercise-list { display: flex; flex-direction: column; }
.exercise-field { margin: 0.75rem 0; max-width: 760px; }
.exercise-label { display: block; margin-bottom: 0.25rem; }
.exercise-select { max-width: 520px; }
.exercise-feedback { max-width: 760px; }
.rule-list { padding-left: 1.25rem; }
.rule-list li { margin-bottom: 0.35rem; }
.quiz-question { border: none; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.quiz-question legend { padding: 0; margin-bottom: 0.25rem; }
.radio-stack .mud-radio { display: flex; }
.mud-radio-group.radio-stack, .radio-stack .mud-radio-group { flex-direction: column !important; align-items: flex-start !important; }
.quiz-feedback { max-width: 760px; }
.template-section { margin: 0.75rem 0; break-inside: avoid; }
.template-section ul { padding-left: 1.25rem; }
.template-line { display: none; }
.exercise-panel { border: 1px solid var(--mud-palette-primary); border-radius: 8px; padding: 1rem; }

@media print {
    /* "Print the template": only the chapter's Take it to work, with room to write under each prompt. */
    body.print-template .chapter-page > *:not(#take-it-to-work) { display: none !important; }
    .work-template .template-line { display: block; height: 2.2rem; border-bottom: 1px solid #999; }
    .chapter-visual .anim-controls { display: none !important; }
}
/* A chapter's generated code (SQL, SKOS, OWL), with its caption: what the lab's real-tool checks run. */
.lesson-code { margin: 0.75rem 0 1rem; max-width: 960px; }
.lesson-code figcaption { margin-bottom: 0.35rem; }
.design-runner .design-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
/* The capstone's frame (CDA-42): the eight stages with the help each gives, the stakeholders' thread, the steps or the
   goal, and the stage's outcome. Pushbacks have a border of their own as well as their label, so colour is never the
   only cue. */
.capstone-frame { max-width: 960px; }
.capstone-stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.capstone-stages li { border: 1px solid var(--mud-palette-lines-default); border-radius: 6px; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.capstone-stages li.is-current { border: 2px solid var(--mud-palette-primary); }
.capstone-stages li[data-ready="false"] { border-style: dashed; }
.capstone-stages .stage-help { font-size: 0.8rem; }
.capstone-stages .stage-situation { line-height: 1.45; overflow-wrap: anywhere; }
.capstone-thread { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.capstone-thread li { border-left: 3px solid var(--mud-palette-lines-default); padding: 0.25rem 0 0.25rem 0.75rem; max-width: 860px; }
.capstone-thread li.is-pushback { border-left: 3px dashed var(--mud-palette-warning-darken); }
.capstone-steps, .capstone-hints { padding-left: 1.25rem; max-width: 860px; }
.capstone-steps li { margin-bottom: 0.5rem; line-height: 1.6; }
.capstone-steps .step-link { margin-left: 0.4rem; }
.capstone-steps li, .capstone-thread li { overflow-wrap: anywhere; }
.rule-objection { margin-top: 0.15rem; font-style: italic; }

/* The architecture deliverable (CDA-46; the Azure Adoption Lab's plan style, D13): numbered sections, each with its
   status in words and the stage it comes from; the strip of eight sections first, each tile with its status written out
   and a border style of its own, so colour is never the only cue. */
.deliverable-page, .skills-page { max-width: 960px; }
.deliverable-map-figure { margin: 0 0 1.5rem; }
.deliverable-map { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.deliverable-map li { min-width: 0; }
.deliverable-tile { display: flex; flex-direction: column; gap: 0.15rem; height: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem; border-radius: 6px;
    border: 1px dashed var(--mud-palette-lines-default); color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.deliverable-map .is-inprogress .deliverable-tile { border: 2px dashed var(--mud-palette-warning-darken); }
.deliverable-map .is-complete .deliverable-tile { border: 2px solid var(--mud-palette-success); }
.deliverable-tile:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.deliverable-tile .tile-number { font-weight: 700; font-size: 1.25rem; }
.deliverable-tile .tile-status { font-size: 0.85rem; color: var(--mud-palette-text-secondary); }
.plan-section { max-width: 960px; margin: 1.5rem 0; }
.plan-section h2 { font-size: 1.25rem; font-weight: 500; margin: 0 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--mud-palette-lines-default); }
.plan-section h3 { font-size: 1rem; font-weight: 500; margin: 1rem 0 0.35rem; }
.plan-section p { line-height: 1.6; margin: 0 0 0.5rem; }
.plan-section-status { font-size: 0.875rem; }
.plan-status { display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; font-weight: 500; font-size: 0.8125rem; }
.plan-status--complete { border: 2px solid var(--mud-palette-success); }
.plan-status--inprogress { border: 2px dashed var(--mud-palette-warning-darken); }
.plan-status--notstarted { border-style: dotted; color: var(--mud-palette-text-secondary); }
.deliverable-part { break-inside: avoid; }
.deliverable-table th[scope="row"] { font-weight: 500; }
.deliverable-table td, .deliverable-table th { overflow-wrap: anywhere; }
.deliverable-checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.deliverable-checks li { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.4rem; }

/* The skills record (CDA-46): a ladder per skill, each level a step with its word, filled up to the reader's level. */
.skills-ladder { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.skills-ladder caption { text-align: left; padding: 0.4rem 0; }
.skills-ladder th, .skills-ladder td { text-align: left; vertical-align: top; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--mud-palette-lines-default); }
.skills-ladder .level-col { text-align: center; white-space: nowrap; }
.skills-ladder .skill-name { display: block; font-weight: 500; }
.skills-ladder .skill-what { display: block; font-weight: 400; font-size: 0.8rem; line-height: 1.4; }
.skills-ladder .ladder-step { text-align: center; min-width: 5.5rem; }
.skills-ladder .ladder-step.is-reached { box-shadow: inset 0 0 0 2px var(--mud-palette-primary); font-weight: 600; }
.skills-ladder .step-mark { display: block; font-size: 1rem; line-height: 1; }
.skills-ladder .skill-evidence { font-size: 0.8rem; min-width: 9rem; }
.skills-ladder .skill-evidence span { display: block; }
.skills-levels dt { font-weight: 500; margin-top: 0.5rem; }
.skills-levels dd { margin: 0 0 0.25rem 0; }

@media print {
    .deliverable-tile, .plan-status { border-color: #000 !important; color: #000 !important; }
    .deliverable-map .is-complete .deliverable-tile { border-style: solid !important; }
    .skills-ladder .ladder-step.is-reached { box-shadow: inset 0 0 0 2px #000 !important; color: #000 !important; }
    .skills-ladder { font-size: 0.8rem; }
    .deliverable-page .table-scroll, .skills-page .table-scroll { overflow: visible !important; }
}

/* The Theory tab (CDA-57): the box that sends a chapter's reader to its theory first, and a page's sources. */
.read-theory { max-width: 960px; margin: 0 0 1.5rem; }
.read-theory-list { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.read-theory-list li { margin-bottom: 0.25rem; }
.theory-sources { padding-left: 1.25rem; }
.theory-sources li { margin-bottom: 0.75rem; line-height: 1.55; }
.home-start { max-width: 960px; }

/* CDA-58: the number exercise's input, in the theme's colours, at least 44 px high for touch. */
.number-input {
    width: 9rem; max-width: 100%; min-height: 44px; padding: 0.35rem 0.6rem; border-radius: 4px;
    border: 1px solid var(--mud-palette-lines-inputs); background: var(--mud-palette-surface); color: var(--mud-palette-text-primary);
}
.number-input:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; }

/* Phones (pre-launch quality pass, issue #92): nothing may push a 320 px screen sideways in any language. Dutch and
   German compounds ("Informationssystemarchitekturen", "informatiefundamenten") and long Polish terms are wider than
   the line in big titles, overlines and running text, so words may break inside themselves when, and only when, they
   do not fit, and on a phone they are hyphenated where the browser knows the language. Tables keep their columns and
   scroll in their own box. */
.mud-main-content :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, summary, figcaption, blockquote, .mud-typography):not(td *, th *, td, th) {
    overflow-wrap: anywhere;
}
@media (max-width: 599.98px) {
    .mud-main-content :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, summary, figcaption, blockquote, .mud-typography):not(td *, th *, td, th) {
        hyphens: auto;
    }
}
.mud-main-content .mud-typography-overline { white-space: normal; }
/* The page title is set in the h3 style (3rem): on a phone it scales down with the screen, never below 2rem. */
.mud-main-content h1.mud-typography-h3 { font-size: clamp(2rem, 9vw, 3rem); }
/* MudSelect wraps its control in a div.mud-select, and that wrapper is the flex item in a row of controls: let it
   shrink to the row, and cut a long selected value short with an ellipsis instead of widening the page. */
.mud-main-content div.mud-select { min-width: 0; max-width: 100%; }
.mud-main-content .mud-select .mud-input-slot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A chip with a long name (a certification in German) wraps inside itself instead of leaving its card. */
.mud-main-content .mud-tooltip-root:has(> .mud-chip) { max-width: 100%; }
.mud-main-content .mud-chip { max-width: 100%; height: auto; min-height: 24px; }
.mud-main-content .mud-chip .mud-chip-content { white-space: normal; overflow-wrap: anywhere; }

/* Print on white whichever theme the reader chose (issue #92): in the dark theme the papers, cards and the lab's own
   colours stayed dark, so a printed template came out as light grey text on white paper (Chrome leaves backgrounds out
   by default) or as a page of dark ink. Printing uses the light palette's values. */
@media print {
    :root {
        --mud-palette-background: #fff !important;
        --mud-palette-surface: #fff !important;
        --mud-palette-text-primary: rgba(0, 0, 0, 0.87) !important;
        --mud-palette-text-secondary: #55625A !important;
        --mud-palette-text-disabled: #5F6B63 !important;
        --mud-palette-primary: #2E7D32 !important;
        --mud-palette-secondary: #00796B !important;
        --mud-palette-success: #2E7D32 !important;
        --mud-palette-warning: #A04D00 !important;
        --mud-palette-error: #C62828 !important;
        --mud-palette-info: #0D5EAF !important;
        --mud-palette-lines-default: rgba(0, 0, 0, 0.12) !important;
        --mud-palette-divider: rgba(0, 0, 0, 0.12) !important;
        --mud-palette-action-default: rgba(0, 0, 0, 0.54) !important;
        --mud-palette-table-lines: rgba(0, 0, 0, 0.12) !important;
        --mud-palette-primary-text: #fff !important;
        --mud-palette-lines-inputs: rgba(0, 0, 0, 0.42) !important;
        --mud-palette-warning-darken: #7A3A00 !important;
    }
    /* Two classes, so this wins over map.css's .lab-dark, which loads later. */
    .mud-layout.lab-dark {
        --cda-primary: #2E7D32;
        --cda-ink: #0F1F14;
        --cda-muted: #46584B;
        --cda-bg: #fff;
        --cda-surface: #fff;
        --cda-rule: #CFDCD1;
        --cda-tint: #E3F0E4;
        --cda-tint-2: #F0F7F0;
        --cda-plat: #ECEFEC;
        --cda-hit: #C62828;
        --cda-hit-tint: #FDECEA;
    }
}
