/* =============================================================================
   Nuru Trust — Site-wide responsive system
   Canonical breakpoints: 1199 / 991 / 767 / 575 / 400
   Loaded last so these rules win over page-level media queries.
   ============================================================================= */

/* ── Global foundation (all browsers) ── */
html {
    overflow-x: hidden; /* Safari / older browsers */
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    overflow-x: clip;
    min-width: 0;
}

img,
video,
iframe,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

iframe {
    width: 100%;
}

/* Prevent flex/grid children from blowing out the viewport */
.nt-container,
.nt-container--narrow,
.nt-container--read,
.nt-pub-card,
.nt-event-row,
.nt-lp-program-card,
.nt-lp-pub-card,
.nt-lp-event-card,
.nt-team-card,
.nt-contact-panel,
.nt-footer-grid > *,
.nt-footer-main > * {
    min-width: 0;
}

/* Touch-friendly defaults */
button,
.nt-btn,
.nt-lp-btn,
.nt-pub-filter,
.nt-header-menu-toggle {
    -webkit-tap-highlight-color: transparent;
}

/* ── Large tablet / small laptop (≤1199px) ── */
@media (max-width: 1199px) {
    .nt-pub-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nt-photo-masonry {
        columns: 3 180px;
        column-gap: 0.85rem;
    }

    .nt-approach-grid--3x2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Header contact — hide long text on narrow desktop */
@media (min-width: 992px) and (max-width: 1100px) {
    .nt-header-contact a span:not(.nt-header-contact-icon) {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ── Tablet (≤991px) ── */
@media (max-width: 991px) {
    .nt-container {
        width: min(100% - 2rem, var(--nt-container));
    }

    :root {
        --nt-section-y: 3.5rem;
        --nt-section-y-sm: 2.5rem;
    }

    /* Home grids */
    .nt-lp-values {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .nt-lp-programs-grid,
    .nt-lp-pubs-grid,
    .nt-lp-events-grid,
    .nt-lp-sdg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .nt-lp-program-card,
    .nt-lp-pub-card,
    .nt-lp-event-card,
    .nt-lp-value-card,
    .nt-lp-sdg-item {
        min-width: 0;
    }

    .nt-lp-program-body {
        padding: 0.85rem 0 0;
    }

    .nt-lp-value-card {
        padding: 0;
    }

    .nt-lp-program-body h3,
    .nt-lp-value-card h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .nt-lp-program-body p,
    .nt-lp-value-card p {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .nt-lp-vijana-band,
    .nt-lp-vijana-card {
        flex-direction: column;
        text-align: center;
    }

    .nt-lp-hero-glass,
    .nt-about-hero-card {
        max-width: 100%;
        padding: clamp(1.5rem, 3vw, 2.5rem);
    }

    .nt-lp-hero-headline {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }

    /* About / interior cards */
    .nt-about-vm-grid,
    .nt-about-vm-grid--3,
    .nt-vmw-grid,
    .nt-approach-grid--3x2,
    .nt-contact-grid,
    .nt-agenda-split,
    .nt-member-detail,
    .nt-about-journey:not(.nt-about-journey--copy-only),
    .nt-about-focus:not(.nt-about-focus--stacked) {
        grid-template-columns: 1fr;
    }

    .nt-about-vm-card,
    .nt-approach-card,
    .nt-contact-panel {
        padding: 1.35rem 1.25rem;
    }

    .nt-about-vm-card .nt-richtext,
    .nt-approach-card .nt-richtext,
    .nt-pillars-copy-body {
        font-size: 0.9375rem;
        line-height: 1.65;
        text-align: left;
    }

    .nt-pillars-sidebar,
    .nt-program-sidebar {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid var(--nt-border);
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .nt-pillars-sidebar::-webkit-scrollbar,
    .nt-program-sidebar::-webkit-scrollbar {
        display: none;
    }

    .nt-pillars-tab,
    .nt-program-tab {
        white-space: nowrap;
        flex-shrink: 0;
        margin-inline: 0.45rem;
        padding: 0.45rem 0.15rem;
        border-bottom: 2px solid transparent;
    }

    .nt-pillars-tab.is-active,
    .nt-pillars-tab:hover,
    .nt-program-tab.is-active,
    .nt-program-tab:hover {
        border-bottom-color: var(--nt-brand-bar);
    }

    .nt-pillars-tab {
        font-size: 0.7rem;
    }

    .nt-pillars-subs {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nt-pillars-subcard-media {
        padding-bottom: 60%;
    }

    .nt-program-members {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nt-pillars-subcard-text {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .nt-team-grid--3x2,
    .nt-team-grid--3,
    .nt-team-grid--4 {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
        gap: 1.25rem;
    }

    .nt-team-card--lead .nt-team-card-desc {
        font-size: 0.8rem;
        line-height: 1.45;
        -webkit-line-clamp: 3;
    }

    /* Events / pubs / footer tablet */
    .nt-event-row {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .nt-event-image {
        grid-column: 2;
        width: 100%;
        max-width: 220px;
        height: 120px;
    }

    .nt-event-about-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nt-event-programme-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .nt-pub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .nt-footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .nt-footer-brand {
        grid-column: 1 / -1;
    }

    .nt-footer-newsletter-inner {
        flex-direction: column;
        gap: 0.85rem;
    }

    .nt-footer-newsletter-form {
        max-width: 100%;
        width: 100%;
    }

    /* Header touch targets */
    .nt-menu > li > a,
    .nt-header-menu > li > a {
        min-height: 44px;
    }

    .nt-nav-toggle,
    .nt-header-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .nt-mission-feed .nt-split-grid {
        gap: 2rem;
    }

    .nt-pullquote {
        font-size: 0.95rem;
        padding: 1rem 1rem 1rem 1.15rem;
    }

    .nt-photo-masonry {
        columns: 3 160px;
        column-gap: 0.75rem;
    }

    .nt-split-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* ── Phablet / large phone (≤767px) ── */
@media (max-width: 767px) {
    .nt-container,
    .nt-container--narrow,
    .nt-container--read {
        width: min(100% - 1.5rem, var(--nt-container));
    }

    :root {
        --nt-section-y: 3rem;
        --nt-section-y-sm: 2.25rem;
    }

    .nt-section-title,
    .nt-lp-section-title {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem);
        letter-spacing: 0.03em;
    }

    .nt-section-lead,
    .nt-lp-section-lead {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-top: 0.75rem;
    }

    .nt-section-head,
    .nt-lp-section-head {
        margin-bottom: 1.5rem;
    }

    /* —— Homepage —— */
    .nt-lp-hero {
        min-height: clamp(480px, 85svh, 640px);
    }

    .nt-lp-hero-glass,
    .nt-about-hero-card {
        padding: 1.35rem 1.25rem;
        max-width: 100%;
        width: 100%;
    }

    .nt-lp-hero-headline,
    .nt-about-hero-headline {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
    }

    .nt-lp-hero-subtext {
        font-size: 1rem;
    }

    .nt-lp-hero-cta,
    .nt-lp-hero-badge,
    .nt-about-hero-cta {
        display: inline-flex;
        width: auto;
        max-width: 100%;
        margin-inline: 0;
        justify-content: center;
        box-sizing: border-box;
    }

    .nt-lp-hero-scroll,
    .nt-about-hero-scroll {
        display: none;
    }

    .nt-about-hero {
        min-height: clamp(420px, 72svh, 560px);
        margin-top: 0;
        padding-top: 0;
    }

    .nt-lp-programs-grid,
    .nt-lp-pubs-grid,
    .nt-lp-events-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .nt-lp-sdg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .nt-lp-program-card {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: stretch;
        overflow: hidden;
    }

    .nt-lp-program-media {
        aspect-ratio: auto;
        height: 100%;
        min-height: 120px;
    }

    .nt-lp-program-media img,
    .nt-lp-program-placeholder {
        width: 100%;
        height: 100%;
        min-height: 120px;
        object-fit: cover;
    }

    .nt-lp-program-body {
        padding: 0.85rem 0.9rem;
        text-align: left;
    }

    .nt-lp-program-body p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0.35rem 0 0.55rem;
    }

    .nt-lp-pub-card {
        overflow: hidden;
        padding: 0;
    }

    .nt-lp-pub-link {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        align-items: stretch;
        height: 100%;
    }

    .nt-lp-pub-cover {
        min-height: 110px;
        height: 100%;
    }

    .nt-lp-pub-cover img,
    .nt-lp-pub-placeholder {
        width: 100%;
        height: 100%;
        min-height: 110px;
        object-fit: cover;
    }

    .nt-lp-pub-body {
        padding: 0.85rem 0.9rem;
        text-align: left;
    }

    .nt-lp-pub-body h3 {
        font-size: 0.95rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .nt-lp-event-card {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: stretch;
        overflow: hidden;
        padding: 0;
    }

    .nt-lp-event-date {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 0.35rem;
        margin: 0;
        border-radius: 0;
        height: 100%;
    }

    .nt-lp-event-body {
        padding: 0.85rem 0.9rem;
        text-align: left;
    }

    .nt-lp-event-body h3 {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .nt-lp-values {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .nt-lp-value-card {
        padding: 1rem 0.75rem;
    }

    .nt-lp-value-card p {
        font-size: 0.75rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .nt-lp-testimonial-stage,
    .nt-lp-testimonial-quote {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .nt-lp-section {
        padding-block: 2.5rem;
    }

    .nt-reach-map {
        max-height: 280px;
    }

    .nt-news-grid,
    .nt-events-grid,
    .nt-awards-grid,
    .nt-approach-grid,
    .nt-approach-grid--3x2 {
        grid-template-columns: 1fr;
    }

    /* —— Publications —— */
    .nt-publications-page {
        padding-block: 2rem;
    }

    .nt-pub-grid {
        grid-template-columns: 1fr;
        max-width: none;
        margin-inline: 0;
        gap: 0.85rem;
    }

    .nt-pub-filters {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 0.45rem;
        margin-bottom: 1.35rem;
        padding-inline: 0.25rem;
    }

    .nt-pub-filter {
        flex-shrink: 0;
        padding: 0.45rem 0.95rem;
        font-size: 0.7rem;
    }

    .nt-pub-card,
    .nt-interior-page .nt-pub-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        align-items: stretch;
        min-height: 0;
    }

    .nt-pub-card-media {
        width: 118px;
        height: 100%;
        min-height: 118px;
        padding-bottom: 0;
        aspect-ratio: auto;
    }

    .nt-pub-card-media img,
    .nt-pub-card-placeholder {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .nt-pub-card-body {
        align-items: flex-start;
        justify-content: center;
        text-align: left;
        padding: 0.85rem 0.9rem;
        min-height: 0;
    }

    .nt-pub-card-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        text-align: left;
    }

    .nt-pub-card-source,
    .nt-pub-card-date {
        text-align: left;
    }

    .nt-pub-card-link {
        display: none !important;
    }

    .nt-pub-card:hover,
    .nt-interior-page .nt-pub-card:hover {
        transform: none;
        box-shadow: var(--nt-shadow);
    }

    .nt-pub-card:hover .nt-pub-card-body,
    .nt-interior-page .nt-pub-card:hover .nt-pub-card-body {
        background: #fff;
    }

    .nt-pub-card:hover .nt-pub-card-title,
    .nt-interior-page .nt-pub-card:hover .nt-pub-card-title {
        color: var(--nt-ink);
    }

    .nt-pub-card:hover .nt-pub-card-source,
    .nt-pub-card:hover .nt-pub-card-date,
    .nt-interior-page .nt-pub-card:hover .nt-pub-card-source,
    .nt-interior-page .nt-pub-card:hover .nt-pub-card-date {
        color: var(--nt-muted);
    }

    .nt-pub-pagination {
        gap: 0.35rem;
        flex-wrap: wrap;
    }

    .nt-pub-pagination a {
        min-width: 44px;
        min-height: 44px;
        padding: 0.35rem 0.55rem;
        font-size: 0.8125rem;
    }

    /* —— Events —— */
    .nt-events-search {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .nt-events-search-field {
        min-width: 0;
        width: 100%;
    }

    .nt-events-search-btn {
        width: 100%;
        justify-content: center;
    }

    .nt-events-view-label {
        display: none;
    }

    .nt-events-upcoming-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nt-event-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .nt-event-date {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        min-width: 0;
        width: fit-content;
        padding: 0.35rem 0.65rem;
    }

    .nt-event-date-month,
    .nt-event-date-day,
    .nt-event-date-year {
        display: inline;
        font-size: 0.8rem;
        margin: 0;
    }

    .nt-event-date-day {
        font-size: 0.95rem;
    }

    .nt-event-image {
        grid-column: 1;
        max-width: none;
        width: 100%;
        height: 160px;
    }

    .nt-event-about-grid,
    .nt-event-tracks-grid,
    .nt-event-mentors-grid,
    .nt-event-prizes-grid {
        grid-template-columns: 1fr;
    }

    .nt-event-timeline-list::before {
        left: 22px;
    }

    .nt-event-timeline-item {
        grid-template-columns: 44px 1fr;
        gap: 0.85rem;
    }

    .nt-event-timeline-week {
        width: 44px;
        height: 44px;
        font-size: 0.62rem;
    }

    /* —— Team: keep colleague 2-col until very small phones —— */
    .nt-team-grid--4,
    .nt-team-grid--3,
    .nt-team-grid--3x2,
    .nt-team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
        max-width: none;
    }

    /* —— Gallery —— */
    .nt-photo-masonry {
        columns: 2 150px;
        column-gap: 0.75rem;
    }

    .nt-photo-item {
        margin-bottom: 0.75rem;
    }

    .nt-photo-item img {
        max-height: none;
    }

    .nt-album-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    /* —— Partners / logos —— */
    .nt-coalition-logos,
    .nt-partners-group .nt-coalition-logos,
    .nt-coalition-logos--blend {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
        justify-items: center;
        align-items: center;
    }

    .nt-coalition-logo,
    .nt-partners-group .nt-coalition-logo,
    .nt-coalition-logo--blend {
        min-width: 0;
        width: 100%;
        max-width: 180px;
        height: auto;
        min-height: 72px;
    }

    /* —— Contact / communications —— */
    .nt-contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nt-contact-panel {
        padding: 1.25rem 1.1rem;
    }

    .nt-contact-submit,
    .nt-partner-panel button[type="submit"],
    .nt-lp-btn,
    .nt-comms-panel-field .nt-btn,
    .nt-comms-actions .nt-btn {
        width: 100%;
        justify-content: center;
    }

    .nt-comms-card {
        padding: 1.5rem 1.15rem;
    }

    .nt-comms-panel-field {
        flex-direction: column;
    }

    .nt-contact-map iframe {
        min-height: 260px;
    }

    /* —— About agenda —— */
    .nt-agenda-panel-inner {
        padding: 1.5rem 1.25rem;
    }

    .nt-agenda-heading {
        font-size: 1.25rem;
    }

    .nt-agenda-goal-text {
        font-size: 0.85rem;
    }

    /* —— Footer —— */
    .nt-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem 1rem;
        text-align: left;
    }

    .nt-footer-brand {
        grid-column: 1 / -1;
    }

    .nt-footer-newsletter-field {
        flex-direction: column;
    }

    .nt-footer-newsletter-field input[type="email"] {
        border-radius: 0;
        width: 100%;
    }

    .nt-footer-newsletter-field .nt-btn,
    .nt-footer-newsletter-field button {
        width: 100%;
        justify-content: center;
        border-radius: 0;
    }

    .nt-footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.35rem;
    }

    /* —— Generic —— */
    .nt-hero-content {
        justify-content: center;
        text-align: center;
        min-height: clamp(360px, 58vh, 460px);
        padding-block: 2rem 1.75rem;
    }

    .nt-hero-buttons,
    .nt-cta-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .nt-hero-buttons .nt-btn,
    .nt-cta-buttons .nt-btn {
        width: 100%;
        justify-content: center;
    }

    .nt-testimonial-slide {
        padding: 1.25rem;
    }

    .nt-testimonial-slide-quote {
        font-size: 0.95rem;
    }

    .nt-page-banner {
        min-height: 200px;
    }

    .nt-page-banner-inner {
        padding-block: 2rem 1.5rem;
    }

    .nt-page-banner-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    /* Forms: prevent iOS zoom on focus (16px+) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="search"],
    input[type="url"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* ── Small phones (≤575px) ── */
@media (max-width: 575px) {
    .nt-container,
    .nt-container--narrow,
    .nt-container--read {
        width: min(100% - 1.25rem, var(--nt-container));
    }

    :root {
        --nt-section-y: 2.5rem;
        --nt-section-y-sm: 1.85rem;
    }

    .nt-flash-messages {
        left: 0.75rem;
        right: 0.75rem;
        max-width: none;
    }

    .nt-lp-values {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nt-program-members {
        grid-template-columns: 1fr 1fr;
    }

    .nt-lp-value-card {
        display: block;
        text-align: left;
        padding: 0;
    }

    .nt-lp-value-card h3 {
        margin: 0 0 0.5rem;
    }

    .nt-lp-value-card p {
        margin: 0;
    }

    .nt-lp-sdg-grid {
        grid-template-columns: 1fr;
    }

    .nt-lp-program-card,
    .nt-lp-pub-card {
        grid-template-columns: 1fr;
    }

    .nt-lp-program-media,
    .nt-lp-pub-cover {
        min-height: 160px;
        max-height: 180px;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .nt-lp-program-media img,
    .nt-lp-pub-cover img,
    .nt-lp-program-placeholder,
    .nt-lp-pub-placeholder {
        min-height: 160px;
    }

    .nt-lp-event-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .nt-lp-impact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nt-lp-impact-btn,
    .nt-about-hero-cta,
    .nt-lp-hero-cta,
    .nt-lp-hero-badge {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .nt-lp-impact-title {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }

    .nt-team-grid--4,
    .nt-team-grid--3,
    .nt-team-grid--3x2,
    .nt-team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 22rem;
        margin-inline: auto;
    }

    .nt-team-card {
        padding: 1.6rem 1.15rem 1.35rem;
    }

    .nt-team-card-info {
        padding-top: 1rem;
    }

    .nt-team-card-name {
        font-size: 0.9rem;
    }

    .nt-about-vm-grid--3,
    .nt-about-vm-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .nt-about-journey--copy-only {
        max-width: none;
        margin-bottom: 1.75rem;
    }

    .nt-about-journey-copy,
    .nt-pillars-copy-body,
    .nt-approach-intro {
        font-size: 0.9375rem;
        line-height: 1.7;
        text-align: left;
    }

    .nt-coalition-logos,
    .nt-partners-group .nt-coalition-logos,
    .nt-coalition-logos--blend {
        grid-template-columns: 1fr;
    }

    .nt-page-banner {
        min-height: 180px;
    }

    .nt-page-banner-inner {
        padding-block: 1.75rem 1.35rem;
    }

    .nt-page-banner-title {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
    }

    .nt-breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .nt-back-top {
        right: max(0.85rem, env(safe-area-inset-right, 0px));
        bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
    }

    .nt-agent {
        right: max(0.85rem, env(safe-area-inset-right, 0px));
        bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }

    .nt-agent-panel {
        width: calc(100% - 1.25rem);
        max-width: calc(100vw - 1.25rem);
        right: 0;
        bottom: calc(100% + 0.5rem);
    }

    .nt-photo-masonry {
        columns: 2 140px;
        column-gap: 0.65rem;
    }

    .nt-photo-item {
        margin-bottom: 0.65rem;
    }

    .nt-pub-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .nt-pub-card-media {
        width: 110px;
        min-height: 110px;
    }

    .nt-partners-group + .nt-partners-group {
        margin-top: 2.5rem;
    }

    .nt-pillars-program-name {
        font-size: 1.15rem;
    }

    .nt-pillars-tagline {
        font-size: 0.875rem;
    }

    .nt-publications-intro {
        font-size: 0.95rem;
    }

    .nt-cta-title {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
    }
}

/* ── Very small phones (≤400px) ── */
@media (max-width: 400px) {
    .nt-team-grid--4,
    .nt-team-grid--3,
    .nt-team-grid--3x2,
    .nt-team-grid {
        grid-template-columns: 1fr;
    }

    .nt-container,
    .nt-container--narrow,
    .nt-container--read {
        width: min(100% - 1rem, var(--nt-container));
    }

    .nt-lp-value-card,
    .nt-about-vm-card,
    .nt-approach-card,
    .nt-contact-panel,
    .nt-team-card,
    .nt-pub-card {
        border-radius: 0;
    }

    .nt-pillars-subcard,
    .nt-event-row {
        border-radius: 0;
    }

    .nt-lp-section-title::after,
    .nt-section-title::after {
        width: 48px;
    }

    .nt-hero-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nt-stat-card {
        padding: 1rem 0.65rem;
    }

    .nt-stat-value {
        font-size: 1.35rem;
    }

    .nt-pub-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .nt-pub-card-media {
        width: 100px;
        min-height: 100px;
    }

    .nt-pub-card-title {
        font-size: 0.85rem;
    }

    .nt-lp-event-card {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .nt-header-brand-logo {
        max-height: 36px;
        max-width: 110px;
    }
}

/* ── Landscape phones ── */
@media (max-height: 500px) and (orientation: landscape) {
    .nt-lp-hero,
    .nt-about-hero {
        min-height: auto;
        padding-block: 2.5rem 2rem;
    }

    .nt-page-banner {
        min-height: 140px;
    }

    .nt-lp-hero-scroll,
    .nt-about-hero-scroll {
        display: none;
    }
}

/* ── Print ── */
@media print {
    .nt-site-header,
    .nt-back-top,
    .nt-popup,
    .nt-agent,
    .nt-flash-messages,
    .nt-scroll-progress {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        overflow: visible !important;
    }

    .nt-container {
        width: 100%;
        max-width: none;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .nt-pub-card,
    .nt-team-card,
    .nt-event-row,
    .nt-lp-program-card,
    .nt-lp-pub-card,
    .nt-lp-event-card {
        transition: none;
    }

    .nt-pub-card:hover,
    .nt-team-card:hover,
    .nt-interior-page .nt-pub-card:hover {
        transform: none;
    }
}
