.dea-mm-app {
    --ink: #162033;
    --muted: #667085;
    --line: #d9e0ea;
    --panel: #ffffff;
    --soft: #f3f6fa;
    --brand: #1f7a8c;
    --danger: #b42318;
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dea-mm-gate,
.dea-mm-app {
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 8px;
    padding: 14px;
}

.dea-mm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.dea-mm-kicker {
    margin: 0 0 2px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dea-mm-topbar h2,
.dea-mm-chat h3 {
    margin: 0;
}

.dea-mm-actions,
.dea-mm-editor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dea-mm-tool-label {
    display: grid;
    gap: 4px;
    min-width: 150px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dea-mm-tool-label select {
    min-height: 40px;
    text-transform: none;
    font-size: 14px;
    font-weight: 800;
}

.dea-mm-shell {
    display: grid;
    grid-template-columns: 250px minmax(360px, 1fr) 310px;
    gap: 12px;
}

.dea-mm-sidebar,
.dea-mm-chat,
.dea-mm-board {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.dea-mm-sidebar,
.dea-mm-chat {
    padding: 12px;
}

.dea-mm-board {
    padding: 12px;
}

.dea-mm-sidebar label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.dea-mm-sidebar input[type="search"] {
    margin: 6px 0;
}

.dea-mm-source-count {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.dea-mm-collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    color: var(--muted);
    font-weight: 800;
}

.dea-mm-collapse input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.dea-mm-app input,
.dea-mm-app select,
.dea-mm-app textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.dea-mm-actions select {
    width: 160px;
}

.dea-mm-app button,
.dea-mm-file {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 11px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.dea-mm-app button:hover,
.dea-mm-file:hover {
    border-color: var(--brand);
}

.dea-mm-app .is-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.dea-mm-app .is-danger {
    color: var(--danger);
}

.dea-mm-file input {
    display: none;
}

.dea-mm-sidebar button,
.dea-mm-chat button {
    width: 100%;
    margin-bottom: 8px;
}

.dea-mm-title-row {
    margin-bottom: 10px;
}

.dea-mm-title-row input {
    font-size: 20px;
    font-weight: 900;
}

.dea-mm-workspace {
    position: relative;
    height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #f7fafc;
    background-image:
        linear-gradient(#e7edf3 1px, transparent 1px),
        linear-gradient(90deg, #e7edf3 1px, transparent 1px);
    background-size: 24px 24px;
    cursor: grab;
    touch-action: none;
}

.dea-mm-workspace.is-panning {
    cursor: grabbing;
}

.dea-mm-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 2600px;
    height: 1600px;
    transform-origin: 0 0;
}

.dea-mm-canvas svg,
.dea-mm-canvas [data-field="nodes"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dea-mm-link {
    fill: none;
    stroke: #9aa8bb;
    stroke-width: 3;
    stroke-linecap: round;
}

.dea-mm-node {
    position: absolute;
    min-width: 150px;
    max-width: 230px;
    min-height: 48px;
    border: 2px solid currentColor;
    border-left-width: 8px;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(22, 32, 51, 0.11);
    color: var(--brand);
    cursor: pointer;
    text-align: center;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.dea-mm-node small {
    display: block;
    margin-top: 5px;
    color: #5d6677;
    font-weight: 600;
}

.dea-mm-node.is-root {
    min-width: 190px;
    min-height: 58px;
    color: #162033;
    background: #fef7e8;
}

.dea-mm-node.is-selected {
    outline: 4px solid rgba(31, 122, 140, 0.2);
    z-index: 3;
}

.dea-mm-app[data-layout="tree"] .dea-mm-workspace {
    background-image: linear-gradient(rgba(124, 58, 237, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 58, 237, .11) 1px, transparent 1px);
}

.dea-mm-app[data-layout="flow"] .dea-mm-workspace {
    background-image: linear-gradient(90deg, rgba(37, 99, 235, .12) 1px, transparent 1px), linear-gradient(rgba(37, 99, 235, .06) 1px, transparent 1px);
}

.dea-mm-app[data-layout="cards"] .dea-mm-node {
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(20, 30, 60, .12);
}

.dea-mm-editor {
    margin-top: 10px;
}

.dea-mm-editor input[data-field="node-title"] {
    flex: 1 1 180px;
}

.dea-mm-editor textarea {
    flex: 1 1 220px;
    min-height: 42px;
}

.dea-mm-editor input[type="color"] {
    flex: 0 0 52px;
    width: 52px;
    height: 42px;
    padding: 3px;
}

.dea-mm-color-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-weight: 800;
    font-size: 12px;
}

.dea-mm-color-control input[type="color"] {
    flex: 0 0 38px;
    width: 38px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dea-mm-node.has-custom-fill {
    background: var(--dea-mm-fill) !important;
}

.dea-mm-node.has-custom-fill .dea-mm-node-title,
.dea-mm-node.has-custom-fill small {
    color: var(--dea-mm-fill-text) !important;
}

.dea-mm-hint {
    margin-top: 12px;
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
}

.dea-mm-chat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dea-mm-ai-health {
    border-left: 4px solid #667085;
    padding: 9px 10px;
    background: #f4f6f8;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.dea-mm-ai-health[data-status="ready"] {
    border-left-color: #16827b;
    background: #eaf7f4;
    color: #0f5f59;
}

.dea-mm-ai-health[data-status="model_missing"],
.dea-mm-ai-health[data-status="unavailable"] {
    border-left-color: #c65b4b;
    background: #fff1ef;
    color: #8d3328;
}

.dea-mm-ai-health[data-status="checking"],
.dea-mm-ai-health[data-status="disabled"] {
    border-left-color: #c58a26;
    background: #fff7e8;
    color: #7a5418;
}

.dea-mm-outline {
    min-height: 132px;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
}

.dea-mm-chatlog {
    min-height: 210px;
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--soft);
}

.dea-mm-msg {
    margin: 0 0 8px;
    padding: 8px;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
}

.dea-mm-msg strong {
    display: block;
    margin-bottom: 3px;
}

.dea-mm-chat textarea[data-field="prompt"] {
    min-height: 92px;
    resize: vertical;
}

@media (max-width: 1120px) {
    .dea-mm-topbar {
        display: block;
    }

    .dea-mm-actions {
        margin-top: 10px;
    }

    .dea-mm-shell {
        grid-template-columns: 1fr;
    }

    .dea-mm-workspace {
        height: 520px;
    }
}

@media (min-width: 641px) and (max-width: 1120px) {
    .dea-mm-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: none;
        align-items: end;
    }

    .dea-mm-actions > button,
    .dea-mm-actions > .dea-mm-tool-label,
    .dea-mm-actions select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .dea-mm-actions > button {
        min-height: 48px;
        align-self: end;
    }

    .dea-mm-actions > .dea-mm-tool-label {
        align-self: stretch;
    }
}

@media (max-width: 640px) {
    .dea-mm-actions,
    .dea-mm-editor {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .dea-mm-tool-label {
        min-width: 0;
    }

    .dea-mm-actions select,
    .dea-mm-actions button,
    .dea-mm-file {
        width: 100%;
    }

    .dea-mm-workspace {
        height: 460px;
    }
}

/* V20 - Mind Studio juridique */
.dea-mm-app {
    --ink: #172033;
    --muted: #667085;
    --line: #dfe3e8;
    --panel: #ffffff;
    --soft: #f7f8fa;
    --brand: #1d3557;
    --gold: #c6a15b;
    --success: #16865c;
    padding: 14px;
    background: var(--soft);
}

html[data-genie-theme="dark"] .dea-mm-app {
    --ink: #f3f5f7;
    --muted: #aeb8ca;
    --line: #2a3850;
    --panel: #151f32;
    --soft: #0d1424;
    --brand: #90a8d8;
    --gold: #d1b16a;
    color-scheme: dark;
}

.dea-mm-kicker {
    color: var(--gold);
}

.dea-mm-sidebar,
.dea-mm-chat,
.dea-mm-board,
.dea-mm-app input,
.dea-mm-app select,
.dea-mm-app textarea,
.dea-mm-app button,
.dea-mm-file,
.dea-mm-chatlog,
.dea-mm-msg {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink);
    box-shadow: none;
}

.dea-mm-app button,
.dea-mm-file {
    min-height: 44px;
    border-radius: 10px;
}

.dea-mm-app .is-primary {
    min-height: 48px;
    border-radius: 12px;
    border-color: #101c36;
    background: #101c36;
    color: #fff;
}

.dea-mm-workspace {
    border-color: var(--line);
    background: var(--soft);
    background-image:
        radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--brand) 18%, transparent) 1px, transparent 0),
        linear-gradient(90deg, color-mix(in srgb, var(--gold) 5%, transparent) 50%, transparent 50%);
    background-size: 24px 24px, 48px 48px;
}

.dea-mm-node {
    border-width: 1px;
    border-left-width: 5px;
    background: var(--panel);
    box-shadow: none;
}

.dea-mm-node-title {
    display: block;
}

.dea-mm-importance {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.dea-mm-importance i {
    width: 16px;
    height: 4px;
    border-radius: 2px;
    background: color-mix(in srgb, currentColor 16%, var(--line));
}

.dea-mm-importance i.is-on {
    background: currentColor;
}

.dea-mm-node.importance-5 {
    border-left-width: 9px;
    box-shadow: 0 12px 28px color-mix(in srgb, currentColor 18%, transparent);
}

.dea-mm-node.type-warning,
.dea-mm-node.type-exception {
    border-style: dashed;
}

.dea-mm-node.is-root {
    border-color: #c6a15b;
    background: #101c36;
    color: #fff !important;
}

.dea-mm-node.is-root small {
    color: #d5ddec;
}

.dea-mm-node.is-selected {
    outline: 3px solid rgba(198, 161, 91, .3);
}

.dea-mm-node small,
.dea-mm-hint,
.dea-mm-sidebar label {
    color: var(--muted);
}

html[data-genie-theme="dark"] .dea-mm-app .is-primary {
    border-color: #d1b16a;
    background: #d1b16a;
    color: #0d1424;
}

html[data-genie-theme="dark"] .dea-mm-node.is-root {
    border-color: #d1b16a;
    background: #1d3557;
}

@media (max-width: 640px) {
    .dea-mm-app {
        padding: 10px;
    }

    .dea-mm-actions,
    .dea-mm-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dea-mm-actions button,
    .dea-mm-file,
    .dea-mm-editor button,
    .dea-mm-editor input,
    .dea-mm-editor select,
    .dea-mm-editor textarea {
        min-width: 0;
        white-space: normal;
    }
}

/* V21 final overrides */
.dea-mm-app {
    --brand: #7c3aed;
    --gold: #f2b84b;
    --course: #2563eb;
    --mindmap: #0891b2;
    --quiz: #f59e0b;
    --review: #16a34a;
    --shadow-soft: 0 10px 28px rgba(30, 58, 138, .11);
}

.dea-mm-topbar {
    border-bottom: 4px solid var(--brand);
    padding: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .12));
}

.dea-mm-sidebar,
.dea-mm-chat,
.dea-mm-board {
    box-shadow: var(--shadow-soft);
}

.dea-mm-app .is-primary {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .22);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.dea-mm-app .is-primary:active {
    transform: scale(.97);
}

.dea-mm-node {
    box-shadow: 0 8px 18px rgba(20, 30, 60, .1);
}

.dea-mm-node.is-root {
    border-color: #a78bfa;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.dea-mm-node.is-selected {
    outline-color: rgba(124, 58, 237, .25);
}

html[data-genie-theme="dark"] .dea-mm-app .is-primary {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
}

html[data-genie-theme="dark"] .dea-mm-node.is-root {
    border-color: #a78bfa;
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

/* V22 public conversion page and workflow polish */
.dea-mm-public {
    --ink: #142033;
    --muted: #667085;
    --line: #dfe5ef;
    --paper: #f5f7fb;
    --blue: #2563eb;
    --violet: #7c3aed;
    --gold: #f2b84b;
    color: var(--ink);
    background: var(--paper);
}

.dea-mm-public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    min-height: 680px;
    padding: clamp(64px, 9vw, 118px) max(24px, 6vw);
}

.dea-mm-public h1 {
    max-width: 760px;
    margin: 10px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: 0;
}

.dea-mm-public-copy > p:not(.dea-mm-kicker) {
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.6;
}

.dea-mm-public-actions,
.dea-mm-public-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.dea-mm-public-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-weight: 900;
    text-decoration: none;
}

.dea-mm-public-button.is-primary {
    border-color: var(--blue);
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--violet));
}

