/**
 * Shared narrow-screen shell ownership.
 *
 * WordPress's desktop root gutter currently resolves to 64px at 320px. Because
 * custom page canvases sit inside .has-global-padding, that leaves only 192px
 * before their own deliberate gutters are applied. Keep the block-theme
 * contract intact, but give the shared root a fluid mobile gutter.
 */
@media (max-width: 600px) {
	body {
		--wp--style--root--padding-left: clamp(16px, 5vw, 24px) !important;
		--wp--style--root--padding-right: clamp(16px, 5vw, 24px) !important;
	}

	.has-global-padding,
	.has-global-padding > .alignfull {
		box-sizing: border-box;
		min-width: 0;
	}

	.iris-fi-search-strip form[role="search"] > * {
		min-width: 0;
	}

	.iris-fi-search-strip input[type="search"] {
		max-width: 100%;
	}
}

@media (max-width: 360px) {
	.iris-fi-search-strip {
		padding-inline: 16px;
	}
}

/* Keep long archive headings and guide grid tracks within narrow reflow. */
@media (max-width: 320px) {
 body.blog main h1 { overflow-wrap: anywhere; }
 .iris-dpt-guide-hero { grid-template-columns: minmax(0, 1fr); }
 .iris-dpt-guide-hero > * { min-width: 0; }
 .iris-dpt-guide-form input { box-sizing: border-box; max-width: 100%; min-width: 0; }
}
/* Preserve content while shrinking intrinsic grid tracks under extreme reflow. */
@media (max-width: 320px) {
 .iris-global-brand { overflow-wrap: anywhere !important; }
 main .hero-copy { min-width: 0 !important; overflow-wrap: anywhere !important; }
 main .hero-copy h1 { overflow-wrap: anywhere !important; }
 main .hero > .wrap, main .hero-grid,
 .bloom-restored-home .hero, .bloom-current-season,
 .swi-resource-grid, .iris-scholarship-mini-grid,
 .iris-scholarship-grid, .iris-tpta-toc ol {
  grid-template-columns: minmax(0, 1fr) !important;
 }
 .bloom-current-season > *, .swi-resource-grid > *,
 .iris-scholarship-card, .iris-tpta-toc li { min-width: 0 !important; overflow-wrap: anywhere !important; }
 .iris-scholarship-card .iris-card-topline { flex-wrap: wrap; }
 .iris-scholarship-card .iris-status-badge { white-space: normal; overflow-wrap: anywhere !important; }
 .iris-scholarship-card a { max-width: 100%; white-space: normal; overflow-wrap: anywhere !important; }
 .iwd-local-nav { box-sizing: border-box; max-width: 100%; }
}
@media (max-width: 320px) {
 main :is(h1,h2,h3,h4,p,li,a,summary,label,button) { overflow-wrap: anywhere !important; }
 main :is(input,textarea,select) { box-sizing: border-box; max-width: 100%; }
 .iris-home-v2 :is(.note-paper,.currently,.project,.project-copy),
 .iris-home-v2 .wrap > *, .feature-main, .feature-main .copy,
 .iris-nsr-callout > *, .iris-tti-cta > *, .iris-inline-lead > * { min-width: 0 !important; }
 .iris-home-v2 .work .wrap { flex-wrap: wrap; }
 .iris-home-v2 .project, .feature-main,
 .iris-nsr-callout, .iris-tti-cta, .iris-inline-lead,
 .iris-student-next__links { grid-template-columns: minmax(0,1fr) !important; }
 .iris-nsr-button, .iris-next-link { min-width: 0 !important; max-width: 100%; box-sizing: border-box; white-space: normal; }
 .b2-app .priority-line { grid-template-columns: 44px minmax(0,1fr) !important; }
}
@media (max-width: 320px) {
 .iris-home-v2 .currently-list { grid-template-columns: minmax(0,1fr); }
 .iris-home-v2 .currently-item,
 .iris-home-v2 .currently-item strong,
 .iris-home-v2 .currently-item span { min-width: 0; overflow-wrap: anywhere !important; }
}
/* Keep Bloom's resource link below its brand at extreme native reflow. */
@media (max-width:260px){
 .b2-app .b2-header{flex-wrap:wrap!important;gap:12px!important}
 .b2-app .b2-brand{width:100%;min-width:0!important}
 .b2-app .b2-brand>span{min-width:0;overflow-wrap:anywhere}
 .b2-app .b2-resource-link{max-width:100%;overflow-wrap:anywhere}
}
