/* GameLab editorial layer — current site identity around, never inside, the games. */

.gamelab-content-page {
    overflow-x: clip;
    background: var(--editorial-paper);
    color: var(--editorial-ink);
}

.gamelab-content-page main,
.gamelab-content-page .research-article {
    background: var(--editorial-paper);
}

.gamelab-content-page main::before,
.gamelab-content-page main::after,
.gamelab-content-page .research-article::before,
.gamelab-content-page .research-article::after {
    display: none !important;
}

.gamelab-content-page .page-header,
.gamelab-content-page .gamelab-simple-nav {
    position: sticky;
    z-index: 900;
    top: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--editorial-rule);
    background: rgba(251, 250, 246, 0.97);
    box-shadow: none;
}

.gamelab-content-page .page-header .container,
.gamelab-content-page .gamelab-simple-nav .container,
.gamelab-content-page .context-bar .container {
    width: min(calc(100% - 3rem), var(--editorial-wide));
    max-width: none;
    padding-inline: 0;
}

.gamelab-content-page .page-header .nav,
.gamelab-content-page .gamelab-simple-nav .nav {
    display: flex;
    min-height: 68px;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.gamelab-content-page .page-header .nav-logo,
.gamelab-content-page .gamelab-simple-nav .nav-logo {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.gamelab-content-page .page-header .nav-back,
.gamelab-content-page .gamelab-simple-nav .nav-back {
    color: var(--editorial-ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.gamelab-content-page .page-header .nav-back:hover,
.gamelab-content-page .gamelab-simple-nav .nav-back:hover {
    color: var(--editorial-blue);
}

.gamelab-content-page .context-bar {
    border-bottom: 1px solid var(--editorial-rule);
    background: #ece8df;
}

.gamelab-content-page .context-nav,
.gamelab-content-page .context-nav a {
    color: var(--editorial-muted);
}

.gamelab-content-page .context-nav a {
    color: var(--editorial-blue);
}

/* Hub */

.gamelab-content-page .gamelab-hub {
    width: min(calc(100% - 3rem), var(--editorial-wide));
    max-width: none !important;
    margin-inline: auto;
    padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(5rem, 9vw, 8rem) !important;
}

.gamelab-eyebrow {
    margin: 0 0 1rem;
    color: var(--editorial-blue) !important;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.gamelab-content-page .gamelab-hub > h1 {
    max-width: 900px;
    margin: 0 0 1.1rem !important;
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.9;
}

.gamelab-content-page .gamelab-hub > .gamelab-lede {
    max-width: 820px;
    margin: 0;
    color: var(--editorial-ink-soft) !important;
    font-family: var(--editorial-serif);
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
    line-height: 1.5 !important;
}

.gamelab-content-page .hub-local-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.3rem;
    margin: 2rem 0 2.4rem;
    padding: 1rem 0;
    border-top: 1px solid var(--editorial-rule);
    border-bottom: 1px solid var(--editorial-rule);
}

.gamelab-content-page .hub-local-nav a {
    color: var(--editorial-blue-dark);
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
}

.gamelab-content-page .hub-hero-visual {
    width: 100%;
    max-width: 100%;
    height: clamp(280px, 42vw, 470px);
    margin: 0 0 clamp(3rem, 7vw, 5.5rem);
    overflow: hidden;
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: var(--editorial-paper-bright);
}

.gamelab-content-page .hub-hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) contrast(1.03);
}

.gamelab-content-page #projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 0 !important;
    border-top: 1px solid var(--editorial-rule-strong);
    --gamelab-card-media-width: 168px;
    --gamelab-card-media-height: 138px;
}

.gamelab-content-page #projects .gamelab-card {
    min-height: calc(var(--gamelab-card-media-height) + 1px);
    border: 0;
    border-bottom: 1px solid var(--editorial-rule);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--editorial-ink);
    transform: none;
}

.gamelab-content-page #projects .gamelab-card:nth-child(even) {
    border-left: 1px solid var(--editorial-rule);
}

.gamelab-content-page #projects .gamelab-card:hover {
    border-color: var(--editorial-rule-strong);
    background: var(--editorial-paper-bright);
    box-shadow: none;
    color: var(--editorial-ink);
    transform: none;
}

