/* Observe and write together; background reading and public questions follow. */
body.home-fullscreen-entry {
    --home-navigation-height: 72px;
    --home-entry-controls-height: 0px;
}
body.mond-page.home-event-page.research-look-page.home-fullscreen-entry > header.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px clamp(20px, 3vw, 48px);
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: linear-gradient(#03070de8, #03070d8c, #03070d00) !important;
    backdrop-filter: none;
    color: #f2f6fb;
}
body.mond-page.home-event-page.research-look-page.home-fullscreen-entry.has-scrolled > header.nav {
    background: #07101beF !important;
    backdrop-filter: blur(16px);
}
body.home-fullscreen-entry.research-look-page > header.nav .brand {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
}
body.home-fullscreen-entry > header.nav .home-header-particle-wordmark {
    width: clamp(145px, 15vw, 205px);
    height: auto;
    filter: brightness(0) invert(1);
}
body.home-fullscreen-entry.research-look-page .nav-links a {
    color: #d9e3ed;
    white-space: nowrap;
}
body.home-fullscreen-entry.research-look-page .nav-links a:is(:hover, .is-current) {
    background: #c0d4ec12;
    color: #fff;
}
body.home-fullscreen-entry.research-look-page > header.nav #languageToggle {
    color: #edf4fc;
    border-color: #b6c8dc66;
    background: #101c2940;
}
body.home-fullscreen-entry.research-look-page .home-event-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
body.home-fullscreen-entry.research-look-page #observatory {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #03070d;
    scroll-margin-top: 0;
}
body.home-fullscreen-entry #observatory::before,
body.home-fullscreen-entry #observatory::after,
body.home-fullscreen-entry #observatory .home-immersive-space { display: none; }
body.home-fullscreen-entry.research-look-page #observatory .home-split-board {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}
body.home-fullscreen-entry.research-look-page #observatory .home-event-card,
body.home-fullscreen-entry.research-look-page #observatory .home-event-canvas-frame {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}
body.home-fullscreen-entry.research-look-page #observatory .home-event-canvas {
    height: calc(100svh - var(--home-entry-controls-height));
    min-height: 0;
    max-height: none;
    border-radius: 0;
}
body.home-fullscreen-entry.research-look-page #observatory .home-event-canvas:not(:fullscreen):not(.is-detector-fullscreen-fallback) .detector-toolbar {
    inset: calc(var(--home-navigation-height) + 12px) 28px auto auto;
    width: auto;
    max-width: calc(100% - 56px);
}
/* The old title remains the document's accessible h1, without a second logo. */
body.home-fullscreen-entry #observatory .home-event-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}
body.home-fullscreen-entry.research-look-page #observatory > .home-event-hero {
    display: block;
    inset: auto auto calc(var(--home-entry-controls-height) + 104px) clamp(24px, 4vw, 64px);
    width: auto;
    max-width: calc(100% - 48px);
    margin: 0;
    padding: 0;
    z-index: 14;
    pointer-events: none;
}
body.home-fullscreen-entry.research-look-page #observatory > .home-observatory-scroll {
    position: absolute;
    inset: auto auto 20px 50%;
    z-index: 18;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 44px;
    padding: 0 14px;
    transform: translateX(-50%);
    color: #dce8f2;
    font-size: 12px;
    letter-spacing: .08em;
    text-decoration: none;
    border: 1px solid #afc5da44;
    border-radius: 24px;
    background: #07101ba6;
}
.home-observatory-scroll:hover { background: #17293c; }
.home-observatory-scroll:focus-visible { outline: 2px solid #b9d8f5; outline-offset: 4px; }
.home-observatory-scroll .home-scroll-short { display: none; }
body.home-fullscreen-entry :is(#explore-notes, #question-console, #homeXQuestionLanding, #homeSiteIntro, #discovery-wall, #physics-frontier) {
    scroll-margin-top: calc(var(--home-navigation-height) + 24px);
}
body.home-fullscreen-entry .home-exploration-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    width: min(1120px, calc(100% - 80px));
    margin: 32px auto 40px;
}
.home-exploration-copy,
.home-question-workspace { min-width: 0; }
/* Keep the shared-question context, without an empty column after mounting. */
#homeQuestionWorkspace:not(:has(#question-console)):not(:has(#homeXQuestionLanding:not([hidden]))) { display: none; }
body.home-fullscreen-entry.research-look-page #homeQuestionInvitation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px 40px;
    margin: 0 0 24px;
    padding: 12px 0;
    color: #35485d;
}
body.home-fullscreen-entry #homeQuestionInvitation h2 {
    margin: 0;
    color: #192e46;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 600;
    line-height: 1.65;
    text-wrap: balance;
}
body.home-fullscreen-entry #homeQuestionInvitation p {
    max-width: 680px;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.9;
}
.home-question-invitation-actions { display: grid; gap: 6px; justify-items: start; }
.home-question-invitation-actions :is(button, a) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #b9cce1;
    border-radius: 8px;
    background: #edf3fb;
    color: #294f85;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}
