@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Noto+Serif+Thai:wght@400;500;600&display=swap');

/* HealthInsight's approved Ink Navy identity, on the shared Nexora contract.
   Clinical status colors and printable report palettes remain independently owned. */
:is(:root, .app-appearance-scope)[data-appearance="nexora"] {
    --app-font-heading: "Cormorant Garamond", "Noto Serif Thai", serif;
    --app-font-body: "Source Sans 3", "Sarabun", sans-serif;
}

@media screen {
    :is(:root, .app-appearance-scope)[data-appearance="nexora"] {
        :is(.page-heading h1, .experience-heading h1, .marketing-hero__copy h1,
            .access-page-layout__heading h1, .access-page-layout__showcase h2,
            .summary-section-heading h2, .summary-topic-heading h3, .summary-ranking h3) {
            font-weight: 400;
            line-height: 1.45;
            letter-spacing: normal;
        }

        .page-heading h1 { font-size: clamp(1.6rem, 2.4vw, 2.15rem); }
        .summary-eyebrow { color: var(--app-accent); font-size: .875rem; }
        .summary-metric strong { font-weight: 500; }
        .summary-sidebar h2 { font-family: var(--app-font-body); font-weight: 600; }
        .viewer-brand strong { font-family: var(--app-font-body); font-weight: 600; font-size: 1.125rem; }
        .viewer-masthead { min-height: 4.5rem; }
        .brand-mark { border: 0; background: transparent; border-radius: 0; }
        .privacy-label { background: transparent; border: 0; }
        .viewer-content { padding-block: clamp(1.5rem, 3vw, 2.5rem) 4rem; }
        .record-heading h1 { font-size: clamp(1.6rem, 2.2vw, 2.25rem); line-height: 1.5; }
        .record-intro { font-size: .875rem; line-height: 1.85; }
        .record-hero, .session-panel, .result-panel { animation: none; }
        .result-surface { background: var(--app-surface); }
        .result-heading time { border-radius: var(--app-radius-sm); font-weight: 500; }
        .session-option { text-align: start; }
        .session-option.selected { box-shadow: inset 3px 0 0 var(--app-accent); }
        .identity-facts dd { overflow-wrap: anywhere; }
    }

    /* Personal identity and checkup history sit next to the selected results.
       This is layout only: the same secure viewer and session controls render. */
    @media (min-width: 66.01rem) {
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) {
            grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
            grid-template-rows: auto 1fr;
            align-items: start;
        }
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) .record-hero {
            grid-column: 1; grid-row: 1;
            grid-template-columns: minmax(0, 1fr);
            gap: 1.5rem;
            padding: 1.5rem;
        }
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) .records-layout { display: contents; }
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) .session-panel { grid-column: 1; grid-row: 2; }
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) .result-panel { grid-column: 2; grid-row: 1 / span 2; }
        :root[data-appearance="nexora"] .viewer-page:has(.result-panel) .identity-facts > div { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
    }

    @media (max-width: 66rem) {
        :root[data-appearance="nexora"] .record-hero { padding: 1.5rem; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    }
    @media (prefers-reduced-motion: reduce) {
        :root[data-appearance="nexora"] .viewer-page * { animation: none; transition: none; }
    }
    @media (forced-colors: active) {
        :root[data-appearance="nexora"] .session-option.selected { border-color: Highlight; box-shadow: none; }
    }
}