.gamelab-content-page #projects .gamelab-card-media {
    border-right: 1px solid var(--editorial-rule);
    background: #e7e2d8;
}

.gamelab-content-page #projects .gamelab-card-thumb {
    filter: saturate(0.82) contrast(1.03);
}

.gamelab-content-page #projects .gamelab-card:hover .gamelab-card-thumb {
    opacity: 0.94;
    transform: scale(1.02);
}

.gamelab-content-page #projects .gamelab-card-body {
    padding: 1rem 1.1rem;
}

.gamelab-content-page #projects .gamelab-card-body h3 {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: 1.25rem;
}

.gamelab-content-page #projects .gamelab-card-body p {
    color: var(--editorial-muted) !important;
    font-size: 0.82rem;
    line-height: 1.5 !important;
}

.gamelab-content-page .gamelab-card-chip {
    min-height: 1.25rem;
    padding: 0.08rem 0.42rem;
    border: 1px solid var(--editorial-rule-strong) !important;
    border-radius: 999px;
    background: transparent !important;
    color: var(--editorial-muted) !important;
    font-size: 0.67rem;
    font-weight: 700;
}

.gamelab-content-page .card-link {
    color: var(--editorial-blue);
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
}

.gamelab-content-page #connective-tissue {
    margin-top: clamp(3rem, 7vw, 5rem) !important;
    padding-top: 2rem;
    border-top: 1px solid var(--editorial-rule-strong);
}

.gamelab-content-page #connective-tissue h2 {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(2rem, 4vw, 3.25rem) !important;
}

.gamelab-content-page #connective-tissue ul {
    color: var(--editorial-ink-soft) !important;
}

/* Project and research notes */

.gamelab-content-page .research-article {
    min-height: calc(100vh - 160px);
    padding: clamp(3.75rem, 8vw, 7rem) 0 clamp(4.5rem, 8vw, 7rem);
}

.gamelab-content-page .research-article > .container,
.gamelab-content-page main.research-article > .container {
    width: min(calc(100% - 3rem), 920px);
    max-width: none;
    padding-inline: 0;
}

.gamelab-content-page .article-header {
    max-width: 860px;
    margin: 0 0 clamp(3rem, 7vw, 5rem);
    padding: 0 0 clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--editorial-rule-strong);
}