.dea-mm-public-checks {
    padding: 0;
    list-style: none;
}

.dea-mm-public-checks li {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.dea-mm-public-demo {
    position: relative;
    min-height: 430px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        radial-gradient(circle at 1px 1px, rgba(37, 99, 235, .22) 1px, transparent 0),
        #fff;
    background-size: 24px 24px;
    overflow: hidden;
}

.dea-mm-public-demo span {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 132px;
    min-height: 54px;
    padding: 10px 14px;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    text-align: center;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(20, 32, 51, .12);
}

.dea-mm-public-demo .root {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: linear-gradient(135deg, var(--violet), #a78bfa);
}

.dea-mm-public-demo .n1 { left: 8%; top: 22%; }
.dea-mm-public-demo .n2 { right: 8%; top: 22%; }
.dea-mm-public-demo .n3 { left: 8%; bottom: 20%; }
.dea-mm-public-demo .n4 { right: 8%; bottom: 20%; }
.dea-mm-public-demo .line {
    z-index: 1;
    min-width: 0;
    min-height: 0;
    width: 38%;
    height: 2px;
    padding: 0;
    border: 0;
    background: #94a3b8;
    box-shadow: none;
    transform-origin: center;
}
.dea-mm-public-demo .l1 { left: 22%; top: 39%; transform: rotate(25deg); }
.dea-mm-public-demo .l2 { right: 22%; top: 39%; transform: rotate(-25deg); }
.dea-mm-public-demo .l3 { left: 22%; bottom: 38%; transform: rotate(-25deg); }
.dea-mm-public-demo .l4 { right: 22%; bottom: 38%; transform: rotate(25deg); }

.dea-mm-public-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 0 max(24px, 6vw) clamp(56px, 8vw, 96px);
}

.dea-mm-public-band article,
.dea-mm-public-offer,
.dea-mm-public-faq {
    border-top: 4px solid var(--gold);
    background: #fff;
    padding: 24px;
}

.dea-mm-public-band strong {
    color: var(--violet);
    font-size: 34px;
}

.dea-mm-public-band h2,
.dea-mm-public-offer h2,
.dea-mm-public-faq h2 {
    margin: 8px 0 10px;
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: 0;
}

.dea-mm-public-band p,
.dea-mm-public-offer p,
.dea-mm-public-faq p {
    color: var(--muted);
    line-height: 1.62;
}

.dea-mm-public-offer {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin: 0 max(24px, 6vw) 32px;
}

.dea-mm-public-faq {
    margin: 0 max(24px, 6vw) clamp(56px, 8vw, 96px);
}

.dea-mm-public-faq details {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.dea-mm-public-faq summary {
    cursor: pointer;
    font-weight: 900;
}

.dea-mm-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.dea-mm-workflow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.dea-mm-workflow span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    font-weight: 900;
}

.dea-mm-workflow b {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    color: #172033;
}

.dea-mm-export-preview {
    min-height: 116px;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--soft);
    color: var(--muted);
    white-space: pre-wrap;
    font-size: 12px;
}

