/* Monitor test page. Loaded only on monitor-test.html. */

.mt-page {
    padding: var(--space-2xl) 0 var(--space-section);
}

.mt-kicker {
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.mt-page h1 {
    max-width: 16ch;
    margin-bottom: var(--space-sm);
}

.mt-subtitle {
    margin-bottom: var(--space-lg);
    color: var(--color-gray-dark);
    font-size: var(--font-size-lg);
}

.mt-answer {
    max-width: 42rem;
    margin-bottom: var(--space-lg);
    padding: 0.9rem 1rem;
    font-size: var(--font-size-lg);
    background: var(--color-white);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow-sm);
}

.mt-actions,
.mt-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: var(--space-lg) 0 var(--space-md);
}

.mt-adfree {
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.mt-section {
    margin-top: var(--space-3xl);
}

.mt-section h2 {
    margin-bottom: var(--space-md);
}

.mt-section h3 {
    margin: var(--space-lg) 0 var(--space-sm);
}

.mt-page ol,
.mt-page ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: var(--space-md);
}

.mt-page ol {
    list-style: decimal;
}

.mt-page li {
    margin: 0.45rem 0;
}

.mt-page li::marker {
    color: var(--color-accent);
}

#checklist ol {
    max-width: 46rem;
    padding: var(--space-lg) var(--space-lg) var(--space-lg) 2.4rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mt-table-wrap {
    overflow-x: auto;
    margin: var(--space-md) 0 var(--space-lg);
}

.mt-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

.mt-table th,
.mt-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--color-gray-medium);
}

.mt-swatch-dot {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.4rem;
    border: 1px solid rgba(43, 45, 66, 0.35);
    border-radius: 2px;
    vertical-align: -1px;
}

.mt-steps-static {
    display: flex;
    max-width: 46rem;
    height: 92px;
    margin: var(--space-md) 0;
    border: 1px solid rgba(43, 45, 66, 0.25);
}

.mt-steps-static div {
    flex: 1 1 0;
    position: relative;
}

.mt-steps-static div span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    text-align: center;
    font-size: 9px;
    line-height: 1;
}

.mt-chart-static {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    max-width: 52rem;
    margin: var(--space-md) 0 var(--space-lg);
}

.mt-chart-static .mt-patch {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.mt-chart-static .mt-swatch {
    height: 64px;
}

.mt-chart-static span,
.mt-chart-static code {
    display: block;
    padding: 0 0.4rem;
    font-size: 0.75rem;
    line-height: 1.3;
}

.mt-chart-static code {
    padding-bottom: 0.4rem;
    color: var(--color-gray-dark);
}

.mt-source {
    margin: 0 0 var(--space-lg);
    max-width: 46rem;
}

.mt-source h3 {
    margin-bottom: 0.25rem;
}

.mt-faq details {
    max-width: 46rem;
    margin: 0.55rem 0;
    padding: 0.85rem 1rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mt-faq summary {
    font-weight: 600;
    cursor: pointer;
}

.mt-faq p {
    margin: 0.7rem 0 0.2rem;
}

.mt-care {
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
    border: 1px dashed #c8c2d6;
    border-radius: var(--radius-lg);
    background: #faf9fb;
}

.mt-care h2 {
    margin-bottom: var(--space-sm);
}

#monitor-care-slot:empty {
    min-height: 0;
}

#mt-stage[hidden],
#mt-motion[hidden],
#mt-fixer[hidden],
#mt-speed[hidden] {
    display: none !important;
}

#mt-stage {
    position: fixed;
    inset: 0;
    z-index: 2000;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #000000;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

#mt-stage:focus {
    outline: none;
}

#mt-surface,
#mt-motion {
    position: absolute;
    inset: 0;
}

#mt-surface {
    z-index: 1;
}

#mt-motion {
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

#mt-bar {
    position: absolute;
    top: 28%;
    left: 0;
    width: 14%;
    height: 18%;
    background: #000000;
    will-change: transform;
}

.mt-text {
    height: 100%;
    overflow: auto;
    padding: 6vh 7vw 26vh;
    box-sizing: border-box;
    user-select: text;
    -webkit-user-select: text;
}

.mt-text p {
    margin: 0 0 0.7rem;
    max-width: 40rem;
}

.mt-sans {
    font-family: Inter, 'Segoe UI', sans-serif;
}

.mt-serif {
    font-family: Georgia, 'Times New Roman', serif;
}

.mt-text-split {
    display: flex;
    height: 100%;
}

.mt-text-split > .mt-text {
    width: 50%;
}

.mt-ramp,
.mt-steps,
.mt-split,
.mt-chirp-wrap {
    display: flex;
    width: 100%;
    height: 100%;
}

.mt-ramp i,
.mt-step,
.mt-split > div {
    flex: 1 1 0;
    height: 100%;
}

.mt-ramp.is-v {
    flex-direction: column;
}

.mt-ramp.is-v i {
    width: 100%;
    height: auto;
}

.mt-steps {
    box-sizing: border-box;
    background: #000000;
}

.mt-step {
    position: relative;
}

.mt-step span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    text-align: center;
    font-size: 11px;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.mt-chirp-wrap {
    background: #ffffff;
}

.mt-chirp-wrap canvas {
    width: 50%;
    height: 100%;
    display: block;
}

.mt-chart-full {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 16px 16px 9rem;
    background: #111111;
}

.mt-chart-full .mt-patch {
    position: relative;
    min-width: 0;
    min-height: 0;
}

.mt-chart-full .mt-patch span {
    position: absolute;
    left: 4px;
    bottom: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    font-size: 11px;
    line-height: 1.2;
}

.mt-hud {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 16px));
    max-height: 48vh;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    background: rgba(8, 8, 10, 0.9);
    color: #ffffff;
    transition: opacity 180ms ease;
}

.mt-hud.is-idle {
    opacity: 0;
    pointer-events: none;
}

.mt-hud p {
    margin: 0 0 6px;
    font-size: var(--font-size-sm);
}

.mt-hud-name {
    font-weight: 700;
    font-size: 1rem;
}

.mt-hud-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.mt-hud button,
.mt-hud a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    background: #1c1c1c;
    color: #ffffff;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.mt-hud button[aria-pressed="true"] {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

.mt-hud a:hover,
.mt-hud button:hover {
    color: #ffffff;
}

.mt-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px) {
    .mt-page h1 {
        max-width: none;
    }

    .mt-chart-static {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mt-split,
    .mt-chirp-wrap,
    .mt-text-split {
        flex-direction: column;
    }

    .mt-chirp-wrap canvas,
    .mt-text-split > .mt-text {
        width: 100%;
        height: 50%;
    }

    .mt-chart-full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(8, minmax(0, 1fr));
    }
}

@media print {
    .site-header,
    .mt-actions,
    .mt-jump,
    #mt-stage,
    .site-footer {
        display: none !important;
    }

    .mt-page {
        padding: 0;
    }

    #checklist,
    .mt-faq details,
    .mt-source {
        break-inside: avoid;
    }

    .mt-answer,
    #checklist ol,
    .mt-faq details {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