.gamelab-content-page .article-header h1 {
    max-width: 880px;
    margin: 0.7rem 0 1.2rem;
    background: none;
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(3rem, 6.5vw, 5.35rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 0.98;
    -webkit-text-fill-color: currentColor;
}

.gamelab-content-page .article-subtitle {
    max-width: 780px;
    margin: 0 0 1.25rem;
    color: var(--editorial-ink-soft);
    font-family: var(--editorial-serif);
    font-size: clamp(1.2rem, 2.2vw, 1.62rem);
    line-height: 1.5;
}

.gamelab-content-page .article-meta {
    color: var(--editorial-muted);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.gamelab-content-page .research-tag {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: var(--editorial-blue) !important;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gamelab-content-page .article-content {
    max-width: var(--editorial-measure);
}

.gamelab-content-page .article-content section {
    margin: 0 0 clamp(2.75rem, 6vw, 4.5rem);
    padding: 0;
}

.gamelab-content-page .article-content h2 {
    margin: 0 0 1rem;
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    letter-spacing: -0.025em;
}

.gamelab-content-page .article-content h3 {
    margin: 2rem 0 0.75rem;
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.gamelab-content-page main p,
.gamelab-content-page main li,
.gamelab-content-page .research-article p,
.gamelab-content-page .research-article li {
    color: var(--editorial-ink-soft);
}

.gamelab-content-page .article-content p,
.gamelab-content-page .article-content li {
    font-size: 1.02rem;
    line-height: 1.78;
    overflow-wrap: anywhere;
}

.gamelab-content-page .article-content a,
.gamelab-content-page main a:not(.btn) {
    color: var(--editorial-blue);
    overflow-wrap: anywhere;
}

.gamelab-content-page .article-content :not(pre) > code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gamelab-content-page .article-content blockquote {
    margin: 2.25rem 0;
    padding: 1.35rem 1.5rem;
    border: 0;
    border-left: 3px solid var(--editorial-blue);
    border-radius: 0;
    background: var(--editorial-blue-wash);
    color: var(--editorial-blue-dark);
    font-family: var(--editorial-serif);
    font-size: 1.2rem;
    font-style: normal;
    line-height: 1.55;
}

.gamelab-content-page .article-disclosure,
.gamelab-content-page .article-callout,
.gamelab-content-page .source-strip,
.gamelab-content-page .nasapd-warning-card {
    padding: 1.15rem 1.35rem;
    border: 0;
    border-left: 3px solid var(--editorial-blue);
    border-radius: 0;
    background: var(--editorial-blue-wash);
    box-shadow: none;
}

.gamelab-content-page .article-disclosure p,
.gamelab-content-page .article-callout p,
.gamelab-content-page .source-strip p,
.gamelab-content-page .nasapd-warning-card p {
    color: var(--editorial-ink-soft);
}

.gamelab-content-page .article-figure,
.gamelab-content-page .article-image,
.gamelab-content-page .article-hero-image,
.gamelab-content-page .project-shot,
.gamelab-content-page .nasapd-shot,
.gamelab-content-page .data-project-hero {
    overflow: hidden;
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: var(--editorial-paper-bright);
    box-shadow: none;
}

.gamelab-content-page .article-figure img,
.gamelab-content-page .article-image img,
.gamelab-content-page .article-hero-image img,
.gamelab-content-page .project-shot img,
.gamelab-content-page .nasapd-shot img,
.gamelab-content-page .data-project-hero img {
    filter: saturate(0.86) contrast(1.03);
}

.gamelab-content-page figcaption {
    padding: 0.75rem 0.9rem;
    border-top: 1px solid var(--editorial-rule);
    background: var(--editorial-paper-bright);
    color: var(--editorial-muted) !important;
    font-size: 0.78rem;
    line-height: 1.5;
}

.gamelab-content-page .article-grid,
.gamelab-content-page .article-mini-grid,
.gamelab-content-page .mms4-research-grid,
.gamelab-content-page .nasapd-warning-grid,
.gamelab-content-page .two-up {
    gap: 1rem;
}

.gamelab-content-page .source-strip > *,
.gamelab-content-page .nasapd-source-strip > * {
    min-width: 0;
}

.gamelab-content-page .article-card,
.gamelab-content-page .article-mini-card,
.gamelab-content-page .runtime-panel {
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: var(--editorial-paper-bright);
    box-shadow: none;
    color: var(--editorial-ink);
}

.gamelab-content-page .article-card h3,
.gamelab-content-page .article-mini-card h3,
.gamelab-content-page .runtime-panel h3 {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
}

.gamelab-content-page .article-code,
.gamelab-content-page pre {
    overflow-x: auto;
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: #ebe7de;
    color: var(--editorial-ink);
}

.gamelab-content-page code {
    border-radius: 2px;
    background: #e6e1d7;
    color: var(--editorial-blue-dark);
}

.gamelab-content-page .source-list,
.gamelab-content-page .source-meta-list,
.gamelab-content-page .nasapd-source-list,
.gamelab-content-page .runtime-list {
    color: var(--editorial-ink-soft);
}

.gamelab-content-page .article-footer {
    max-width: var(--editorial-measure);
    margin-top: clamp(4rem, 8vw, 6rem);
    padding-top: 2rem;
    border-top: 1px solid var(--editorial-rule-strong);
}

.gamelab-content-page .article-cta {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: var(--editorial-paper-bright);
    text-align: left;
}

.gamelab-content-page .article-cta h3 {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
}

.gamelab-content-page .article-cta p {
    color: var(--editorial-muted);
}

.gamelab-content-page .btn {
    min-height: 44px;
    border-radius: 2px;
    box-shadow: none;
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
    transform: none;
}

.gamelab-content-page .btn-primary {
    border: 1px solid var(--editorial-blue-dark);
    background: var(--editorial-blue-dark);
    color: #fff;
}

.gamelab-content-page .btn-primary:hover {
    border-color: var(--editorial-ink);
    background: var(--editorial-ink);
    color: #fff;
}

.gamelab-content-page .btn-secondary {
    border: 1px solid var(--editorial-rule-strong);
    background: transparent;
    color: var(--editorial-blue-dark);
}

.gamelab-content-page .btn-secondary:hover {
    border-color: var(--editorial-blue);
    background: var(--editorial-blue-wash);
    color: var(--editorial-blue-dark);
}

.gamelab-content-page .site-footer {
    border-top: 1px solid var(--editorial-rule);
    background: var(--editorial-paper-bright);
}

.gamelab-content-page .site-footer p {
    color: var(--editorial-muted);
}

/* Compact project summaries without the full article shell. */

.gamelab-content-page .gamelab-brief {
    width: min(calc(100% - 3rem), 920px);
    max-width: none !important;
    margin-inline: auto;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(5rem, 9vw, 8rem) !important;
}

.gamelab-content-page .gamelab-brief > a:first-child {
    display: none;
}

.gamelab-content-page .gamelab-brief > h1 {
    margin: 0 0 1rem !important;
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
    font-size: clamp(3.25rem, 7vw, 5.5rem);
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.gamelab-content-page .gamelab-brief > p:first-of-type {
    max-width: 780px;
    color: var(--editorial-ink-soft) !important;
    font-family: var(--editorial-serif);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    line-height: 1.55;
}

.gamelab-content-page .gamelab-brief > .leadership-card {
    margin-top: clamp(2.5rem, 5vw, 4rem) !important;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--editorial-rule);
    border-radius: 2px;
    background: var(--editorial-paper-bright);
    box-shadow: none;
}

.gamelab-content-page .gamelab-brief > .leadership-card h3,
.gamelab-content-page .gamelab-brief > h2 {
    color: var(--editorial-ink);
    font-family: var(--editorial-serif);
}

.gamelab-content-page .gamelab-brief > h2 {
    margin-top: 2.5rem !important;
    font-size: 1.45rem !important;
}

@media (max-width: 980px) {
    .gamelab-content-page #projects {
        grid-template-columns: 1fr;
        --gamelab-card-media-width: 220px;
        --gamelab-card-media-height: 148px;
    }

    .gamelab-content-page #projects .gamelab-card:nth-child(even) {
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .gamelab-content-page .page-header .container,
    .gamelab-content-page .gamelab-simple-nav .container,
    .gamelab-content-page .context-bar .container,
    .gamelab-content-page .gamelab-hub,
    .gamelab-content-page .research-article > .container,
    .gamelab-content-page main.research-article > .container,
    .gamelab-content-page .gamelab-brief {
        width: min(calc(100% - 2rem), var(--editorial-wide));
    }

    .gamelab-content-page .gamelab-hub > h1,
    .gamelab-content-page .article-header h1,
    .gamelab-content-page .gamelab-brief > h1 {
        font-size: clamp(2.65rem, 13vw, 4rem);
    }

    .gamelab-content-page .hub-hero-visual {
        aspect-ratio: auto;
        height: 260px;
    }

    .gamelab-content-page #projects .gamelab-card {
        grid-template-columns: 1fr;
    }

    .gamelab-content-page #projects .gamelab-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--editorial-rule);
    }

    .gamelab-content-page .article-grid,
    .gamelab-content-page .article-mini-grid,
    .gamelab-content-page .mms4-research-grid,
    .gamelab-content-page .nasapd-warning-grid,
    .gamelab-content-page .two-up {
        grid-template-columns: 1fr;
    }

    .gamelab-content-page .btn-group {
        align-items: stretch;
        flex-direction: column;
    }

    .gamelab-content-page .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gamelab-content-page .gamelab-card,
    .gamelab-content-page .gamelab-card-thumb,
    .gamelab-content-page .btn {
        transition: none;
    }
}

@media print {
    .gamelab-content-page .site-nav,
    .gamelab-content-page .page-header,
    .gamelab-content-page .gamelab-simple-nav,
    .gamelab-content-page .context-bar,
    .gamelab-content-page .article-footer,
    .gamelab-content-page .site-footer {
        display: none !important;
    }

    .gamelab-content-page,
    .gamelab-content-page main,
    .gamelab-content-page .research-article {
        background: #fff !important;
    }
}