.home-question-invitation-actions a { border-color: transparent; background: transparent; }
.home-question-invitation-actions :is(button, a):hover { background: #e2ecf9; }
.home-question-invitation-actions :is(button, a):focus-visible { outline: 3px solid #517ac1; outline-offset: 3px; }
body.home-fullscreen-entry #homeSiteAbout { margin: 0; }
body.home-fullscreen-entry #homeSiteAbout > summary { padding: 20px 58px 12px 0; border-top: 1px solid #d5dee8; font-size: 13px; }
body.home-fullscreen-entry.research-look-page #homeSiteIntroDismiss { top: 12px; right: 0; }
body.home-fullscreen-entry #homeQuestionWorkspace #question-console {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid #dce4ee;
    border-radius: 18px;
    background: #fff;
    color: #24364b;
    box-shadow: 0 12px 36px #142a4408;
    box-sizing: border-box;
}
#homeQuestionWorkspace #question-console::before,
#homeQuestionWorkspace #question-console::after,
#homeQuestionWorkspace .home-question-dock-header,
#homeQuestionWorkspace .home-board-head .label { display: none; }
#homeQuestionWorkspace .home-board-head .label { display: none !important; }
#homeQuestionWorkspace .home-board-head { display: block; margin: 0 0 20px; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-board-head h2 { margin: 0; font-size: 20px; line-height: 1.7; color: #24364b; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-ai-console {
    padding: 0;
    min-height: 0;
    max-height: none;
    background: transparent;
    border: 0;
}
body.home-fullscreen-entry #homeQuestionWorkspace .home-chat-composer { padding: 0; border: 0; background: transparent; }
body.home-fullscreen-entry #homeQuestionWorkspace textarea.home-event-input {
    min-height: 136px;
    height: 150px;
    max-height: 420px;
    padding: 14px 16px;
    border: 1px solid #c9d6e5;
    border-radius: 12px;
    background: #f7f9fc;
    color: #23374d;
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
}
#homeQuestionWorkspace .home-chat-session.is-empty { display: none; }
#homeQuestionWorkspace .home-ai-status:empty { display: none; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-event-ask-actions { display: flex; flex-wrap: wrap; gap: 12px; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-event-ask-actions button { min-height: 44px; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-event-ask-actions #homeChatSeeds {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
body.home-fullscreen-entry #homeQuestionWorkspace #homeChatSeeds > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #c7d5e5;
    border-radius: 8px;
    background: #f6f9fd;
    color: #294f85;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
    box-sizing: border-box;
}
body.home-fullscreen-entry #homeQuestionWorkspace #homeChatSeeds > summary > span {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
}
body.home-fullscreen-entry #homeQuestionWorkspace #homeAiResetBtn { width: auto; flex: 0 0 auto; font-size: 13px; }
body.home-fullscreen-entry #homeQuestionWorkspace .home-chat-keyboard-hint { color: #67788d; font-size: 12px; }
body.home-fullscreen-entry.research-look-page .home-community-research-grid {
    width: min(1360px, calc(100% - 64px));
    margin: 0 auto 72px;
}
@media (max-width: 920px) {
    body.home-fullscreen-entry.research-look-page > header.nav { padding: 12px 20px; gap: 12px; }
    body.home-fullscreen-entry.research-look-page .nav-links a { font-size: 12px; }
    body.home-fullscreen-entry .home-exploration-section { grid-template-columns: minmax(0, 1fr); width: min(680px, calc(100% - 40px)); gap: 28px; }
    body.home-fullscreen-entry.research-look-page #homeQuestionInvitation { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 700px), (pointer: coarse) {
    body.home-fullscreen-entry { --home-navigation-height: 106px; --home-entry-controls-height: 72px; }
    body.home-fullscreen-entry.research-look-page #observatory .home-event-stepper-below {
        display: grid;
        grid-template-columns: 1fr minmax(136px, 1.5fr) 1fr;
        align-items: center;
        gap: 8px;
        height: var(--home-entry-controls-height);
        min-height: 0;
        padding: 8px;
        box-sizing: border-box;
    }
    body.home-fullscreen-entry.research-look-page #observatory .home-event-canvas:not(:fullscreen):not(.is-detector-fullscreen-fallback) .detector-toolbar {
        inset: calc(var(--home-navigation-height) + 8px) 12px auto 12px;
        max-width: none;
    }
    body.home-fullscreen-entry #particleEventCanvas:not(:fullscreen):not(.is-detector-fullscreen-fallback) .home-display-question-dock {
        bottom: 78px;
        max-height: calc(100% - var(--home-navigation-height) - 144px);
    }
    body.home-fullscreen-entry #observatory:has(.home-display-question-dock:not(.is-collapsed)) > .home-observatory-scroll { visibility: hidden; }
    body.home-fullscreen-entry.research-look-page #observatory > .home-observatory-scroll {
        inset: auto 12px 88px auto;
        transform: none;
        gap: 8px;
        padding-inline: 12px;
    }
    .home-observatory-scroll .home-scroll-long { display: none; }
    .home-observatory-scroll .home-scroll-short { display: inline; }
    body.home-fullscreen-entry.research-look-page .home-community-research-grid { width: calc(100% - 24px); }
}
@media (max-height: 520px) and (orientation: landscape) {
    body.mond-page.home-event-page.research-look-page.home-fullscreen-entry > header.nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
        padding: 8px 20px;
    }
    body.home-fullscreen-entry.research-look-page > header.nav .brand { order: 0; }
    body.home-fullscreen-entry.research-look-page > header.nav .nav-links {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        margin: 0;
        overflow-x: auto;
    }
    body.home-fullscreen-entry.research-look-page > header.nav .nav-actions { order: 2; flex: 0 0 auto; }
    body.home-fullscreen-entry.research-look-page > header.nav .nav-links a { font-size: 11px; }
    body.home-fullscreen-entry.research-look-page #observatory > .home-event-hero { display: none; }
    body.home-fullscreen-entry #particleEventCanvas:not(:fullscreen):not(.is-detector-fullscreen-fallback) .home-display-question-dock {
        bottom: 54px;
        max-height: calc(100% - var(--home-navigation-height) - 58px);
    }
    body.home-fullscreen-entry #particleEventCanvas .home-display-question-dock.is-composing textarea.home-event-input {
        min-height: 80px;
        height: 80px;
        padding-bottom: 30px;
    }
    body.home-fullscreen-entry.research-look-page #observatory > .home-observatory-scroll {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Leave a small top inset instead of centering in mobile fullscreen. The SVG and
   HTML hit targets move by the same amount; their existing scale, centering,
   camera transforms and reduced-motion alignment remain untouched. */