.dea-mm-topbar {
    align-items: flex-start;
}

.dea-mm-topbar h2 {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
}

.dea-mm-actions {
    justify-content: flex-end;
    max-width: 720px;
}

.dea-mm-tool-label {
    min-width: 132px;
}

.dea-mm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dea-mm-sidebar label {
    margin-bottom: 0;
}

.dea-mm-main-action {
    width: 100%;
    min-height: 54px;
    white-space: normal;
}

.dea-mm-study-guide {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 7%, #fff);
}

.dea-mm-study-guide strong {
    color: var(--ink);
    font-size: 13px;
}

.dea-mm-study-guide ol {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.dea-mm-study-guide button {
    margin: 0;
}

.dea-mm-compact-actions,
.dea-mm-export-actions {
    display: grid;
    gap: 8px;
}

.dea-mm-compact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dea-mm-compact-actions button,
.dea-mm-export-actions button,
.dea-mm-export-actions .dea-mm-file {
    width: 100%;
    margin: 0;
    white-space: normal;
}

.dea-mm-export-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.dea-mm-export-actions .dea-mm-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dea-mm-sidebar .is-danger {
    margin-top: auto;
}

.dea-mm-chat h3 {
    margin-top: 14px;
}

.dea-mm-chat h3:first-child {
    margin-top: 0;
}

.dea-mm-app.is-study-mode .dea-mm-node-note {
    display: none;
}

.dea-mm-app.is-study-mode .dea-mm-node::after {
    content: "Réponse masquée";
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.dea-mm-app.is-fullscreen {
    position: fixed;
    z-index: 99999;
    inset: 0;
    overflow: auto;
    border-radius: 0;
}

.dea-mm-fullscreen-open {
    overflow: hidden;
}

.dea-mm-app.is-fullscreen .dea-mm-workspace {
    height: min(78vh, 920px);
}

.dea-mm-fullscreen-exit {
    display: none;
}

.dea-mm-app.is-fullscreen .dea-mm-fullscreen-exit {
    display: block;
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 100001;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .18);
}

@media (max-width: 900px) {
    .dea-mm-public-hero,
    .dea-mm-public-band {
        grid-template-columns: 1fr;
    }

    .dea-mm-public-hero {
        min-height: 0;
    }

    .dea-mm-public-offer {
        display: block;
    }

    .dea-mm-workflow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body.dea-mindmaps-ready .site-header__inner,
    body:has(.dea-mm-public) .site-header__inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        max-width: 100%;
        overflow: hidden;
    }

    body.dea-mindmaps-ready .brand,
    body:has(.dea-mm-public) .brand {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }

    body.dea-mindmaps-ready .brand__text,
    body:has(.dea-mm-public) .brand__text {
        min-width: 0;
    }

    body.dea-mindmaps-ready .main-nav,
    body:has(.dea-mm-public) .main-nav {
        flex: 1 1 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    body.dea-mindmaps-ready .main-nav__group,
    body.dea-mindmaps-ready .main-nav__cta,
    body.dea-mindmaps-ready .main-nav__login,
    body.dea-mindmaps-ready .theme-toggle,
    body:has(.dea-mm-public) .main-nav__group,
    body:has(.dea-mm-public) .main-nav__cta,
    body:has(.dea-mm-public) .main-nav__login,
    body:has(.dea-mm-public) .theme-toggle {
        flex: 0 1 auto;
    }
}

@media (max-width: 640px) {
    .dea-mm-public h1 {
        font-size: 42px;
    }

    .dea-mm-public-demo {
        min-height: 360px;
    }

    .dea-mm-workflow {
        grid-template-columns: 1fr;
    }

    .dea-mm-shell {
        display: flex;
        flex-direction: column;
    }

    .dea-mm-board {
        order: 1;
    }

    .dea-mm-sidebar {
        order: 2;
    }

    .dea-mm-chat {
        order: 3;
    }
}
