/*
 * home.css — Home-page-only responsive mockup rules.
 *
 * The homepage uses several desktop-shaped product mockups. These rules
 * keep those mockups inside their own scroll/stacking context on narrow
 * viewports so they cannot set the document's horizontal scroll width.
 */

.hero-workspace-grid {
    display: grid;
    grid-template-columns: 220px minmax(420px, 1fr) 320px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hero-workspace-grid > * {
    min-width: 0;
}

.section .grid > [class*="col-span"] {
    min-width: 0;
}

.section .window {
    min-width: 0;
    max-width: 100%;
}

.ai-tier-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.ai-tier-card-primary {
    border-bottom: 1px solid var(--line);
}

.ai-tier-grid > * {
    min-width: 0;
    overflow: hidden;
}

.ai-tier-heading {
    flex-wrap: wrap;
}

.ai-tier-heading .mono {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ai-tier-grid p,
.ai-tier-grid span {
    overflow-wrap: anywhere;
}

.menu-mock-window {
    overflow: hidden;
}

.menu-bar-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-bar-row > span {
    flex: 0 0 auto;
}

.menu-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 360px;
    padding: 12px;
    background: var(--bg);
}

.format-dropdown {
    width: 100%;
    max-width: 280px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 0;
    background: var(--bg-2);
    box-shadow: 0 18px 40px -10px rgba(0,0,0,0.6);
}

.menu-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
}

.menu-callout-line {
    display: block;
    flex: 0 0 auto;
    height: 20px;
    border-left: 1px dashed var(--accent);
}

.menu-callout-label {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .section .window {
        overflow: hidden;
    }

    .ftgrid .tile {
        overflow: hidden;
    }

    .ftgrid .mono {
        overflow-wrap: anywhere;
    }
}

@media (min-width: 768px) {
    .ai-tier-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ai-tier-card-primary {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .menu-mock-window {
        overflow: visible;
    }

    .menu-stage {
        display: block;
        min-height: 260px;
        padding: 0;
    }

    .format-dropdown {
        position: absolute;
        top: 0;
        left: 196px;
        width: 280px;
    }

    .menu-callout {
        position: absolute;
        left: 488px;
        align-items: center;
        gap: 12px;
    }

    .menu-callout-prettify {
        top: 110px;
    }

    .menu-callout-start {
        top: 22px;
    }

    .menu-callout-line {
        width: 56px;
        height: 0;
        border-top: 1px dashed var(--accent);
        border-left: 0;
    }

    .menu-callout-label {
        white-space: nowrap;
    }
}