@media (max-width: 700px), (pointer: coarse) {
    body.home-fullscreen-entry #particleEventCanvas:is(:fullscreen, :-webkit-full-screen, .is-detector-fullscreen-fallback) .detector-visual-stage {
        --home-fullscreen-drawing-width: 100cqw;
        --home-fullscreen-drawing-lift: max(0px, calc((100cqh - min(100cqh, calc(var(--home-fullscreen-drawing-width) * 620 / 760))) / 2 - 12px));
    }
    body.home-fullscreen-entry #particleEventCanvas:is(:fullscreen, :-webkit-full-screen, .is-detector-fullscreen-fallback) .detector-visual-stage > :is(.event-detector-svg, .detector-hit-layer) {
        translate: 0 calc(-1 * var(--home-fullscreen-drawing-lift));
    }
}
@media (max-width: 700px) {
    /* Match the existing 150% 3D drawing only while it is inside the observatory.
       Fallback fullscreen moves the canvas to body and uses a 100% drawing. */
    body.home-fullscreen-entry #observatory #particleEventCanvas:is(:fullscreen, :-webkit-full-screen, .is-detector-fullscreen-fallback) .detector-shell.is-3d .detector-visual-stage {
        --home-fullscreen-drawing-width: 150cqw;
    }
}

/* A single mobile workspace owns selection and results. Keep its header and
   details action outside the scrolling body, clear of the measured toolbar. */
