/* Model 与 Software 共用全站页面网格，只保留 Model 的内容层级修正。 */

/* Apply the shared Software reading column to every Model-page chapter. */
.drylab-model-page .wetlab-module-heading,
.drylab-model-page .dogma-reading-flow,
.drylab-model-page .model-phase {
    width: min(100%, var(--dogma-article-width)) !important;
    max-width: var(--dogma-article-width) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box;
}

.drylab-model-page .dogma-full-figure,
.drylab-model-page .dogma-figure-gallery {
    width: min(100%, var(--dogma-article-width));
    margin-right: auto;
    margin-left: auto;
}

/* Model 3C uses the shared article axis for text, equations and figures. */
.drylab-model-page .model3c-module {
    width: min(100%, var(--dogma-article-width)) !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.drylab-model-page .model3c-module > .level1 > h3 {
    width: 100%;
    max-width: none !important;
    color: var(--dogma-ink) !important;
    font-size: clamp(1.8rem, 2vw, 2.125rem) !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em;
    white-space: nowrap !important;
}

.drylab-model-page .model3c-module > .level1 > p:first-of-type {
    width: 100%;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.drylab-model-page .model3c-module .level2 > h4,
.drylab-model-page .model3c-module .level3 > h5,
.drylab-model-page .model3c-module .level4 > h6,
.drylab-model-page .model3c-module .level2 p,
.drylab-model-page .model3c-module .level2 ul,
.drylab-model-page .model3c-module .level2 ol,
.drylab-model-page .model3c-module .level2 blockquote,
.drylab-model-page .model3c-technical > summary,
.drylab-model-page .model3c-technical-body > p,
.drylab-model-page .model3c-technical-body > section {
    width: min(100%, var(--dogma-article-width)) !important;
    max-width: var(--dogma-article-width) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box;
}

/* The Model 3C title is the topic; numbered sections and nested headings step down. */
.drylab-model-page .model3c-module .level2 > h4 {
    font-size: clamp(1.38rem, 1.7vw, 1.62rem) !important;
    font-weight: 700 !important;
}

.drylab-model-page .model3c-module .level3 > h5 {
    font-size: clamp(1.12rem, 1.32vw, 1.24rem) !important;
}

.drylab-model-page .model3c-module .level4 > h6 {
    font-size: 1.02rem !important;
}

/* Callout text shares the exact same left edge as ordinary body text. */
.drylab-model-page .model3c-module blockquote {
    padding: .85rem 0 !important;
    border-left: 0 !important;
    position: relative;
}

.drylab-model-page .model3c-module blockquote::before {
    left: -1rem !important;
}

.drylab-model-page .model3c-module blockquote > p {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Center display equations without creating a scrollable box. */
.drylab-model-page .model3c-module p:has(> math[display="block"]) {
    display: flex !important;
    width: min(100%, var(--dogma-article-width)) !important;
    max-width: var(--dogma-article-width) !important;
    margin: 1.7rem auto 2rem !important;
    padding: .7rem 0 !important;
    align-items: center;
    justify-content: center !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    scrollbar-width: none;
}

.drylab-model-page .model3c-module p:has(> math[display="block"])::-webkit-scrollbar {
    display: none;
}

.drylab-model-page .model3c-module math[display="block"] {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
    font-size: 1.2rem !important;
}

@media (max-width: 900px) {
    .drylab-model-page .dogma-page-content,
    .drylab-model-page .dogma-page-content > section,
    .drylab-model-page .wetlab-module-heading,
    .drylab-model-page .dogma-reading-flow,
    .drylab-model-page .model-phase,
    .drylab-model-page .model3c-module {
        width: 100% !important;
        max-width: 100% !important;
    }

    .drylab-model-page .model3c-module > .level1 > h3 {
        font-size: clamp(1.7rem, 7vw, 2.05rem) !important;
        white-space: normal !important;
    }

    .drylab-model-page .model3c-module p:has(> math[display="block"]) {
        justify-content: flex-start !important;
        overflow-x: auto !important;
    }
}