@media (max-width: 700px), (pointer: coarse) {
    body.home-fullscreen-entry #particleEventCanvas.has-detector-workspace .detector-mass-overlay {
        position: absolute;
        inset: auto 12px 12px;
        z-index: 24;
        width: auto;
        height: min(48dvh, 380px, calc(100% - var(--home-mass-top-limit, 220px) - 12px));
        min-height: 0;
        max-height: none;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
        box-sizing: border-box;
        border: 1px solid #617b96;
        border-radius: 16px;
        background: #0b1828;
        box-shadow: 0 -12px 40px #0006;
        overflow: hidden;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-overlay > header {
        min-height: 44px;
        background: transparent;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-overlay > header strong {
        font-size: 14px;
        line-height: 1.5;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-overlay .detector-fullscreen-mass-content {
        align-content: start;
        align-items: start;
        gap: 12px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-partners > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 2px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-partners > p {
        font-size: 12px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-partners button {
        min-width: 0;
        min-height: 48px;
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 7px 10px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-partners button > strong {
        font-size: 13px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-partners button > small { font-size: 12px; }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-result {
        align-items: flex-start;
        justify-content: flex-start;
        gap: 14px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-result p {
        display: grid;
        gap: 6px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-result small { font-size: 12px; }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-result strong { font-size: 28px; }
    body.home-fullscreen-entry #particleEventCanvas .detector-fullscreen-mass-result em {
        display: block;
        font-size: 12px;
        line-height: 1.5;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-footer {
        border-top: 1px solid #49647d;
        padding-top: 8px;
        gap: 12px;
    }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-details-link {
        flex: 1 1 auto;
        min-height: 44px;
        text-align: left;
        font-size: 12px;
        line-height: 1.5;
    }
    body.home-fullscreen-entry #particleEventCanvas:has(.detector-mass-overlay) .home-display-question-dock.is-collapsed,
    body.home-fullscreen-entry #particleEventCanvas:has(.detector-mass-overlay) .detector-bottom-rail,
    body.home-fullscreen-entry #observatory:has(.detector-mass-overlay) > .home-observatory-scroll { visibility: hidden; }
    body.home-fullscreen-entry #particleEventCanvas .detector-mass-overlay :is(button, summary):focus-visible {
        outline: 2px solid #b9dcff;
        outline-offset: -2px;
    }
    body.home-fullscreen-entry #particleEventCanvas :is(.detector-visual-stage, .event-track-hit, .detector-track-touch-target, .detector-mass-overlay, #homeMassDetailsDialog) { -webkit-tap-highlight-color: transparent; }
}
@media (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
    body.home-fullscreen-entry.research-look-page #observatory:has(.detector-mass-overlay) .home-event-canvas { height: 100svh; }
    body.home-fullscreen-entry.research-look-page #observatory:has(.detector-mass-overlay) .home-event-stepper-below { display: none; }
    body.home-fullscreen-entry #particleEventCanvas.has-detector-workspace .detector-mass-overlay {
        inset: calc(var(--home-navigation-height) + 8px) 12px 12px auto;
        width: min(420px, 46%);
        height: auto;
    }
    body.home-fullscreen-entry.research-look-page #observatory #particleEventCanvas:has(.detector-mass-overlay) .detector-toolbar {
        left: 12px;
        right: calc(min(420px, 46%) + 24px);
        width: auto;
        max-width: none;
    }
    body.home-fullscreen-entry #particleEventCanvas:is(:fullscreen, .is-detector-fullscreen-fallback):has(.detector-mass-overlay) .detector-toolbar {
        position: absolute !important;
        inset: 8px calc(min(420px, 46%) + 24px) auto 12px !important;
    }
    body.home-fullscreen-entry #particleEventCanvas:is(:fullscreen, .is-detector-fullscreen-fallback) .detector-mass-overlay { top: 64px; }
}
